Giter Site home page Giter Site logo

distributed-system-lab / ceresdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/incubator-horaedb

0.0 0.0 0.0 1005 KB

CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

License: Apache License 2.0

Python 0.11% Rust 99.74% Makefile 0.09% Dockerfile 0.05%

ceresdb's Introduction

CeresDB

License

CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

Status

The project is currently under rapid development. This early stage is not production ready and may incur data corruptions.

RoadMap

See our RoadMap

Get started

Clone the repository

Clone this repository by git and enter it:

git clone [email protected]:CeresDB/ceresdb.git
cd ceresdb

Run ceresdb in docker

Ensure that docker is installed in your development environment, and then build the image with the provided Dockerfile:

docker build -t ceresdb .

Start the ceresdb container using the built docker image:

docker run -d -t --name ceresdb -p 5440:5440 -p 8831:8831 ceresdb

Compile and run CeresDB

Install dependencies

In order to compile CeresDB, some relevant dependencies(including Rust toolchain) should be installed.

Dependencies(Ubuntu20.04)

Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:

apt install git curl gcc g++ libssl-dev pkg-config cmake

It should be noted that the compilation of the project actually has version requirements for some dependencies such as cmake, gcc, g++, etc. If your development environment is an old Linux distribution, it is necessary to manually install these dependencies of a higher version.

Rust

Rust can be installed by rustup. After installing rustup, when entering the CeresDB project, the specified Rust version will be automatically downloaded according to the rust-toolchain file.

After execution, you need to add environment variables to use the Rust toolchain. Basically, just put the following commands into your ~/.bashrc or ~/.bash_profile:

source $HOME/.cargo/env

Compile and run

Compile CeresDB by the following command:

cargo build --release

Then you can run CeresDB using the default configuration file provided in the codebase.

./target/ceresdb-server --config ./docs/example.toml

Write and read data

CeresDB supports custom extended SQL protocol. Currently, you can create tables and read/write data with SQL statements through http service.

Create table

curl --location --request POST 'http://127.0.0.1:5440/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "CREATE TABLE `demo` (`name` string TAG, `value` double NOT NULL, `t` timestamp NOT NULL, TIMESTAMP KEY(t)) ENGINE=Analytic with (enable_ttl='\''false'\'');"
}'

Write data

curl --location --request POST 'http://127.0.0.1:5440/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "INSERT INTO demo(t, name, value) VALUES(1651737067000, '\''ceresdb'\'', 100)"
}'

Read data

curl --location --request POST 'http://127.0.0.1:5440/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "select * from demo"
}'

Show create table

curl --location --request POST 'http://127.0.0.1:5440/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "show create table demo"
}'

Drop table

curl --location --request POST 'http://127.0.0.1:5440/sql' \
--header 'Content-Type: application/json' \
--data-raw '{
    "query": "DROP TABLE demo;"
}'

Contributing

Any contribution is welcome!

Read our Contributing Guide and make your first contribution!

Architecture and Technical Documentation

Our technical documents(still under writing and polishing) describes critical parts of ceresdb in the docs.

Acknowledgment

Some design of CeresDB references influxdb_iox, and some specific module implementations reference tikv and other excellent open source projects, thanks to InfluxDB, TiKV, and any other referenced great open source projects.

Licensing

CeresDB is under Apache License 2.0.

Community

  • Check our community materials.
  • Join the user group on the DingTalk: 44602802
  • Contact our stuff on WeChat: chunshao2008
  • Contact us via Email: [email protected]

ceresdb's People

Contributors

waynexia avatar shikaiwi avatar chunshao90 avatar jiacai2050 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.