Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up
This would be appropriate to commit: --- a/examples/Perl/rrserver.pl +++ b/examples/Perl/rrserver.pl @@ -21,7 +21,7 @@ my $context = ZeroMQ::Context->new(); # Socket to talk to clients my $responder = $context->socket(ZMQ_REP); -$responder->connect('tcp://localhost:5560'); +$responder->bind('tcp://*:5559'); while (1) { # Wait for next request from client (localhost is ambiguous IPv6 vs IPv4, so I used * for simplicity) ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up
Ah I see you got those examples *from* the guide, I would say those are broken. Your best bet is to have your server bind() on a localhost address and your client connect(). Check out the equivalent code in Python: https://github.com/imatix/zguide/blob/master/examples/Python/rrserver.py -Michel On Mon, Jul 16, 2012 at 10:02 AM, Michel Pelletier wrote: > Your client and server are not connected to each other. They are both > calling connect() and being passed two different URIs. > > One of your components has to call bind (which one is up to you, but > probably your server) and bind to an address, then the other component > must call connect to connect to that address. Please read the guide > which goes into specific details about this right in the beginning. > > http://zguide.zeromq.org/page:all > > -Michel > > On Mon, Jul 16, 2012 at 9:38 AM, Marko Trajkov > wrote: >> Hello, >> >> I am having trouble in running simple Hello World example in Perl. I >> installed ZeroMQ and perl module, but when I start perl scripts, they are >> running without errors but client and server does not exchange messages (do >> not receive messages and does not sends it) everything else is working >> without errors. This are example which I am trying to run. >> >> https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl >> https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl >> >> When client sends "Hello" tcpdump doesn't catch it, so I can conclude that >> package was not sent. When I manually send package using sendip, server >> doesn't received it. >> >> Please tell me if there is something that I was missing, where I am wrong. I >> don't know how to make it working. By the way, I am using zeroMq 2.2, ubuntu >> linux 12.04 and Perl 5.14.2 >> >> Second question: Is there UDP protocol for zeroMQ sockets? >> >> Kind Regards, >> >> Marko Trajkov >> >> ___ >> zeromq-dev mailing list >> zeromq-dev@lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up
Your client and server are not connected to each other. They are both calling connect() and being passed two different URIs. One of your components has to call bind (which one is up to you, but probably your server) and bind to an address, then the other component must call connect to connect to that address. Please read the guide which goes into specific details about this right in the beginning. http://zguide.zeromq.org/page:all -Michel On Mon, Jul 16, 2012 at 9:38 AM, Marko Trajkov wrote: > Hello, > > I am having trouble in running simple Hello World example in Perl. I > installed ZeroMQ and perl module, but when I start perl scripts, they are > running without errors but client and server does not exchange messages (do > not receive messages and does not sends it) everything else is working > without errors. This are example which I am trying to run. > > https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl > https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl > > When client sends "Hello" tcpdump doesn't catch it, so I can conclude that > package was not sent. When I manually send package using sendip, server > doesn't received it. > > Please tell me if there is something that I was missing, where I am wrong. I > don't know how to make it working. By the way, I am using zeroMq 2.2, ubuntu > linux 12.04 and Perl 5.14.2 > > Second question: Is there UDP protocol for zeroMQ sockets? > > Kind Regards, > > Marko Trajkov > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] ZeroMQ Hello World Perl Example Start Up
Hello, I am having trouble in running simple Hello World example in Perl. I installed ZeroMQ and perl module, but when I start perl scripts, they are running without errors but client and server does not exchange messages (do not receive messages and does not sends it) everything else is working without errors. This are example which I am trying to run. https://github.com/imatix/zguide/blob/master/examples/Perl/rrclient.pl https://github.com/imatix/zguide/blob/master/examples/Perl/rrserver.pl When client sends "Hello" tcpdump doesn't catch it, so I can conclude that package was not sent. When I manually send package using sendip, server doesn't received it. Please tell me if there is something that I was missing, where I am wrong. I don't know how to make it working. By the way, I am using zeroMq 2.2, ubuntu linux 12.04 and Perl 5.14.2 Second question: Is there UDP protocol for zeroMQ sockets? Kind Regards, Marko Trajkov ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] A query about implementing aborts in request reply broker
Thanks for your suggestion Ian. I have a similar model in place, but the issue is how do I find out how many responses are going to come in on my pull socket. In essence, can I somehow find out how many backend workers are connected to my broker. Regards Aalok On Sun, Jul 15, 2012 at 9:10 PM, Ian Barber wrote: > On Sat, Jul 14, 2012 at 7:52 PM, aalok sood wrote: > >> I have a request reply broker and it does the job really well. >> >> Now if I want to tell my workers to abort a bunch of these requests, >> based on some request parameter. >> >> For this I can use a pub-sub, but how do I collect the results? >> > > I would use a pub-sub and a pull or similar socket - so requests to cancel > are published, and you get a confirm message when they've been cancelled > sent back over the pull socket. That said, given you req-rep at the moment, > I'm guessing your work distributor is a dealer or router socket, so you > could collect the results directly through that. > > Ian > > > > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev