250 Remote objects and brokers
Complementary
Videos
Remote Objects
Until now, we shared objects between multiple threads or processes over access to common memory space. In distributed computing, this isn’t possible anymore. We need objects that are shared over a network of multiple computers.
In this part of the lecture we will:
- use out of the box tools given by Python: the remote objects, constructed with the help of
multiprocessing.Managerclass - use a broker system, e.g. RabbitMQ, which offers a couple additional features
AMQP
The Advanced Message Queue Protocol (AMQP version 0.9.1) is used in the RabbitMQ environment. This protocole can be found on different programming languages. The main purpose of this protocol is to allow different applications to communicate with each other. The AMQP is a message-oriented middleware.
RabbitMQ offers 4 different exchange types:
- Direct exchange
- Fan-out exchange
- Topic exchange
- Header exchange
The main purpose of these exchanges is to route messages to one or many queues. The messages can come from a producer and are sent to a consumer. The consumer can be a single consumer or multiple consumers. Also multiple producers can send messages to a single consumer or multiple consumers.
All these different exchange types are represented with examples on Python and RabbitMQ. These examples can be found on the code-snippets