zengkui commented on issue #1775:
URL: 
https://github.com/apache/incubator-brpc/issues/1775#issuecomment-1146814881

   > > 这个理论错误只会出现多个完整的json string在一个response里,不会出现残缺部分数据的情况吧?
   > 
   > 
不是,这里的数据就读自对应http链接的socket中,任何一种情况都可能出现,这是没有保证的,特别是出现中断(signal)和网络抖动时。只是在很多时候,数据已经在那了,且正好是一份。但如果是一个7*24运行的线上系统,出问题的概率应该就比较高了。
   
   谢谢,etcd的这个监听时间的功能基本没啥问题了。但是实际上watch的服务定义如下,不知道这个cancel 
操作怎么才能通过BRPC发送到server端? 我的理解这是一个类似stream rpc的功能,用brpc的http 
client似乎做不到,只能在需要cancel的时候通过另外一个连接来发送? 类似的keep alive的操作似乎也只能采用一个专用线程来间隔发送心跳信息了。 
   ```protobuf
     // Watch watches for events happening or that have happened. Both input 
and output
     // are streams; the input stream is for creating and canceling watchers 
and the output
     // stream sends events. One watch RPC can watch on multiple key ranges, 
streaming events
     // for several watches at once. The entire event history can be watched 
starting from the
     // last compaction revision.
     rpc Watch(stream WatchRequest) returns (stream WatchResponse) {
         option (google.api.http) = {
           post: "/v3/watch"
           body: "*"
       };
     }
   }
   ```
   


-- 
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: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to