Twisted is used to solve the C10k network problem by providing you with an asynchronous network through the Reactor Pattern . Its also convenient because it provides a nice abstraction of concurrency, since threading / concurrency in Python is not as simple as Erlang say. Consequently, some people use Twisted to send work tasks, but that’s not what it is for.
RabbitMQ is based on the message queue pattern. Its all about reliable messaging and not about networking. I emphasize the reliable part because there are many different asynchronous network frameworks (e.g. Vert.x) that provide messaging (also known as pub / sub).
Most often, most people combine the two templates together to create a “message bus” that will work with different network needs without unnecessarily blocking the network and for great integration and scalability.
The reason the “message queue” goes so well with the network “reactor loop” is because the block should not be blocked in the reactor loop, so you have to send blocking jobs to some other process (stream, lwp, separate process cars, line, etc.). In practice, the cleanest way to do this is through distributed messaging.
According to your requirements, it sounds as if you should use an asynchronous network if you want the results to be displayed instantly and scale, but you could probably get away with a simple system that just did the polls, given that you only have several customers. So, the question is, how many total users (Twisted)? And how reliable do you want updates to be delivered (RabbitMQ)? Finally, you want your architecture to be agnostic of the language and platform ... you might want to use Node.js later (focus on the message queue instead of the asynchronous network ... i.e. RabbitMQ). Personally, I would look at Vert.x , which allows you to write in Python.
source share