Skip to content

Latest commit

 

History

History
65 lines (39 loc) · 2.92 KB

get_started_developers.md

File metadata and controls

65 lines (39 loc) · 2.92 KB

Get Started for Developers

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.

  1. 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.

  2. clone the project and go into that cloned repo directory

     git clone https://github.com/tensorbase/tensorbase.git
     cd tensorbase
    
  3. 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.

  4. 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.
  5. ensure you have the binary of ClickHouse client

  6. 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.)

  7. 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;
     ```
    
  8. 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!

  9. and TensorBase thanks for your contributions, read Contributing for more.

Get Started Live Recording


play_out_of_the_box