On Thu, Jun 20, 2013 at 5:24 PM, Martin Sustrik <[email protected]> wrote:
> You can find a high level overview here: > http://www.aosabook.org/en/zeromq.html > > I've also written a bit more concrete document here: > http://www.zeromq.org/whitepapers:architecture These are both excellent resources. Here's my minimal explanation: libzmq is itself built using a messaging architecture: * a bunch of objects (object.cpp) * a dispatcher (io_thread.cpp) * a set of messages, "commands" Each object runs asynchronously on a single core and sends and receives commands. Objects are subclassed into (principally) sockets and sessions. Applications talk to sockets which inject commands into the engine. Sessions run in the background. They may use stream engines, and these are tightly bound, not objects. So session and stream engine always run in the same thread. Sockets and sessions can have "pipes", which are message queues. There are pipe pairs (one in each direction) and single pipes. Pipes are how we implement outgoing and incoming message queues. Pipes can be bounded (high-water marks). So e.g. an inproc connection consists of two sockets, connected with two pipes, one in each direction. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
