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/12 04:31:58 UTC

[GitHub] [incubator-brpc] MrGuin opened a new issue, #1739: 关于 StreamingRPC 的一些问题

MrGuin opened a new issue, #1739:
URL: https://github.com/apache/incubator-brpc/issues/1739

   1. 当发送方一次 StreamWrite 返回错误 EINVAL 时,该如何处理?重新连接,需要重新 init channel,还是只需要把 stream 重新 connect 一下?
   2. 如果 StreamWrite 返回成功,是否可认为发出的 message 已经到达对端?发送过程中某次 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.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


[GitHub] [incubator-brpc] wwbmmm closed issue #1739: 关于 StreamingRPC 的一些问题

Posted by GitBox <gi...@apache.org>.
wwbmmm closed issue #1739: 关于 StreamingRPC 的一些问题
URL: https://github.com/apache/incubator-brpc/issues/1739


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


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

Posted by GitBox <gi...@apache.org>.
MrGuin commented on issue #1739:
URL: https://github.com/apache/incubator-brpc/issues/1739#issuecomment-1098747366

   但是要传的消息很多,会达到百MB,GB级,接收端恢复完才能服务,所以用的 stream 方式,要尽快发完。


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
jamesge commented on issue #1739:
URL: https://github.com/apache/incubator-brpc/issues/1739#issuecomment-1098741807

   ”顺序不重要“的话用普通RPC就行了


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


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

Posted by GitBox <gi...@apache.org>.
jamesge commented on issue #1739:
URL: https://github.com/apache/incubator-brpc/issues/1739#issuecomment-1096571991

   1. EINVAL就是连接断了,重新创建stream即可,channel一般不用动(当然也取决于channel具体怎么创建的,如果是指定ip,然后确实是挂了,那再怎么连也连不上)
   2. StreamWrite成功只能说明本地写入成功,不能说明对端一定收到了(否则每次写入都要从对端收ack,有性能问题)。在需要断点续传的场景中,需要自己做额外的rpc从对端获得已成功传递的进度,然后从那个点开始重传。由于rpc可能重试导致接收端可能要处理幂等问题。
   
   整体而言,如果需要端到端exactly-once天然就挺复杂的,尽量在应用层面避免对顺序的绝对依赖


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