If you are a end user, you may want to start from the binary, read Get Started for Users.
The development of TensorBase is same to the idiom of Rust engineering.
-
It is assumed that you have setup your own Rust development environment.
TIPS: You could have Rust toolchains and cargo installed into your path via rustup.
NOTE: TensorBase is depending on the Rust nightly toolchain.
-
clone the project and go into that cloned repo directory
git clone https://github.com/tensorbase/tensorbase.git cd tensorbase
-
config a base.conf for server booting
Here is an example of base.conf. It is suggested that you just copy and change the meta_dirs and data_dirs to your own directory.
-
use cargo to run the server in debug mode (fast compilation but slow run),
cargo run --bin server -- -c $path_to_base_conf$
or in release mode (slow compilation but fast run),
cargo run --release --bin server -- -c $path_to_base_conf$
NOTE:
-
$path_to_base_conf$ is the full path of conf in #2. - current release profile is using lto = 'thin'. You could adjust the options in Cargo.toml for balancing the speed for compilation and running. However, TensorBase uses lto = 'fat' for its binary release.
-
-
ensure you have the binary of ClickHouse client
- Download from the ClickHouse release page, stable release is recommended.
- or download here, a repacked ClickHouse client for your quick start.
-
connect to the TensorBase server with clickhouse-client like this:
```clickhouse-client --port 9528``` or ```clickhouse-client --port 9528 -n```
NOTE:
--port
– Here 9528 is the default port of TensorBase.--multiquery
,-n
– If specified, allow processing multiple queries separated by semicolons. (So, it may be slightly quicker than multiple statements.) -
execute query like this:
```sql create table employees (id UInt64, salary UInt64) ENGINE = BaseStorage; insert into employees values (0, 1000), (1, 1500); select count(id) from employees; select avg(salary) from employees; ```
-
more supported statements could be seen here.
TensorBase supports high concurrent ingestions from clickhouse-client and native protocol drivers ( Rust client driver here). Welcome to practice!
-
and TensorBase thanks for your contributions, read Contributing for more.