Why is exactly once semantics infeasible?

前端 未结 3 1341
悲哀的现实
悲哀的现实 2021-02-05 17:09

In RPC semantics where Erlang has hope for the best, SUN RPC with at-least once and Java RMI with at-most-once but no one has exactly once semantics.

Why does it seem i

3条回答
  •  误落风尘
    2021-02-05 17:52

    I think the answer is that you'd need an indefinite amount of time to get those semantics, because the client would have to wait for a definitive result from the server, which may never come. That requirement is impractical on real networks.

    If the client ever gives up trying (or if the server goes down for a prolonged period either before completing the transaction, or before signalling that it is complete, depending what order it does those things) then there may be no way for the client to know whether the request was received and handled. In practice, RPC systems may for example want to respect default TCP timeouts, so do not want to have to wait for a definitive success or failure from the server.

    That's a guess though: I have never designed an RPC protocol.

提交回复
热议问题