Trading Farms
This commit is contained in:
1 parent
51ae97b46e
commit
653b320256
4 files changed
+242
No files matched your search
+57
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"topic": "Trading Farms",
|
||||
"pageNumber": "1",
|
||||
"type": "Trading Farms Fundamental Concepts",
|
||||
"definition": {
|
||||
"text": "How to set up a flexible and scalable crypto-trading farm running Superalgos distributed on multiple machines.",
|
||||
"updated": 1611343209935
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Superalgos is designed for coordinated, flexible, and scalable trading operations.",
|
||||
"updated": 1611343220386
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "In its current version, the system may be deployed in multiple machines—as many as desired—and each machine may constitute a node in a network of nodes. In fact, different networks of nodes may live within the same computer network."
|
||||
},
|
||||
{
|
||||
"style": "Callout",
|
||||
"text": "Each node on a network may specialize in a single type of process or handle multiple processes of different types."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "For example, you may have a set of nodes running data mining operations extracting data from multiple markets and multiple exchanges. You may have a set of nodes specializing in processing indicators and technical studies. And you may have a set of nodes specializing in running trading sessions."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "You may also use different criteria to arrange the network. For example, you may have a node running combined data mining, data processing, and trading operations on a single exchange or market, and other nodes running similar combined operations on other exchanges or markets."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Or you may have a network of nodes for your testing environment and another network of nodes for your production environment."
|
||||
},
|
||||
{
|
||||
"style": "Callout",
|
||||
"text": "In other words, the system allows building any arrangement of networks of nodes responding to the organizational logic of your preference."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "What is unique about Superalgos is that the system keeps track of the network arrangements you create and makes sure that all components and data structures in the system can seamlessly track dependencies across the network. This means, for example, that trading sessions running on Node X may access data in Node Y and Node Z without requiring any sort of configuration."
|
||||
},
|
||||
{
|
||||
"style": "Callout",
|
||||
"text": "On top of that, the operation may be managed entirely from any node on the network. In fact, it may be managed from a computer in the network not running Superalgos, by pointing the browser to any of the nodes in the network to run the frontend."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The following explanations assume that you are familiar with the basic workings of Superalgos, and in particular, of the Network hierarchy. If that is not the case, then please read the Network pages before diving into building a trading farm."
|
||||
},
|
||||
{
|
||||
"style": "Warning",
|
||||
"text": "At this stage, Superalgos does not implement any form of security measures, therefore, the system is to be used in the context of a restricted Local Area Network only.",
|
||||
"updated": 1611343257268
|
||||
}
|
||||
]
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"topic": "Trading Farms",
|
||||
"pageNumber": "2",
|
||||
"type": "Set Up a Network of Nodes",
|
||||
"definition": {
|
||||
"text": "Install Superalgos on each machine, to then create and set up a network node for each machine.",
|
||||
"updated": 1611343340124
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This page does not go through the process of setting up a computer network. Instead, it assumes the network is already set up. So, do verify the local area network setup and make sure your computer network is functioning properly before starting.",
|
||||
"updated": 1611343358129
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "In a network of nodes, each node has it’s own web server, web sockets server, and task server."
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "The default web server and web sockets ports used by Superalgos are 34248 and 18041 respectively. If you wish to change these defaults, you must modify the.env file on the root folder, and also \\TaskServer\\.env.",
|
||||
"updated": 1611343376974
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Before You Begin"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Make a quick list with the name you wish to give to each node and the corresponding IP address on the network. You will need those to configure each network node."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Also, you may want to plan what your operation should look like."
|
||||
},
|
||||
{
|
||||
"style": "Callout",
|
||||
"text": "First and foremost, you may want to decide on which node you will keep the workspace on which the network of nodes shall be configured. We call this, the home node."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "This is not a requirement, as you may keep different workspaces in different nodes, and even set up different networks on different workspaces, but it’s the most usual setup."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Also, you may want to plan which nodes in the network should run which data-mining tasks, which nodes should run which trading sessions, and so on. As hinted in the fundamental concepts page, possibilities are endless, so we are not going to cover alternatives here. If you know exactly what you want to do, it should be easy to implement. That said, you are free to explore and experiment as well."
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Start Here"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "1. Set up Superalgos on each machine. Once Superalgos is installed, run the system for the first time using the node run noBrowser command. The noBrowser parameter runs the backend without firing up the frontend."
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "On computers with 8 GB of RAM or less, such as minicomputers or single-board computers like the Raspberry Pi, use node run noBrowser minMemo to run the app. minMemo sets up the system to run with minimal RAM requirements.",
|
||||
"updated": 1611343440835
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Leave the machine online, with the backend running."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "2. Run the frontend to access the home node."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "You may access the home node locally, that is, running the browser on the machine where the home node is running, or you may run the browser on any other machine in the physical network—even one not running Superalgos—by navigating to the home node’s IP address."
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "If you are accessing the home node remotely, you need to configure the My Computer network node to use the machine’s IP address instead of localhost in the host parameter. This enables the web sockets connection.",
|
||||
"updated": 1611343511090
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "For organizational purposes and to avoid confusion later on, it is recommended to clean up the home node’s workspace uninstalling the markets that you don’t need.",
|
||||
"updated": 1611343505445
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Click to learn how to uninstall an existing market"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "3. Add and configure a network node for each machine."
|
||||
},
|
||||
{
|
||||
"style": "Subtitle",
|
||||
"text": "Adding a Network Node"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "To add a network node, select Add Network Node on the Superalgos Network node menu. A network node is added along with the basic structure of nodes to set up a node."
|
||||
},
|
||||
{
|
||||
"style": "Subtitle",
|
||||
"text": "Configuring the Network Node"
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Select Configure on the menu to access the configuration."
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "{\n\"host\": \"localhost\",\n\"webPort\": \"34248\",\n\"webSocketsPort\": \"18041\"\n}",
|
||||
"updated": 1611344373383
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "host is the machine or hardware represented by the network node. The default parameter is localhost, but if you intend to access the backend services of this node from a remote computer, then you must change localhost for the IP Address of the machine on which the node is running, for example, to 147.0.0.1."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "webPort is the port used by the Web Server, at this stage 34248."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "webSocketsPort is the port used by the system to communicate over the local area network, by default set at 18041."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Configure the first node and hit F5 to refresh the page. Once the page reloads, a notice indicating the system is connecting with the new network node will show on the top of the screen. Repeat the process for each machine."
|
||||
}
|
||||
]
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"topic": "Trading Farms",
|
||||
"pageNumber": "3",
|
||||
"type": "Set Up Each Node on the Network",
|
||||
"definition": {
|
||||
"text": "Install the markets you wish to work with and remove the tasks where you don't need them.",
|
||||
"updated": 1611344470552
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "When you install a market, several structures of nodes are created on each of the main sections of the network hierarchy for all nodes defined on the network: data storage, data mining, testing environment, and production environment, as well as the corresponding time machines in the charting space.",
|
||||
"updated": 1611344492853
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "In other words, the process of installing a new market replicates all data structures in all nodes."
|
||||
},
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "You will most likely want to delete the tasks that you don’t need on certain nodes, and keep only those that you wish each node to handle.",
|
||||
"updated": 1611344498395
|
||||
}
|
||||
]
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"topic": "Trading Farms",
|
||||
"pageNumber": "4",
|
||||
"type": "Operating a Trading Farm",
|
||||
"definition": {
|
||||
"text": "Operate tasks in remote nodes pretty much as if they were running on the home node.",
|
||||
"updated": 1611344573684
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "The operation of a trading farm is done from within the home node. There is no need to use the frontend application with any other node in the network, although you may if you wish."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Running or stopping tasks residing in any of the network nodes is a transparent operation, and works in the same way as if the tasks were in the home node. When a task is started, the process takes a snapshot of the state of the network at that point and traces all dependencies before starting the job at hand."
|
||||
},
|
||||
{
|
||||
"style": "Callout",
|
||||
"text": "This means that changes made in the distribution of tasks in the network at any point are recognized by each task upon starting."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "However, entities that don’t run in tasks—such as time machines and timeline charts in the charting space—function with the state of the network upon starting the frontend app. This means that, for example, if you move a data mining task to a different node, the associated chart will show the data in the former node until you refresh the browser."
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "Finally, when uninstalling a market, the system will attempt to uninstall the corresponding tasks on all network nodes. If you wish to uninstall markets on specific nodes only, you may delete data structures individually instead."
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user