Concepts
CALL / RESPONSE (a.k.a RPC)
Provide reliable two-way messaging between multiple endpoints allowing you to build sophisticated asynchronous interactions
dataBridges exposes powerful RPC messaging service for devices and applications to implement high performance non-blocking request / response messages.
- Server application can expose RPC functions to be consumed by client applications.
- The call / response (RPC) messaging service is completely non blocking where the rpc client invokes a RPC function and specifies a reply listener class, which will be used to process the reply. This allows an application to invoke thousands of RPC calls in parallel without blocking each other.
- At the same time call / response (RPC) messaging service allows RPC server to expose asynchronous RPC endpoint (function) where the reply is built asynchronously. When the reply is ready, it is sent back to the client.
Apart from the core asynchronicity, dataBridges call / response (RPC) messaging service supports 2 types of RPC interactions
- Unary RPC: the client sends a single request and receives a single response**.**
- Server streaming RPC: the client sends a single request and in return, the server sends a stream of messages.
dataBridges supports the following types of RPC server
RPC server types | |
---|---|
Public | A Public RPC server can be accessed by authenticated dataBridges applications. They do not need explicit trust-tokens to be presented. |
Private | Applications can consume private RPC functions only after they pass authorization using trust-tokens. RPC servers need not worry about authorization as it is handled by the dataBridges network. An application needs to just indicate that the RPC server is of nature private-access (:prs). The dataBridges network will make sure all the RPC calls to the RPC server is trusted in nature. |
Presence | Presence RPC server is private with additional presence information. An application that requires knowledge of the caller rpc client, will indicate that the RPC server is of nature presence-access (:prs). The dataBridges network will make sure all the RPC calls to the RPC server is trusted in nature. Along with that, the dataBridges network will send the details of the RPC client as metadata along with each RPC interaction. Here RPC server knows that the RPC client is authorised and also who is the client. |