On Wed, Apr 6, 2011 at 7:44 AM, Martin Sustrik <[email protected]> wrote:
>> We used to have a lot of threads "how do I do xyz" and the answer was >> "you can't, with 0MQ", until we began to properly document and exploit >> XREP sockets as routers. > > Yes. IIRC all those use cases were basically about stateful services. "How > do I route this message to the instance where particular data are stored?" Martin, you really need to read the Guide and the patterns described therein, there has been extensive research and work on documenting 0MQ use cases. The main use case for ROUTER is not stateful services, nor explicit identities. It's creating application-level routing that overcomes 0MQ's limitations. A very common example is LRU (least-recently used) routing, which is an essential pattern for workload distribution, that solves a series of problems of PUSH-PULL pipelines, including: * Unbalanced distribution, where early joiners get disproportionate numbers of tasks; * Insensitive distribution, where tasks may be sent to busy workers while other workers are idle. LRU does stretch across stateless intermediaries, and it does not depend on any state in the broker. This was the primary use case for ROUTER, where "XREP" was confusing and misleading as a name. > I would suggest trying to figure out how a pattern for stateful services > should look like: What are the concrete use cases? What guarantees is the > pattern supposed to provide? How does it scale? Isn't it just a > reimplementation of IP routing on a higher level? Etc. Again, it would be helpful if you could read the Guide before assuming these patterns, use cases, and guarantees haven't already been documented and explored. It would be helpful to critique and help improve that documentation. -Pieter _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
