You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2022/04/14 03:13:07 UTC

[GitHub] [incubator-brpc] MrGuin commented on issue #1739: 关于 StreamingRPC 的一些问题

MrGuin commented on issue #1739:
URL: https://github.com/apache/incubator-brpc/issues/1739#issuecomment-1098666425

   > 1. EINVAL就是连接断了,重新创建stream即可,channel一般不用动(当然也取决于channel具体怎么创建的,如果是指定ip,然后确实是挂了,那再怎么连也连不上)
   > 2. StreamWrite成功只能说明本地写入成功,不能说明对端一定收到了(否则每次写入都要从对端收ack,有性能问题)。在需要断点续传的场景中,需要自己做额外的rpc从对端获得已成功传递的进度,然后从那个点开始重传。由于rpc可能重试导致接收端可能要处理幂等问题。
   > 
   > 整体而言,如果需要端到端exactly-once天然就挺复杂的,也会限制并发度,尽量在应用层面避免对顺序的绝对依赖
   
   感谢回复,想了下网络层确实不应该发送等 ack 再返回,只能保证的是消息按顺序到达,即使网络层 ack 了,应用层消息的确认也只能由应用层自己去做。
   我们的用法是把大量记录用 stream 发出去,为了最大化发送速率,发送方在同一个 streamId 上多线程 StreamWrite,记录的处理是幂等的,顺序不重要但因为并发乱序也没法记录进度,中途出错只能从头开始吧。


-- 
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: dev-unsubscribe@brpc.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org