Use cases of RSocket interaction models

It will be helpful if some use case examples can be provided for RSocket interaction models.
In particular, following questions are coming in mind after reading the specs -

  • When to use metadataPush
  • How different are metadataPush and FireAndForget from each other? Both have similar signature.
  • How is performance impacted for an interaction model where streams are required to be passed between client and server (requestChannel) but someone calls requeatResponse in a loop. For example, how to decide whether to use RequestChannel or multiple RequestResponse for devices querying cloud server for some status. One model will have thousands of sticky sessions and other will require the client to create new TCP connections every time.
  • Will there be use cases for FireAndForget to accept Flux as parameter, e.g - sending video logs in screen sharing sessions
  • Metadata push is always on stream zero and is for sending metadata between services. For instance you are using dictionary compression and you use metadata push to share it. Also the payload is supposed to be different in that it only sends metadata
  • Under the hood everything is message passing using binary frames. The interaction models are optimizations on top of the underlying bi-direction channel. If the requester wants to send things in a single stream than requestChannel is better. If the items are logically separate then requestReply could be better.

Another thing to consider is does each request expect a response specific to that request? If it does than requestResponse is the better choice - ie you send 5 requests, and each of the 5 expect a response.

  • If you wanted to do that you could just use RequestChannel. The responder doesn’t have to return anything to the requester. It would effectively be the same thing at that point.