wu-sheng commented on a change in pull request #4:
URL: 
https://github.com/apache/skywalking-banyandb-java-client/pull/4#discussion_r746415267



##########
File path: README.md
##########
@@ -19,10 +19,81 @@ Create a `BanyanDBClient` with host, port and a 
user-specified group and then es
 ```java
 // use `default` group
 client = new BanyanDBClient("127.0.0.1", 17912, "default");
-// establish a connection
+// to send any request, a connection to the server must be estabilished
 client.connect(channel);
 ```
 
+## Schema Management
+
+### Group
+
+To save and fetch data, group and schema must be defined first,
+
+```java
+GroupRegistry groupRegistry = client.groupRegistry();
+// create a group called "default"
+groupRegistry.create("default");
+// list group
+List<String> groups = groupRegistry.list();
+// check existence
+boolean existence = groupRegistry.exist("default");
+```
+
+### Stream
+
+Then we may define a stream with customized configurations,
+
+```java
+StreamMetadataRegistry streamRegistry = client.streamRegistry();
+// build a stream "sw" with 2 shards and ttl equals to 30 days
+Stream s = new Stream("sw", 2, Duration.ofDays(30));

Review comment:
       For the group, a.k.a. database instance, in BanyanDB. I prefer the 
`group` could be created default in BanyanDB, like many other databases in 
quick start mode.
   Then other relative APIs could be BanyanDB-CLI's responsibility, which has 
lower priority for now.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to