Skip to content

michalwidera/retractordb

Repository files navigation

RetractorDB

CI Build Status: CircleCI

These are sources of RetractorDB Time Series Database System prototype.

This is work in progress.

Project Web Page

Retractordb.com is the official web page of RetractorDB system.

Commands

  • xqry: database client
  • xretractor: database main process
  • xtrdb: data accessor and testing tool

How to install

sudo apt-get -y install gcc cmake make build-essential python3 python3-pip python3-venv valgrind clang-format mold
pip install conan
pip install cmakelang
conan profile detect
git clone https://github.com/michalwidera/retractordb.git
cd retractordb
conan install . -s build_type=Debug --build missing
conan build . -s build_type=Debug --build missing
cd build/Debug
make install

optional in case of Externaly Managed PYTHON

python3 -m venv .venv
source .venv/bin/activate

and add this activate into .bashrc or simillar startup script.

optional in build/Debug folder:

make test
cmake .
make
make install
make descgrammar
make rqlgrammar
make cformat

additional:

https://github.com/cheshirekow/cmake_format

Work with antl4 and .g4 files requires java - it will install with conan install.

If you want see graphic response, use gnuplot - install it with:

sudo apt install gnuplot

After installation xretractor, xqry ... etc will be installed in ~/.local/bin on path. Please check proper installation by typing in command prompt - for instance: xqry -h

You should see:

xqry - xretractor communication tool.
Allowed options:
  -s [ --select ] arg         show this stream
  -t [ --detail ] arg         show details of this stream
  ...

To get full functionality additional packages may be required like:

sudo apt install graphviz feh tmux gnuplot

How to Ninja (instead of make)

Ninja is build system. If you want use this instead of makefile please follow this path:

  1. Install ninja
sudo apt install ninja-build
  1. Modify conan2 profile (for instance):
more ~/.conan2/profiles/default
[settings]
arch=x86_64
build_type=Release
compiler=gcc
compiler.cppstd=gnu23
compiler.libcxx=libstdc++11
compiler.version=13
os=Linux

[conf]
tools.cmake.cmaketoolchain:generator=Ninja
  1. If previous build/Debug exist - remove this.
  2. Then you can issue:
conan install . -s build_type=Debug --build missing
conan build . -s build_type=Debug --build missing
cd build/Debug
ninja install
ninja test
ninja descgrammar
ninja rqlgrammar
ninja cformat
ninja
  1. Have fun.

Query Language

Example queries are located in examples directory as *.rql files. Two types of queries are supported. First starts from declare keyword that declares time series. This could be a data file, binary file or even device file from /dev directory. Second starts from select keyword and have following formal form:

select column_expression [as ColumnName], [column_expression [as ColumnName]]
stream output_stream_name
from stream_junction_expression

Example:

select str2[0]/2+1,str2[1]
stream str2
from core1+core0

Author

Project created in 2003-2025 by Michal Widera ([email protected])

Additional materials