Mark Slee writes:
> However, there's no philosophical opposition to changing or
> parallilizing the order of request processing. If we do this, the
> sequence ids will come in handy (my initial thoughts around this were
> that the client would hold a map of sequence id => continuation objects,
> and a parallized server would just have one multiplexer that sits in
> front of the workers and owns the transports -- making sure response
> bytes don't get randomly interleaved).
FWIW, this is precisely what we're doing, and we do use the sequence
id for this purpose. We send messages like:
sendRequest(message, reply_handler, [timeout_handler, [timeout]])
using boost::bind to generate the handlers. Our messaging layer then
guarentees that exactly one of reply_handler or timeout_handler is
called.
-Eric