Skip to main content

Installation

Algodab platform is a software stack comprised of several software packages. Algodab uses:

  • Java
  • RabbitMQ
  • InfluxDB
  • MongoDB
  • Tomcat
  • Grafana

Software stack#

TODO: create a write up explaining the role of each component in Algodab software stack, i.e.

RabbitMQ - for scalability and distributed computing

InfluxDB - for time series data,

MongoDB - for static data like user info,

Tomcat - for hosting web app interface

Grafana - for pretty dashboards (however totally optional)

Configuration files#

These are the files that will need to be edit for your environment before launching Algodab server.

local.config.json contains all setting and parameters that operate the local instance of Algodab server. Most values are pre-set to their defaults, but feel free to tweak as needed.

setenv file contains secrets that are needed by different components, i.e. Alpaca keys, RabbitMQ logins, etc.

ON LINUX#

local.config.json
cd ~/.algodab
vi local.config.json
setenv.sh
cd ~/scripts
vi setenv.sh

ON WINDOWS#

local.config.json
cd %USERPROFILE%/.algodab
notepad local.config.json
setenv.bat
cd %USERPROFILE%/scripts
notepad setenv.bat

Multiple Algodab instances#

Most data providers (like Alpaca for instance) only allow one connnection to their feed per account. Algodab provides a way around that limitation without violating your provider's limitations. You can run multiple Algodab servers concurrently, all the while connected to a single source of data. Each server can then run it's own strategy, maintain its own code base, etc. etc. To configure such set up, one of the server must be configured as a data provider for others, in other words, its Quotestream module must be ON, while it needs to be disabled on others. Well, unless your data provider allows multiple connections that is.

Algodab multiple servers configuration

Data is streamed from a provider (1). The main server (2) has the quotestream module in ENABLED state. It basically uses a default single server configuration to point to a local stack. "local-ip" is a special configuration variable which indicates that a local machine's address will be used to connect to various components. Technically, we could use "localhost" in its place, but that may produce host file related issues on some systems.

Server 2 (with assumed IP http://my.server)
"messageBus" : {
"name" : "RabbitMQ",
"enabled" : true,
"host" : "local-ip",
"username" : "<user>",
"password" : "<pwd>"
...
...
"timeseries" : {
"name" : "InfluxDB",
"quotestreamUrl" : "local-ip:8086",
...
...
"modules" : [
{
"name" : "quotestream",
"enabled" : true,
"verbose" : true,

Any additional server (3 and 4 in the illustration above) must DISABLE its Quotestream module, and point to server (2) instead:

Server 3,4,etc. disable quotestream, point to http://my.server
"messageBus" : {
"name" : "RabbitMQ",
"enabled" : true,
"host" : "http://my.server",
"username" : "<user>",
"password" : "<pwd>"
...
...
"timeseries" : {
"name" : "InfluxDB",
"quotestreamUrl" : "http://my.server:8086",
...
...
"modules" : [
{
"name" : "quotestream",
"enabled" : false,
"verbose" : false,
...
...

IMPORTANT: Any limits imposed by your data provider, are collective across all Algodab instances. For example, if a provider limits the number of tracked symbols at any given time, you must still observe that limit, and make sure that the total number of tracked symbol acrosss all your deployed Algodab instances does not exceed that number.

Then again, of course, Algodab was designed to allow multiple data providers running concurrently, so even in that particular case, there probably is a way around that as well :)