richardmillen / zguide-examples

Implementations of the 0MQ examples in the guide.
http://zguide.zeromq.org/page:all
4 stars 0 forks source link

Round-trip demonstrator in C++ #42

Closed richardmillen closed 7 years ago

richardmillen commented 7 years ago

Implement the round-trip demonstrator in the Asynchronous Majordomo Pattern section.

Theory is great in theory, but in practice, practice is better. Let's measure the actual cost of round-tripping with a simple test program. This sends a bunch of messages, first waiting for a reply to each message, and second as a batch, reading all the replies back as a batch. Both approaches do the same work, but they give very different results. We mock up a client, broker, and worker: