tectonicdb

License: MIT Build Status

tectonicdb is a very fast, highly compressed standalone datastore and streaming protocol for order book ticks.

Reason

This software is motivated by reducing expenditure. 1TB stored on Google Cloud PostgreSQL was too expensive and too slow. Since financial data is usually read and stored in bulk, it is possible to convert into a more efficient format.

Installation

There are several ways to install tectonicdb.

  1. Binaries

Binaries are available for download. Make sure to put the path to the binary into your PATH. Currently only released for Linux x86_64.

  1. Crates.io

Requires Rust. Once you have Rust installed, simply run:

cargo install tectonicdb

This will download and compile tectonic-server and tectonic-cli.

  1. GitHub

To contribute you will need the copy of the source code on your local machine.

git clone https://github.com/rickyhan/tectonic
cd tectonic
cargo build --lib
cargo build --bin tectonic-server
cargo build --bin tectonic-cli

The binaries can be found under target/release/debug folder.

How to use

It's very easy to setup.

chmod +x tectonic-server ./tectonic-server --help

There are several commandline options:

For example:

./tectonic-server -vvvvvvv -t 1000

This sets log verbosity to max and maximum connection to 1000.

Monitoring

It's easy to monitor performance. The history granularity option configures the interval (in second) to periodically record item count for each data store. Then a client can call PERF command and retreive historical item counts.

Logging

Log file defaults to tectonic.log.

Using dtf files

Tectonic comes with a commandline tool dtfcat to inspect the file metadata and all the stored rows into either JSON or CSV.

Options:

``` USAGE: dtfcat [FLAGS] --input

FLAGS: -c, --csv output csv -h, --help Prints help information -m, --metadata read only the metadata -V, --version Prints version information

OPTIONS: -i, --input file to read ```

As a library

It is possible to use the Dense Tick Format streaming protocol / file format as a separate package. Works nicely with any buffer implementing the Write trait.

Requirements

TectonicDB is a standalone service.

Language bindings:

Additional Features