[zeromq-dev] Design Suggestion for simple app using zmq

Diffuser78 diffuser78 at gmail.com
Thu Jul 5 17:23:53 CEST 2012


I have a client and a server app. Client needs to send 1000 lightweight
(5KBs) messages per second to the server. Client also wants an ACK from
server that server got the msg that client sent.

Here is what I have designed. Please let me know your thought in case you
see incorrect usage of the patterns.


CLIENT (*DEALER* socket)

Do the following in while loop

1. Get messages to send
      - Send then using zmq_send()
2. zmq_poll() for fds ready for reading
     - Use zmq_recv() to receive the messages


SERVER (*ROUTER* socket)

Do the following in while loop

1. zmq_poll () for fds ready for reading
    - Use zmq_recv() to receive the messages
2. Perform Processing (Business Logic)
3. Get messages to send
      - Send then using zmq_send()


Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/1bed8a32/attachment.htm>


More information about the zeromq-dev mailing list