Git Product home page Git Product logo

mdb's Introduction

Build Status

#mdb - not key-value database mdb - is a numeric time-series database.

Features

  • High write speed(1.5 - 2.5 millions values per second)
  • Proprietary storage format
  • Implemented as C++ library.

Dependencies

  • Boost 1.53.0 or higher: system, filesystem, interprocess, unit_test_framework(to build tests), program_options (to build benchmarks)
  • cmake
  • c++ 11 compiler

Example

Open, read, write

#include <storage.h>

int main(int argc, char *argv[]) {
	auto writes_count = 3000000;
	{
		auto ds = mdb::Storage::Create("path/to/storage");

		mdb::Meas meas = mdb::Meas::empty();

		for (int i = 0; i < 3000000; ++i) {
			meas.value = i;
			meas.id = i % 10;
			meas.source = meas.flag = 0;
			meas.time = i;

			ds->append(meas);
		}
		ds->Close();
	}
	{
		auto ds = mdb::Storage::Open("path/to/storage");
		//reading
		mdb::Meas::MeasList output;
		auto reader = ds->readInterval(0, writes_count);

		// or meases->readAll(&output);
		while (!reader->isEnd()) {
			reader->readNext(&output);
		}
		ds->Close();
	}
}

Build

build on linux


$ cmake .
$ make

##build on windows with Microsoft Visual Studio

$ cmake -G "Visual Studio 12 2013 Win64" .
$ cmake --build .

build with non system installed boost


$ cmake . -DBOOST_ROOT="path/to/boost/" .
$ make

mdb's People

Contributors

lysevi avatar whoshuu avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.