TCP are reliable by default, you only have a problem if was a disconnection or the router was down.
Anyway you can also use NAKs, which is negative ack and it much better for high performance. Just sequence all of your messages from the beginning of the connection (you need a way to reset the sequence after the sending part was restarted) if you recognize gap on the router side you know you have an error, if you want to recover from the error ask the dealer to resend the missing messages (you need to keep those on the dealer side, decide on how much messages you want to keep). On Sat, Dec 1, 2012 at 12:54 PM, Jan Müller <[email protected]> wrote: > Hi, > > I have a relatively slow network connection between two hosts and I want to > reliably download lots of small messages from one host to the other. > > So far, I've been sending messages with REQ-REP from host1 to host2 and > before sending the next message, I've been waiting for an ACk message > coming > back. Unfortunately, the round trip time is too long, and now I would like > to do this asynchronously. > > What is a most simple way to do so? Do I need a DEALER-ROUTER connection? > In > host1 I send through DEALER let's say 100 messages, in ROUTER I receive one > message after the other and immediately send back an ACK after each message > received, and on the 'DEALER side' I poll for messages and count the > incoming ACKs. If the number of incoming ACKS == number of sent messages > all > is fine, otherwise there was an error?? > > Or is there a better way of doing this? > > Cheers, > Jan > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
