Current state: Accepted
ISSUE: https://github.com/milvus-io/milvus/issues/7713
PRs:
Keywords: C++ SDK
Released: with Milvus 2.1
Authors:
Deliver C++ SDK toolkit with full functionality for Milvus 2.0. Provide both static lib and dynamic lib for users.
We've seen many users demands for C++ SDK, it is probably the most useful SDK which could be used in distributed systems.
Client interfaces declaration:
class MilvusClient { public: static std::shared_ptr<MilvusClient> Create(); virtual Status Connect(const ConnectParam& connect_param) = 0; virtual Status Disconnect() = 0; virtual Status CreateCollection(const CollectionSchema& schema) = 0; virtual Status HasCollection(const std::string& collection_name, bool& has) = 0; virtual Status DropCollection(const std::string& collection_name) = 0; virtual Status LoadCollection(const std::string& collection_name, const TimeoutSetting* timeout) = 0; virtual Status ReleaseCollection(const std::string& collection_name) = 0; virtual Status DescribeCollection(const std::string& collection_name, CollectionDesc& collection_desc) = 0; virtual Status GetCollectionStatistics(const std::string& collection_name, bool do_flush, CollectionStat& collection_stat) = 0; virtual Status ShowCollections(const std::vector<std::string>& collection_names, CollectionsInfo& collection_desc) = 0; }; |
Project framework
The C++ sdk can be designed as two levels:
CI Workflow
Use github ci process to run code lint, clang format check, compile project and run unittest.
Use mergify to automatically add ci-passed label.
Use code coverage tool to generate report and upload to codecov.io.
API Document
Add description for each class/method/constant, follow the Doxygen comment style.
ORM
To be determined.
C++ versions to support
Support C++ version above C++11. The Reason is:
OS platform to support
For the supported platform, need to be tested with mainstream distributions(e.g. Ubuntu 18.04+, CentOS 7+) using google tests.
Milvus cpp SDK 1.1 using cmake, and only build a shared library as output. In this new SDK for milvus 2, the user can choose which version to be built by setting cmake options. Quality gates such as clang-format, clang-tidy, cpplint are needed.
Code Style
A basic rule of C++ code style:
lower_case
CamelCase
Class member name should use lower_case_ (with a underscore append)
UPPER_CASE
CamelCase
, and the private/protected member Function name use camelBack
For more details, follow the Google C++ Style Guide.
Current state: Accepted
ISSUE: https://github.com/milvus-io/milvus/issues/7713
PRs:
Keywords: C++ SDK
Released: with Milvus 2.1
Authors: @matrixji @ArkaprabhaChakraborty @yhmo