eigenein/cloudy — Issue #8: Implement process-to-process messages dispatching
Author: eigenein
Created: 2011-11-02 19:31:41+00:00
State: open

While control connections can send and receive sequential messages, slave processes will send and receive messages in any order. Thus, an additional message dispatching needed on top of `MessageDispatcher`.

The dispatcher should receive all the incoming messages and store them into queues, sorted by tag. A message should be popped from a queue, if there is a client waiting reading operation with the same tag.

This should not be implemented within `MessageDispatcher` because a control TCP connection should be able to read incoming messages as they are received (sequentially).

Another dispatching should work in the same way, but sort by a sender. This will allow a client to read synchronously from the specified sender and not to block messages queue.

The same behavior one can see in MPI.