Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: move architecture to user-guide #186

Merged
merged 4 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/user_guide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ jobs:
git update-ref -d refs/heads/gh-pages
rm -rf *
mv ../book/* .
# Add custom domain
echo "docs.ceresdb.io" > CNAME
git add .
git commit -m "Deploy $GITHUB_SHA to gh-pages"
git push --force
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ For features we don't plan to support we will close the feature request ticket (

## Contributing Changes

CeresDB is written mostly in idiomatic Rust—please see the [Style Guide](docs/dev/style_guide.md) for more details.
CeresDB is written mostly in idiomatic Rust—please see the [Style Guide](https://docs.ceresdb.io/dev/style_guide.html) for more details.
All code must adhere to the `rustfmt` format, and pass all of the `clippy` checks we run in CI (there are more details further down this README).

### Making a PR
Expand All @@ -41,7 +41,7 @@ PR title.

For PRs that you consider ready for review, verify the following locally before you submit it:

* you have a coherent set of logical commits, with messages conforming to the [Conventional Commits](docs/dev/conventional-commit.md) specification;
* you have a coherent set of logical commits, with messages conforming to the [Conventional Commits](https://docs.ceresdb.io/dev/conventional_commit.html) specification;
* all the tests and/or benchmarks pass, including documentation tests;
* the code is correctly formatted and all `clippy` checks pass; and
* you haven't left any "code cruft" (commented out code blocks etc).
Expand Down Expand Up @@ -101,4 +101,4 @@ And run with:

```shell
cargo clippy --all-targets --workspace -- -D warnings
```
```
2 changes: 1 addition & 1 deletion README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ CeresDB 是一款高性能、分布式、Schema-less 的云原生时序数据库
项目目前在快速迭代中,早期版本可能存在数据不兼容问题,因此不推荐生产使用及性能测试。

## RoadMap
项目 [Roadmap](./docs/dev/roadmap-CN.md)。
项目 [Roadmap](https://docs.ceresdb.io/dev/roadmap.html)。

## 快速开始
### 获取代码
Expand Down
66 changes: 4 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,75 +13,17 @@ CeresDB is a high-performance, distributed, schema-less, cloud native time-serie
## Status
The project is currently under rapid development. This early stage is not production ready and may incur data corruptions.

## RoadMap

See our [RoadMap](./docs/dev/roadmap.md)

## User Guide
See https://docs.ceresdb.io/

## Develop
### Compile and run CeresDB
#### Install dependencies
In order to compile CeresDB, some relevant dependencies(including the `Rust` toolchain) should be installed.

#### Dependencies(Ubuntu20.04)
Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:
```shell
apt install git curl gcc g++ libssl-dev pkg-config cmake
```

It should be noted that the compilation of the project has version requirements for 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.

#### Dependencies(MacOS)
If the development environment is MacOS, execute the following command to install the required dependencies.

1. Install command line tools:
```shell
xcode-select --install
```
2. Install cmake:
```shell
brew install cmake
```

#### Rust
`Rust` can be installed by [rustup](https://rustup.rs/). 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`:
```shell
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.
```bash
./target/release/ceresdb-server --config ./docs/example.toml
```

## Platform Support
jiacai2050 marked this conversation as resolved.
Show resolved Hide resolved

| target | OS | status |
|:------------------------:|:-----------------:|:---------------------:|
| x86_64-unknown-linux-gnu | kernel 4.9+ | able to build and run |
| x86_64-apple-darwin | 10.15+, Catalina+ | able to build |
| aarch64-apple-darwin | 11+, Big Sur+ | able to build |
| aarch64-unknown-linux-gnu| TBD | tracked on [#63](https://github.com/CeresDB/ceresdb/issues/63)|
| *-windows | * | not support |
## Documentation
- [User Guide](https://docs.ceresdb.io/)
- [Development Guide](https://docs.ceresdb.io/dev/compile_run.html)
- [Roadmap](https://docs.ceresdb.io/dev/roadmap.html)

## Contributing
Any contribution is welcome!

Read our [Contributing Guide](CONTRIBUTING.md) 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](docs).

## Acknowledgment
Some design of CeresDB references [influxdb_iox](https://github.com/influxdata/influxdb_iox), and some specific module implementations reference [tikv](https://github.com/tikv/tikv) and other excellent open source projects, thanks to InfluxDB, TiKV, and any other referenced great open source projects.

Expand Down
20 changes: 0 additions & 20 deletions docs/dev/roadmap-CN.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/dockerhub-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ docker run -d --name ceresdb-server \
ceresdb/ceresdb-server:v0.2.0
```

# Write and read data
- [Quick Start](https://github.com/CeresDB/ceresdb/blob/main/docs/user-guide/src/quick_start.md)
# Documentation
- https://docs.ceresdb.io/
File renamed without changes.
12 changes: 12 additions & 0 deletions docs/guides/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[book]
authors = ["CeresDB Authors"]
language = "en"
multilingual = false
src = "src"
title = "CeresDB Documentation"

[output.html]
cname = "docs.ceresdb.io"

[output.html.fold]
enable = true
11 changes: 11 additions & 0 deletions docs/user-guide/src/SUMMARY.md → docs/guides/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,21 @@
- [Analytic Engine](analytic_engine/README.md)
- [Options](analytic_engine/options.md)
- [Deployment](deploy/README.md)
- [Supported Platform](deploy/platform.md)
- [Static Routing](deploy/static_routing.md)
- [Develop Kits](sdk.md)
- [Protocol](protocol.md)

# Dev Guide
- [Supported Platform](dev/platform.md)
- [Compile and Running](dev/compile_run.md)
- [Conventional Commit](dev/conventional_commit.md)
- [Style guide](dev/style_guide.md)
- [Roadmap](dev/roadmap.md)

# Technical and Design
- [Architecture](architecture.md)

-----

- [Trouble Shooting](trouble_shooting.md)
9 changes: 9 additions & 0 deletions docs/user-guide/src/about.md → docs/guides/src/about.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
![CeresDB](https://github.com/CeresDB/ceresdb/raw/main/docs/logo/CeresDB.png)

![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)
[![CI](https://github.com/CeresDB/ceresdb/actions/workflows/ci.yml/badge.svg)](https://github.com/CeresDB/ceresdb/actions/workflows/ci.yml)
[![OpenIssue](https://img.shields.io/github/issues/CeresDB/ceresdb)](https://github.com/CeresDB/ceresdb/issues)
[![Slack](https://badgen.net/badge/Slack/Join%20CeresDB/0abd59?icon=slack)](https://join.slack.com/t/ceresdbcommunity/shared_invite/zt-1dcbv8yq8-Fv8aVUb6ODTL7kxbzs9fnA)
[![Docker](https://img.shields.io/docker/v/ceresdb/ceresdb-server?logo=docker)](https://hub.docker.com/r/ceresdb/ceresdb-server)


CeresDB is a timeseries database that aims to handle both timeseries and analytic workloads efficiently.

# Motivation
Expand Down
113 changes: 56 additions & 57 deletions docs/dev/architeture.md → docs/guides/src/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ The current RPC supports multiple protocols including HTTP, gRPC, MySQL.

Basically, HTTP and MySQL are used to debug CeresDB, query manually and perform DDL operations (such as creating, deleting tables, etc.). And gRPC protocol can be regarded as a customized protocol for high-performance, which is suitable for massive reading and writing operations.

### SQL Layer
### SQL Layer
module path: https://github.com/CeresDB/ceresdb/tree/main/sql

SQL layer takes responsibilities for parsing sql and generating the plan.

Based on [sqlparser](https://github.com/sqlparser-rs/sqlparser-rs) a sql dialect, which introduces some key concepts including `Tag` and `Timestamp`, is provided for processing timeseries data. And by utilizing [DataFusion](https://github.com/apache/arrow-datafusion) the planner can generate not only normal logical plans but also custom ones, such as plans for `PromQL`.
Based on [sqlparser](https://github.com/sqlparser-rs/sqlparser-rs) a sql dialect, which introduces some key concepts including `Tag` and `Timestamp`, is provided for processing timeseries data. And by utilizing [DataFusion](https://github.com/apache/arrow-datafusion) the planner can generate not only normal logical plans but also custom ones, such as plans for `PromQL`.

### Interpreter
module path: https://github.com/CeresDB/ceresdb/tree/main/interpreters
Expand Down Expand Up @@ -177,33 +177,33 @@ After a brief introduction to some important modules of CeresDB, we will give a

### Query
```plaintext
┌───────┐ ┌───────┐ ┌───────┐
│ │──1──▶│ │──2──▶│ │
│Server │ │ SQL │ │Catalog│
│ │◀─10──│ │◀─3───│ │
└───────┘ └───────┘ └───────┘
│ ▲
4│ 9│
│ │
▼ │
┌─────────────────────────────────────┐
│ │
│ Interpreter │
│ │
└─────────────────────────────────────┘
│ ▲
5│ 8│
│ │
▼ │
┌──────────────────┐
│ │
│ Query Engine │
│ │
└──────────────────┘
│ ▲
6│ 7│
│ │
▼ │
┌───────┐ ┌───────┐ ┌───────┐
│ │──1──▶│ │──2──▶│ │
│Server │ │ SQL │ │Catalog│
│ │◀─10──│ │◀─3───│ │
└───────┘ └───────┘ └───────┘
│ ▲
4│ 9│
│ │
▼ │
┌─────────────────────────────────────┐
│ │
│ Interpreter │
│ │
└─────────────────────────────────────┘
│ ▲
5│ 8│
│ │
▼ │
┌──────────────────┐
│ │
│ Query Engine │
│ │
└──────────────────┘
│ ▲
6│ 7│
│ │
▼ │
┌─────────────────────────────────────┐
│ │
│ Table Engine │
Expand Down Expand Up @@ -232,33 +232,33 @@ Here are the details:

### Write
```plaintext
┌───────┐ ┌───────┐ ┌───────┐
│ │──1──▶│ │──2──▶│ │
│Server │ │ SQL │ │Catalog│
│ │◀─8───│ │◀─3───│ │
└───────┘ └───────┘ └───────┘
│ ▲
4│ 7│
│ │
▼ │
┌─────────────────────────────────────┐
│ │
│ Interpreter │
│ │
└─────────────────────────────────────┘
│ ▲
│ │
│ │
│ │
│ │ ┌──────────────────┐
│ │ │ │
5│ 6│ │ Query Engine │
│ │ │ │
│ │ └──────────────────┘
│ │
│ │
│ │
▼ │
┌───────┐ ┌───────┐ ┌───────┐
│ │──1──▶│ │──2──▶│ │
│Server │ │ SQL │ │Catalog│
│ │◀─8───│ │◀─3───│ │
└───────┘ └───────┘ └───────┘
│ ▲
4│ 7│
│ │
▼ │
┌─────────────────────────────────────┐
│ │
│ Interpreter │
│ │
└─────────────────────────────────────┘
│ ▲
│ │
│ │
│ │
│ │ ┌──────────────────┐
│ │ │ │
5│ 6│ │ Query Engine │
│ │ │ │
│ │ └──────────────────┘
│ │
│ │
│ │
▼ │
┌─────────────────────────────────────┐
│ │
│ Table Engine │
Expand All @@ -281,4 +281,3 @@ Here are the details:
- Delete the corresponding `WAL` entries;
- Updates the manifest for the new `SST`s and the sequence number of `WAL`;
- Server module responds to the client with the execution result.

File renamed without changes.
13 changes: 13 additions & 0 deletions docs/guides/src/deploy/platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
As an open source cloud-native, CeresDB can be deployed in the Intel/ARM-based architecture server, and major virtualization environments.


| OS | status |
|:--------------------------------------------------:|:------:|
jiacai2050 marked this conversation as resolved.
Show resolved Hide resolved
| Ubuntu LTS 16.06 or later | ✅ |
| CentOS 7.3 or later | ✅ |
| Red Hat Enterprise Linux 7.3 or later 7.x releases | ✅ |
| macOS 11 or later | ✅ |
| Windows | ❌ |

- For production workloads, Linux is the preferred platform.
- macOS is mainly used for development
1 change: 1 addition & 0 deletions docs/guides/src/dev/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Compile and Running
40 changes: 40 additions & 0 deletions docs/guides/src/dev/compile_run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
In order to compile CeresDB, some relevant dependencies(including the `Rust` toolchain) should be installed.

# Dependencies(Ubuntu20.04)
Assuming the development environment is Ubuntu20.04, execute the following command to install the required dependencies:
```shell
apt install git curl gcc g++ libssl-dev pkg-config cmake
```

It should be noted that the compilation of the project has version requirements for 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.

# Dependencies(MacOS)
If the development environment is MacOS, execute the following command to install the required dependencies.

1. Install command line tools:
```shell
xcode-select --install
```
2. Install cmake:
```shell
brew install cmake
```

# Rust
`Rust` can be installed by [rustup](https://rustup.rs/). 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`:
```shell
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.
```bash
./target/release/ceresdb-server --config ./docs/example.toml
```
Loading