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



##########
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:
       IIUC, we should align whether group CRUD is a part of the client first. 
   
   I thought there're two use cases banyandb have to support:
   
   ### Development/Demo
   In this case, OAP should play a full-featured client which contains workload 
resources and group APIs. OAP would take care of creating a group for ingesting 
and retrieving data. 
   
   ### Production
   OAP only CRUDs workload resources. A human-being administrator(DBA) will 
create a group where the OAP writes.
   
   If we should both of them, we have to unify the client to support all 
functions, introducing a role-based access control( 
    RBAC) to authorize resources to a user/role. This strategy would not affect 
this client, and RBAC APIs should not belong to this.
   
   Let me wrap this up, I prefer to keep group APIs in this client.




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