Skip to content

260 Synchronous message passing

Videos

Synchronous message passing

The biggest difference between asynchronous message passing and synchronous message passing is that with the synchronous message passing also the sending primitive is blocking until the message was read by a consumer.

Remote procedure call

The RPC (remote procedure call) is a mechanism where one party offers a service (a callable procedure/function) and another party uses this service via a remote call. Both parties can run on the same machine, but can also be distributed among different machines. In the later case, the communication is done through classical synchronous message passing.

The data that is exchanged can be of all kind of types, thus a (un)pickeling ((de)serialization) must be done at each transfer.

RPC with Python

Python doesn’t offer RPC out of the box. A lot of libraries exist that help the developer to setup a RPC environment.

With RabbitMQ, as a broker, the RPC setup is also possible and can be tested in the code-snippets 262.