openGemini

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2022 License: Apache-2.0

README

README

License

简体中文 | English

Official Website | Docs | Contribution Guide

About openGemini

OpenGemini is an open-source time-series database that can be widely used in IoT, Internet of Vehicles(IoV), O&M monitoring, and industrial Internet scenarios. It has excellent read/write performance and efficient data analysis capabilities. It uses an SQL-like query language, does not rely on third-party software, and is easy to install, deploy, and maintain. We encourage contribution and collaboration to the community.

Why openGemini

  • High-performance read and write
    • 10-million-scale concurrent writes of metrics per second
    • Millisecond-level response for querying tens of thousands of sensors data
  • Supports time-series data analysis
    • Built-in AI data analysis algorithm
    • Supports real-time abnormality detection and prediction of time-series data
  • Ecosystem compatibility
    • Compatible with InfluxDB line protocol and Influxql
    • Seamless integration with existing InfluxDB toolchain
    • Supports promethus remote read/write API
  • Efficient management of massive time series data
    • Supports 100-million-scale time series management
    • Built-in efficient data compression algorithm, with a storage cost of only 1/20 compared to traditional databases
  • Distributed
    • Provides horizontal scalability and supports hundreds of nodes in a cluster
  • Flexible deployment
    • Runs the executable binary files without external dependencies
    • All the configuration is done with reasonable defaults
    • Supports single-node and cluster deployment

Third-party supports

image-20220722152842190

currently openGemini only supports Linux OS, and supports InfluxDB ecosystem toolchains, such as:

Drivers: JavaScriptJavaC/C++RubyGoPythonPHP

Client: Influx

Data access tools: StatsD, EMQ, Telegraf, Icinga2, HiveMQ, Kafka, MQTT

Data insight tools: Chronograf, Grafana

Big data and data analysis systems: Zeppelin, Flink, Spark, Kapacitor, etc.

Quick Start

For a more detailed introduction, please visit our official website User Guide

This section mainly contains the following:

  • How to compile openGemini source codes
  • How to run openGemini
Compiling environment information

GO version v1.16+

Python version v2.7+

How to set GO environment variables

Open /etc/profile configuration file and add the following configurations to the end of the file:

export GOPATH=/path/to/dir
export GOBIN=$GOPATH/bin
export GO111MODULE=on
export GONOSUMDB=*
export GOSUMDB=off
Compiling
  1. Clone source codes from Github
> cd $GOPATH
> mkdir -p {pkg,bin,src}
> cd src
> git clone https://github.com/openGemini/openGemini.git
  1. Enter the home directory
> cd openGemini
  1. Compiling
> export CGO_LDFLAGS="-Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -fPIE -ftrapv"
> export CGO_CFLAGS="-fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2"
> python build.py

The compiled binary file is in the build directory

> ls build
ts-meta  ts-server  ts-sql  ts-store
Configuration

The configuration file is in the conf directory. For more information about the configuration items, please refer to User Guide --> Configuration Files

Run openGemini

Standalone operation

> cd openGemini
> mkdir -p /tmp/openGemini
> sh scripts/install.sh

Refer to cluster deployments in User Guide

Using openGemini

Use the client to connect to openGemini

influx --host 127.0.0.1 port 8086

After successful login, the following message will be displayed

> influx --host 127.0.0.1 --port 8086
WARN: Connected to http://127.0.0.1:8086, but found no server version.
Are you sure an InfluxDB server is listening at the given address?
InfluxDB shell version: 1.8.3
> 
Demo

dongtu

Create a database

create database sensordb

Create a table (automatic table creation is supported)

create measurement sensor

Specifying partition keys during table creation is also supported. During data storage, the table will be primarily partitioned by time, and then secondarily partitioned according to the specified partition keys.

create measurement sensor with shardkey farmID

Write data

insert sensor,farmID="001",deviceId="110" sensor_id="s20",value=50.98

Query data

select * from sensor

Join & Contribute

Tips for Contribution

Contact Us

  1. Slack

  2. Twitter

License

openGemini is licensed under the Apache License 2.0. Refer to LICENSE for more details.

Directories

Path Synopsis
app
ts-meta command
ts-monitor command
ts-server command
ts-sql command
ts-store command
op
lib
cpu
das
fileops
nolint
nolint
metaclient
nolint
nolint
open_src
github.com/bmizerany/pat
Package pat implements a simple URL pattern muxer
Package pat implements a simple URL pattern muxer
github.com/deckarep/golang-set
Package mapset implements a simple and generic set collection.
Package mapset implements a simple and generic set collection.
github.com/dgryski/go-bitstream
Package bitstream is a simple wrapper around a io.Reader and io.Writer to provide bit-level access to the stream.
Package bitstream is a simple wrapper around a io.Reader and io.Writer to provide bit-level access to the stream.
github.com/hashicorp/go-msgpack/codec
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
High Performance, Feature-Rich Idiomatic Go encoding library for msgpack and binc .
github.com/hashicorp/serf/testutil/retry
Package retry provides support for repeating operations in tests.
Package retry provides support for repeating operations in tests.
github.com/jwilder/encoding/simple8b
Package simple8b implements the 64bit integer encoding algoritm as published by Ann and Moffat in "Index compression using 64-bit words", Softw.
Package simple8b implements the 64bit integer encoding algoritm as published by Ann and Moffat in "Index compression using 64-bit words", Softw.
github.com/valyala/bytebufferpool
Package bytebufferpool implements a pool of byte buffers with anti-fragmentation protection.
Package bytebufferpool implements a pool of byte buffers with anti-fragmentation protection.
github.com/valyala/fastrand
Package fastrand implements fast pesudorandom number generator that should scale well on multi-CPU systems.
Package fastrand implements fast pesudorandom number generator that should scale well on multi-CPU systems.
golang.org/x/crypto/pbkdf2
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
Package pbkdf2 implements the key derivation function PBKDF2 as defined in RFC 2898 / PKCS #5 v2.0.
influx/influxql/internal
Package influxql is a generated protocol buffer package.
Package influxql is a generated protocol buffer package.
This package is a set of convenience helpers and structs to make integration testing easier
This package is a set of convenience helpers and structs to make integration testing easier

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL