For this reason I decided to build a proof of concept of a reactive architecture using Python. The PoC will be a system which will track the used CPU of a machine, although it is (almost) prepared for measuring the used resources of a lot of machines.
The first module, resources-tracker, will be on charge of measuring the CPU and sending through the RabbitMQ broker using a topic exchange. The topic will be <name-of-the-machine>.measure.
The next module, resources-analyzer, will receive all the measures (topic: #.measure), will determine the range of use of the CPU of the machine (HIGH, MEDIUM, LOW) and will send it through the RabbitMQ broker using the topic <machine's-name-of-received-measure>.analysis.
The last module, resources-web, will show the results of the module before. For this task Tornado web framework which will be connected to RabbitMQ using the TornadoConnection of Pika and to the simple AngularJS client through a WebSocket.
Therefore, each time a CPU measure is taken, the final result will be represented in a browser without making any request.
This approach makes the system very scalable. Everything can be build as a module listening to the right topics and sending the result using another topic, in order to be used by other modules. The final picture can remind us a neural network.
All the code can be found in github. Each module contains a Dockerfile and it will help you a lot to run the entire system using Docker.