horaedb
horaedb copied to clipboard
Start CeresDB in distributed mode with CeresMeta
Description The target is to run ceresdb in distributed mode and in order for that ceresdb in distributed mode, ceresdb must communicate with ceresmeta by the meta client.
Proposal CeresMeta's service is built by grpc and the corresponding protocol has been defined by the proto file so first what we need to do is build a grpc client based on that proto file during ceresdb's starting procedure.
And there is no need to keep the old meta client and the new meta client should provide the capatibilities:
- Send keepalive heartbeats to ceresmeta;
- Register handlers for node heartbeats;
- Allocate schema/table id;
- Provide routing information of the cluster from the ceresmeta;
And based on the new meta client (meta_client_v2) a module called cluster will be responsible for managing information from the CeresMeta, including:
- Creating schema, creating/deleting tables;
- Tables to be opened in the ceresdb instance;
- Events such as change of the cluster topology from ceresmeta;
- ...
Additional context steps:
- [x] Upgrade ceresdbproto, remove old meta client and refactor meta_client_v2; #100
- [x] Enhance cluster module based on meta_client_v2; #100
- [x] Refactor volatile catalog implementation; #157
- [ ] Support startup in distributed mode; #190