cbornet commented on a change in pull request #6512: WIP: [protocol] Grpc 
protocol handler
URL: https://github.com/apache/pulsar/pull/6512#discussion_r396998455
 
 

 ##########
 File path: pulsar-protocols/grpc/src/main/proto/PulsarApi.proto
 ##########
 @@ -0,0 +1,888 @@
+/**
+ * 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.
+ */
+syntax = "proto2";
+
+package pulsar.protocols.grpc;
+option java_package = "org.apache.pulsar.protocols.grpc.api";
+option java_multiple_files = true;
+// option optimize_for = LITE_RUNTIME;
+
+service Pulsar {
+    rpc produce(stream CommandSend) returns (stream SendResult) {}
 
 Review comment:
   Produce messages need to be sent to the leader/topic owner broker only so 
you can't really do load balancing. Also this would require sharing the auth 
session (when it's stateful) between the brokers.
   As for req/resp vs bidi-streaming, it can be benchmarked but the cost of 
authentication/authorization is probably a killer without some persistent 
session mechanism.
   Now it shouldn't be hard to expose a req/resp endpoint in parallel of the 
bidi-streaming one. That can be easier to use for simple producers that just 
want to send a single message and be gone.

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


With regards,
Apache Git Services

Reply via email to