Hi there, I have used JSON-RPC - one command per message. Multi-part messages are allowed as a set of commands to be treated as an atomic operation, so if one fails/errors, the whole batch fails/rolls back. The RPC layer is a thin~ish API to a database backend.
The architecture is simple REQ-REP clients with an LRU queue connecting REQ-REP workers. As it is a database app, the database is the bottleneck and the workers are all local, so I didn't trouble with a more complicated heartbeating mechanism. Peace, -Luke On Fri, Jul 22, 2011 at 7:32 AM, mrevilgnome <[email protected]> wrote: > Howdy, > > I'm in the middle of doing some exploring/prototyping and I was > curious how others implemented RPC on top of 0mq. Initially I was > going to use 0mq as a transport for Avro or Protobuf, but then I > realized that by doing so I would sacrifice a fair bit of 0mq > functionality. My current thinking is that I should use multipart > messages; a header which is the function name and a value which is the > protobuf serialized parameters for the call. Initially I thought that > I might want two headers one of which would be used for routing > between clusters by function, but I figure that I can have nodes > register capabilities with a router. Does this seem reasonable? What > have others done? Please poke holes if you see them. Thanks. > > --Matt > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- --------------------------------------------------- Dr Lucas Hope - lucas.r.hope@skype Machine Learning and Software Engineering Consultant Melbourne, Australia
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
