category: Architecture

This article contains details about the RPC implementation in Stormancer. The protocol is used by system requests (that happen at the client level) and scene requests (that happen at the scene level).

All Request messages can be encapsulated into any kind of supported enveloppes (for timestamping for instance). In particular, the above table omits the 3 bytes routing headers (sceneHandle,routeHandle)

Request messages

Size (bytes) 1 2 2 variable
Content Scene handle RPC route handle RPC request ID request data

Response messages

Message events

Size (bytes) 1 2 2 variable
Content Scene handle RPC Next route handle RPC request ID message data

Message events are dispatched to the subscriber through the onNext observable event.

Error events

Size (bytes) 1 2 2 variable
Content Scene handle RPC Error route handle RPC request ID error data

Error events are dispatched to the onError observable event. The library creates a Stormancer.ClientException instance to hold the error data provided by the server.

Completed events

Size (bytes) 1 2 1 2
Content Scene handle RPC Complete route handle data already sent RPC request ID

Completed events are dispatched to the onCompleted observable event. This event doesn't hold any custom data.