{"id":13629754,"url":"https://github.com/lysevi/dariadb","last_synced_at":"2025-04-17T09:36:22.124Z","repository":{"id":66519509,"uuid":"52500083","full_name":"lysevi/dariadb","owner":"lysevi","description":"dariadb -  is a numeric time-series database storage engine.","archived":false,"fork":false,"pushed_at":"2018-06-04T11:32:52.000Z","size":6199,"stargazers_count":22,"open_issues_count":27,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-01T22:44:22.113Z","etag":null,"topics":["c-plus-plus","database","engine","no-sql","timeseries"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lysevi.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-02-25T05:45:34.000Z","updated_at":"2022-04-15T01:00:44.000Z","dependencies_parsed_at":"2023-02-22T14:30:12.842Z","dependency_job_id":null,"html_url":"https://github.com/lysevi/dariadb","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lysevi%2Fdariadb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lysevi%2Fdariadb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lysevi%2Fdariadb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lysevi%2Fdariadb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lysevi","download_url":"https://codeload.github.com/lysevi/dariadb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223751461,"owners_count":17196642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-plus-plus","database","engine","no-sql","timeseries"],"created_at":"2024-08-01T22:01:18.415Z","updated_at":"2024-11-08T20:32:02.516Z","avatar_url":"https://github.com/lysevi.png","language":"C++","readme":"# dariadb - numeric time-series database.\n\n# Continuous Integration\n\n|  version | build \u0026 tests | test coverage |\n|---------------------|---------|----------|\n| `master`   | [![Build Status](https://travis-ci.org/lysevi/dariadb.svg?branch=master)](https://travis-ci.org/lysevi/dariadb) |  [![codecov](https://codecov.io/gh/lysevi/dariadb/branch/master/graph/badge.svg)](https://codecov.io/gh/lysevi/dariadb) |\n| `develop` | [![Build Status](https://travis-ci.org/lysevi/dariadb.svg?branch=dev)](https://travis-ci.org/lysevi/dariadb) | [![codecov](https://codecov.io/gh/lysevi/dariadb/branch/dev/graph/badge.svg)](https://codecov.io/gh/lysevi/dariadb) |\n \n\n# Features\n* True columnar storage\n* Can be used as a server application or an embedded library.\n* Full featured http api.\n* Golang client (see folders \"go\" and \"examples/go\")\n* Accept unordered data.\n* Each measurement contains:\n  - Id - x32 unsigned integer value.\n  - Time - x64 timestamp.\n  - Value - x64 float.\n  - Flag - x32 unsigned integer.\n* Write strategies:\n  - wal - little cache and all values storing to disk in write ahead log. optimised for big write load(but slower than 'memory' strategy).\n  - compressed - all values compressed for good disk usage without writing to sorted layer.\n  - memory - all values stored in memory and dropped to disk when memory limit is ended.\n  - cache - all values stored in memory with writes to disk.\n  - memory-only - all valeus stored only in memory.\n* LSM-like storage struct with three layers:\n  - Memory cache or Append-only files layer, for fast write speed and crash-safety(if strategy is 'wal').\n  - Old values stored in compressed block for better disk space usage.\n* High write speed:\n  - as embedded engine - to disk - 1.5 - 3.5 millions values per second to disk\n  - as memory storage(when strategy is 'memory') - 7-9 millions.\n  - across the network - 700k - 800k values per second\n* Shard-engine: you can split values per shard in disk, for better compaction and read speed up.\n* Crash recovery.\n* CRC32 for all values.\n* Two variants of API:\n  - Functor API (async) -  engine apply given function to each measurement in the incoming request.\n  - Standard API - You can Query interval as list or values in time point as dictionary.\n* Compaction old data with filtration support;\n* Statistic:\n  - time min/max\n  - value min/max\n  - measurement count\n  - values sum\n* Statistical functions: \n  - minimum\n  - maximum\n  - count\n  - average\n  - median\n  - sigma(standard deviation)\n  - percentile90\n  - percentile99\n* Interval aggregation support. Available intervals: raw,minute, half hour, hour, day, week, month, year.\n\n# Usage example\n- See folder \"examples\"\n- How to use dariadb as a embedded storage engine: [dariadb-example](https://github.com/lysevi/dariadb-example)\n\n# Dependencies\n* Boost 1.54.0 or higher: system, filesystem, date_time,regex, program_options, asio.\n* cmake 3.1 or higher\n* c++ 14/17 compiler (MSVC 2015, gcc 6.0, clang 3.8)\n\n## Build\n---\n\n### Install dependencies\n\n```shell\n$ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test\n$ sudo apt-get update\n$ sudo apt-get install -y libboost-dev  libboost-filesystem-dev libboost-program-options-dev libasio-dev libboost-date-time-dev cmake  g++-6  gcc-6 cpp-6 \n$ export CC=\"gcc-6\"\n$ export CXX=\"g++-6\"\n```\n\n### Jemalloc\nOptionaly you can install jemalloc for better memory usage. \n```shell\n$ sudo apt-get install libjemalloc-dev\n```\n\nOr you may use builtin jemalloc source in dariadb  - just add build option **-DSYSTEM_JEMALLOC=OFF**\n\n### Git submodules\n```shell\n$ cd dariadb\n$ git submodules init \n$ git submodules update\n```\n### Available build options\n- **DARIADB_ENABLE_TESTS** - Enable testing of the dariadb. - ON\n- **DARIADB_ENABLE_INTEGRATION_TESTS** - Enable integration test. - ON\n- **DARIADB_ENABLE_SERVER** - Enable build dariadb server. - ON\n- **DARIADB_ENABLE_BENCHMARKS** - Enable build dariadb benchmarks. - ON\n- **DARIADB_ENABLE_SAMPLES** - Build dariadb sample programs. - ON\n- **DARIADB_ASAN_UBSAN**  - Enable address \u0026 undefined behavior sanitizer for binary. - OFF\n- **DARIADB_MSAN** - Enable memory sanitizer for binary. - OFF\n- **DARIADB_SYSTEM_JEMALLOC** - Use jemalloc installed in the system. - ON\n\n#### Configure to build with all benchmarks, but without tests and server.\n---\n```shell\n$ cmake  -DCMAKE_BUILD_TYPE=Release -DDARIADB_ENABLE_TESTS=OFF -DDARIADB_ENABLE_INTEGRATION_TESTS=OFF -DDARIADB_ENABLE_BENCHMARKS=ON -DDARIADB_ENABLE_SERVER=OFF . \n```\n\n### clang\n---\nClang currently does not supported.\n```shell\n$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS_RELEASE=\"${CMAKE_CXX_FLAGS_RELEASE} -stdlib=libc++\" -DCMAKE_EXE_LINKER_FLAGS=\"${CMAKE_EXE_LINKER_FLAGS} -lstdc++\" .\n$ make\n```\n\n### gcc\n---\n```shell\n$ cmake -DCMAKE_BUILD_TYPE=Release .\n$ make\n```\n\n### Microsoft Visual Studio\n---\n```cmd\n$ cmake -G \"Visual Studio 14 2015 Win64\" .\n$ cmake --build .\n```\nif you want to build benchmarks and tests\n```cmd\n$ cmake -G \"Visual Studio 14 2015 Win64\" -DBUILD_SHARED_LIBS=FALSE  .\n$ cmake --build .\n```\n\n### build with non system installed boost\n---\n```shell\n$ cmake  -DCMAKE_BUILD_TYPE=Release -DBOOST_ROOT=\"path/to/boost/\" .\n$ make\n```\n\n","funding_links":[],"categories":["C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flysevi%2Fdariadb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flysevi%2Fdariadb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flysevi%2Fdariadb/lists"}