Summary

This chapter set out to demonstrate that observables can be shared between services and applications, and do not have to be restricted inside an application.

Almost all communication protocols rely on three base patterns: publish/subscribe, channel, and request/response. Since all these protocols can be implemented on top of push-based communication, it means that observables can be used to implement all these protocols.

The three layers of the multiplexing stack are mandatory steps, each one serving a specific purpose. None can be omitted without breaking the functioning of a remote communication. These three layers are steps that must be taken when receiving and sending some messages.

The publish/subscribe implementation was relatively simple, thanks once again to AsyncIO and RxPY. This implementation requires additional features to be usable in production: more error handling, and control flow. However, considering this implementation is possible with very little code, remote observables can be considered as a valid way to communicate between components, eventually on top of existing protocols such as Kafka and MQTT.

The next (and final) chapter is a reminder of the best practices to follow when writing ReactiveX code, to avoid falling into common traps.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.226.240