Skip to content

multipart messages

Fanda Vacek edited this page Mar 23, 2023 · 23 revisions

Multipart messages

New meta key part will be introduced in RpcResponse. RpcResponse without part key is considered to be the final one. This is aligned with single-part messages, which currently have not a part key.

RpcResult keys enum will be extended by next keys:

  • chunk - if chunk key is received, then result should be appended to result of previous chunks
    • String, Blob will be concatenated
    • List will be appended
    • Map will be merged
  • 'progress' TBD
    1. [n,m] - part n of m message parts
    2. [n] - part n of unknown number of message parts
    3. [null] - unknown part of unknown number of message parts

Receiver of multipart message can cancel whole transfer, if it sent back Error RpcResponse, rcid must be part of RpcRequest to enable this.

What multipart messages can be good for:

  • transfer big file in N chunks with progress
  • keep client informed about progress of very long time lasting Rpc Call
Clone this wiki locally