szetszwo commented on a change in pull request #215:
URL: https://github.com/apache/incubator-ratis/pull/215#discussion_r502971645



##########
File path: 
ratis-client/src/main/java/org/apache/ratis/client/api/DataStreamApi.java
##########
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ratis.client.api;
+
+/**
+ * Stream data asynchronously to all the servers in the {@link 
org.apache.ratis.protocol.RaftGroup}.
+ * Clients may stream data to the nearest server and then the server will 
forward the data to the other servers.
+ * Once all the servers have received all the data of a request,
+ * the leader (may or may not be the nearest server) creates a log entry with 
the metadata but not the data.
+ * Then, the leader sends the metadata as a log entry to the followers.
+ * Since the followers already have received the data from the stream,
+ * they may lookup the data from the metadata.

Review comment:
       The metadata is a data ID generated by the state machine so that the 
follower can lookup the data using the ID.  Let me revise the javadoc.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to