Giter VIP home page Giter VIP logo

presentations's Introduction

CnodSB Logo

CI Rust License Agpl 3.0 twitter linkedin

English | 简体中文

CnosDB is a high-performance, high-compression, and easy-to-use open-source distributed time-series database. It is primarily used in fields such as IoT, industrial internet, connected cars, and IT operations. All of the code is open-sourced and available on GitHub.

In its design, we fully utilize the characteristics of time-series data, including structured data, non-transactions, fewer deletions and updates, more writes and less reads, etc. As a result, CnosDB has a number of advantages that set it apart from other time-series databases:

  • High performance: CnosDB addresses the issue of time-series data expansion and theoretically supports unlimited time-series data. It supports aggregate queries along the timeline, including queries divided by equal intervals, queries divided by enumeration values of a column, and queries divided by the length of the time interval between adjacent time-series records. It also has caching capabilities for the latest data and the cache space can be configured for fast access to the latest data.

  • Easy to use: CnosDB provides clear and simple interfaces, easy configuration options, standard SQL support, seamless integration with third-party tools, and convenient data access functions. It supports schema-less writing mode and supports historical data supplement(including out of order writing).

  • Cloud native: CnosDB has a native distributed design, data sharding and partitioning, separation of storage and computing, Quorum mechanism, Kubernetes deployment and complete observability, ensuring final consistency. It can be deployed in public clouds, private clouds, and hybrid clouds. t also supports multi-tenancy and has role-based permission control. The computing and storage nodes support horizontal scaling.

    CnosDB Cloud is now live, click here to get started now.

Architecture

arch

Quick Start

Build&Run from source

Support Platform

We support the following platforms, if found to work on a platform not listed, Please report to us.

  • Linux x86(x86_64-unknown-linux-gnu)
  • Darwin arm(aarch64-apple-darwin)

Requirements

  1. Install Rust, You can check official website to download and install
  2. Install Cmake
# Debian or Ubuntu
apt-get install cmake
# Arch Linux
pacman -S cmake
# CentOS
yum install cmake
# Fedora
dnf install cmake
# macOS
brew install cmake
  1. Install FlatBuffers
# Arch Linux
pacman -S flatbuffers
# Fedora
dnf install flatbuffers
# Ubuntu
snap install flatbuffers
# macOS
brew install flatbuffers

If your system is not listed, you can install FlatBuffers as follows

$ git clone -b v22.9.29 --depth 1 https://github.com/google/flatbuffers.git && cd flatbuffers

# Choose one of the following commands depending on your operating system
$ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
$ cmake -G "Visual Studio 10" -DCMAKE_BUILD_TYPE=Release
$ cmake -G "Xcode" -DCMAKE_BUILD_TYPE=Release

$ sudo make install
  1. Install Protobuf
# Arch Linux
pacman -S protobuf
# Fedora
dnf install protobuf
# Ubuntu
snap install protobuf
# macOS
brew install protobuf

Compile

git clone https://github.com/cnosdb/cnosdb.git && cd cnosdb
make build

Run

Run CnosDB

The following is a single node startup. If you need to start a cluster, see the Deploy section.

./target/debug/cnosdb run -M singleton --config ./config/config.toml

Run CLI

cargo run --package client --bin cnosdb-cli

Run with Docker

  1. Install Docker

  2. Start container

docker run --name cnosdb -d cnosdb/cnosdb:community-latest cnosdb run -M singleton --config /etc/cnosdb/cnosdb.conf
  1. Run a command in the running container
docker exec -it cnosdb bash
  1. Run cnosdb-cli
cnosdb-cli

Quit \q Help \? For more details, check quick start

Write data

The following will show an example of using cli to write data by SQL

  1. CREATE TABLE
CREATE TABLE air (
    visibility DOUBLE,
    temperature DOUBLE,
    pressure DOUBLE,
    TAGS(station)
);
public ❯ CREATE TABLE air (
    visibility DOUBLE,
    temperature DOUBLE,
    pressure DOUBLE,
    TAGS(station)
);
Query took 0.063 seconds.
  1. Insert a row
INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES
                (1673591597000000000, 'XiaoMaiDao', 56, 69, 77);
public ❯ INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES
                (1673591597000000000, 'XiaoMaiDao', 56, 69, 77);
+------+
| rows |
+------+
| 1    |
+------+
Query took 0.032 seconds.
  1. insert multiple rows
INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES
                ('2023-01-11 06:40:00', 'XiaoMaiDao', 55, 68, 76),
                ('2023-01-11 07:40:00', 'DaMaiDao', 65, 68, 76);
public ❯ INSERT INTO air (TIME, station, visibility, temperature, pressure) VALUES
                ('2023-01-11 06:40:00', 'XiaoMaiDao', 55, 68, 76),
                ('2023-01-11 07:40:00', 'DaMaiDao', 65, 68, 76);
+------+
| rows |
+------+
| 2    |
+------+
Query took 0.038 seconds.

Query data

The following will show an example of SQL query using cli

-- query table data
SELECT * FROM air;
public ❯ -- query table data
SELECT * FROM air;
+---------------------+------------+------------+-------------+----------+
| time                | station    | visibility | temperature | pressure |
+---------------------+------------+------------+-------------+----------+
| 2023-01-11T06:40:00 | XiaoMaiDao | 55         | 68          | 76       |
| 2023-01-13T06:33:17 | XiaoMaiDao | 56         | 69          | 77       |
| 2023-01-11T07:40:00 | DaMaiDao   | 65         | 68          | 76       |
+---------------------+------------+------------+-------------+----------+
Query took 0.036 seconds.

Connector

CnosDB supports connections from various clients:

  • C/C++
  • Go
  • Java
  • Rust
  • Python
  • JDBC
  • ODBC
  • Arrow Filght SQL

Please refer to the "Connector" section in the documentation for the above examples. You can access it here.

Roadmap

Join the community

Welcome to join our developer community at discord:

https://discord.com/invite/D8cB4WGpP4

Contributing

Please refer to Contribution Guide to contribute to CnosDB.

Acknowledgement

  • CnosDB 2.0 uses Apache Arrow as the memory model.
  • CnosDB 2.0's query engine is powered by Apache Arrow DataFusion.
  • CnosDB 2.0's bug detection is powered by SQLancer.
  • CnosDB 2.0's integration test framework is powered by sqllogictest-rs.
  • CnosDB 2.0 combining LangChain to realize the natural language to communicate with the database。

presentations's People

Contributors

gikawong avatar gtxssss avatar jcy20000106 avatar kree0 avatar muninshen avatar roseboy-liu avatar ryanlau1020 avatar subsegment avatar vinnyslash avatar yichengzhu avatar yunnewh avatar zuotijia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

presentations's Issues

New Flag 活动中文版

English Version | 中文版

Wish Request

Make trivial but interesting contributions and start becoming a CnosDB contributor.

Describe the feature you'd like:

Please modify the logo file in cnosdb-cli module in develop branch.
Write down your New Year's resolutions and append them to the end of the file, and CC (the community host) will pick the best wishes to publish on the next release so that these wishes will be there on the welcome screen of the program!

中文版

Flag祈愿

2022,立下新年第一个Flag,一个有趣的贡献,你就踏入了CnosDB贡献者的圈子。

功能描述

2021我们开源了,2022我们发现,爱码士还是很羞嗒嗒,没有给我们一键三连(被我抓到是谁,你就完了,站到墙角去
test
为什么会这样,不应该啊? 于是CC去问胖梁,是成为我们的精英贡献者门槛过高吗?是我不配吗??
test2
胖梁大惊失色道:怎么可能?成为贡献者很简单!
test3

1月13日,CnosDB正式开启新年Flag挑战赛,此次活动主要是督促各位爱码士在新学期赶紧加入到CnosDB的社区里来。通过建立新的计划和目标,立完flag之后还可以获得,获得CnosDB官方精美定制礼品哦~往这里瞧:

1.进入GitHub/cnosdb/cnosdb一键三连

2.进入issue26,提出申请,我要立flag
在上面输入姓名、目标、完成时间和完不成的惩罚,

3.稍后,老高会分配任务哦

4.进入develop分支中,在cnosdb/cmd/cnosdb-cli/cli/,编辑logo文件

5.最后PR(Pull request)哦

请写下你对2022年的期望,CC(即社区小助手)会挑选最好的愿望发布到程序的启动界面哦!
提交PR之后,请不要忘记给[email protected] ,发送截图和地址哦。请一键三连一月,CC会每天Check,然后给你发礼物哦
test4
最后附上本期礼品 (By the way, 礼物很好看,模特也挺白)
test5
还有每季度的大礼,会从每季度的贡献者里抽取哦
test6

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.