Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Nishant Mittal
that did it. thanks I now have a working "Asynchronous Client-Server pattern" with clients and workers in Perl and the intermediary device in C. thanks again Nishant On Thu, Dec 27, 2012 at 7:27 PM, Daisuke Maki wrote: > Ah, I see you looked at the SYNOPSIS only, and didn't read the rest of t

Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Daisuke Maki
I'd rather have my docs relatively sparse and let the official zeromq guide/docs show The Correct Way, than write a lot of docs and have contradicting explanations ;) That said, I think I didn't include a link to the official docs, which I should have done. My bad there. 2012/12/28 Pieter Hintjens

Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Daisuke Maki
Ah, I see you looked at the SYNOPSIS only, and didn't read the rest of the docs. The SYNOPSIS was a copy from LibZMQ2, so it was wrong: zmq_send($socket, $msg, $flags); Should read zmq_send($socket, $buffer, $size, $flags); So your client.pl is actually doing zmq_send($socket, "your m

[zeromq-dev] lsd, a high-level wrapper around zyre

2012-12-27 Thread Victor Perron
Hello, I'm just announcing an almost usable version of lsd (Local Service Discovery) , which goal is to fulfil one of the needs stated in the Guide: have a simple high-level binding on the top of zyre. It comes with a simple binding in python, and should be ported to Java almost as easily, especia

Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Pieter Hintjens
I think the problem is one of documentation on the Perl binding, which is a bit sparse. On Thu, Dec 27, 2012 at 10:20 PM, Michel Pelletier wrote: > Can you provide us a minimal example of what's not working for you? It's > just a flag to send(). It certainly works in all other languages and ther

Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Nishant Mittal
Michael/Pedro, I uploaded my worker and client code on https://gist.github.com/4392186 client sends a message with 2 parts and then expects a response. worker expected 2 part message and then sends a response. I get an error on line #21 "Argument is not an object" in worker. thanks for your hel

Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Pedro Melo
Hi, On 27/12/2012, at 20:46, Nishant Mittal wrote: > Has anyone been able to make multipart msgs work with Perl? could you point > me to documentation online or better code? Sure, works fine. Just make sure you are using the ZMQ::LibZMQ3 bindings, those are the most up-to-date and stable. B

Re: [zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Michel Pelletier
Can you provide us a minimal example of what's not working for you? It's just a flag to send(). It certainly works in all other languages and there are copious examples in the guide and in the examples repository. https://github.com/imatix/zguide/tree/master/examples/Perl -Michel On Thu, Dec 2

[zeromq-dev] Multipart msgs and Perl

2012-12-27 Thread Nishant Mittal
Has anyone been able to make multipart msgs work with Perl? could you point me to documentation online or better code? thanks Nishant ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Re: [zeromq-dev] CZMQ in-depth docs enquiry

2012-12-27 Thread Pieter Hintjens
Up to now the only docs are on http://czmq.zeromq.org/. I'll look at writing a full Guide for CZMQ in 2013, since the library is getting quite a lot of use. -Pieter On Thu, Dec 27, 2012 at 8:33 PM, Claudio Carbone wrote: > On 12/27/2012 11:20 AM, Andy Ballingall TF wrote: >> Hi, >> >> CZMQ's zl

[zeromq-dev] CZMQ in-depth docs enquiry

2012-12-27 Thread Claudio Carbone
On 12/27/2012 11:20 AM, Andy Ballingall TF wrote: > Hi, > > CZMQ's zloop reactor ( http://czmq.zeromq.org/manual:zloop ) is a > handy thing I didn't know of any of this, I gave a quick look but I can't find any extensive documentation for these features (I was hoping for something like the ZMQ

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Nishant Mittal
upgrading the version to 3.2.2 fixed the issue. thanks to everyone for chiming in :) On Thu, Dec 27, 2012 at 11:47 AM, Nishant Mittal wrote: > Andy, taotetek on IRC suggested to try telnet.. and i confirmed telnet > works in both directions.. so it couldnt be the firewall.. rt? > > pieterh thi

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Pieter Hintjens
Do you want to try fixing that bug, or shall I take a look? -Pieter On Thu, Dec 27, 2012 at 5:41 PM, Andy Ballingall TF wrote: > On 27 December 2012 16:22, Pieter Hintjens wrote: >> Andy, >> >> You can trace this quite simply; print the tickless timer value before >> each zmq_poll in zloop. It

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Nishant Mittal
Andy, taotetek on IRC suggested to try telnet.. and i confirmed telnet works in both directions.. so it couldnt be the firewall.. rt? pieterh thinks it could be the version mismatch on the 2 machines.. 1 has 3.2.0 and the other (my machine) has 3.2.2 I am going to upgrade the version and see if t

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Andy Ballingall TF
... and sudo service iptables start restarts the firewall again, I should add! On 27 December 2012 16:44, Andy Ballingall TF wrote: > On 27 December 2012 16:16, Nishant Mittal wrote: >> they are on the same network.. i can check if Ubuntu firewalls are playing a >> role.. > The easiest thing t

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Andy Ballingall TF
On 27 December 2012 16:16, Nishant Mittal wrote: > they are on the same network.. i can check if Ubuntu firewalls are playing a > role.. The easiest thing to do (if safe to do so) would be to temporarily switch off the firewall entirely. If it starts working, then that's the reason! If you're usin

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Andy Ballingall TF
On 27 December 2012 16:22, Pieter Hintjens wrote: > Andy, > > You can trace this quite simply; print the tickless timer value before > each zmq_poll in zloop. It should change when you add your new timer. Indeed, but even if the value is initially correct, the problem is that the zombie deletion

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Pieter Hintjens
Andy, You can trace this quite simply; print the tickless timer value before each zmq_poll in zloop. It should change when you add your new timer. -Pieter On Thu, Dec 27, 2012 at 5:01 PM, Andy Ballingall TF wrote: > Hi Pieter, > > On 27 December 2012 13:55, Pieter Hintjens wrote: >> On Thu, De

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Nishant Mittal
they are on the same network.. i can check if Ubuntu firewalls are playing a role.. On Thu, Dec 27, 2012 at 11:13 AM, Andy Ballingall TF < balling...@thefoundry.co.uk> wrote: > Could it be a firewall issue? > > On 27 December 2012 16:03, Nishant Mittal wrote: > > Apostolis, client knows how to

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Andy Ballingall TF
Could it be a firewall issue? On 27 December 2012 16:03, Nishant Mittal wrote: > Apostolis, client knows how to resolve 'nishant' and the request is actually > coming to the worker.. its the response thats not going back. > and i tried with IP as well, same result. > > thanks > > > > On Thu, Dec

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Nishant Mittal
Apostolis, client knows how to resolve 'nishant' and the request is actually coming to the worker.. its the response thats not going back. and i tried with IP as well, same result. thanks On Thu, Dec 27, 2012 at 10:36 AM, Apostolis Xekoukoulotakis < xekou...@gmail.com> wrote: > How can the cli

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Andy Ballingall TF
Hi Pieter, On 27 December 2012 13:55, Pieter Hintjens wrote: > On Thu, Dec 27, 2012 at 2:53 PM, Andy Ballingall TF > wrote: > >> Note how my timer registration succeeds, but the polling seems to >> ignore it? > > Then it's because the tickless timer is being miscalculated; it should > be re-calc

Re: [zeromq-dev] Fwd: Beginner question with respect to zmq_proxy

2012-12-27 Thread Apostolis Xekoukoulotakis
How can the client know what "nishant" means? Put the ip address instead. 2012/12/26 Nishant Mittal > Hi All, > I have a zmq_proxy device with ROUTER and DEALER in the front and back > (attached code broker.c) > router binds to tcp://*:5551 and dealer binds to tcp://*:6551 > the client connects

Re: [zeromq-dev] test email

2012-12-27 Thread Nishant Mittal
thanks Joshua and Tom. I was not sure as i just signed up yesterday and sent a question and didnt get any responses yet. thanks Nishant On Thu, Dec 27, 2012 at 10:27 AM, Joshua Foster wrote: > Confirmed > > Nishant Mittal > December 27, 2012 10:26 AM > testing if my emails are going throug

Re: [zeromq-dev] test email

2012-12-27 Thread Tom Wilberding
Got it. -Original Message- From: Nishant Mittal Reply-to: ZeroMQ development list To: zeromq-dev@lists.zeromq.org Subject: [zeromq-dev] test email Date: Thu, 27 Dec 2012 10:26:25 -0500 testing if my emails are going through to the list.. can someone pls confirm. thanks -- Nishant Mit

Re: [zeromq-dev] test email

2012-12-27 Thread Joshua Foster
Confirmed Nishant Mittal December 27, 2012 10:26 AM testing if my emails are going through to the list.. can someone pls confirm.thanks-- Nishant Mittal            Director, Product DevelopmentRosenblatt Securities Inc.20 Broad StreetNew York, NY 10005             Di

[zeromq-dev] test email

2012-12-27 Thread Nishant Mittal
testing if my emails are going through to the list.. can someone pls confirm. thanks -- *Nishant Mittal* Director, Product Development *Rosenblatt Securities Inc*. 20 Broad Street New York, NY 10005 Direct: 212-607-3159 Mobile: 646-504-2629 ___ zeromq-

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Apostolis Xekoukoulotakis
zloop code seems correct. In some old code of mine, that uses zmq_poll , I was creating a socket to wake the poll, which doesnt make sense, since I had also calculated the new timeout before the poll locks the thread. If i remember correctly, I had similar problems. Maybe it was my mistake, or mayb

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Pieter Hintjens
On Thu, Dec 27, 2012 at 2:53 PM, Andy Ballingall TF wrote: > Note how my timer registration succeeds, but the polling seems to > ignore it? Then it's because the tickless timer is being miscalculated; it should be re-calculated each time you add or remove a timer handler. If not, there's a bug.

Re: [zeromq-dev] questions about zmq

2012-12-27 Thread Pieter Hintjens
The blocking probably comes from the receiver not being able to process the messages fast enough, and since you're using PUSH/PULL sockets, when you reach the high-water mark, the sender will block. Solutions: increase HWM, or make recipients faster. On Thu, Dec 27, 2012 at 11:09 AM, Lushuifeng

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Andy Ballingall TF
Hi Pieter, > Good catch. How are you adding/removing timers if not in a handler, > though? As handlers are all finished before the next poll starts, this > should work. I was only adding the timer from within the handler which was called as a result of the reactor receiving a message. I've just p

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Andy Ballingall TF
Hi KIU, On 27 December 2012 11:13, KIU Shueng Chuan wrote: > If you have already started the reactor, are you not then trying to add a > timer from another thread? The code is not thread-safe, so you shouldn't be > doing it. > I was only adding a timer from within a handler attached to the reacto

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread KIU Shueng Chuan
If you have already started the reactor, are you not then trying to add a timer from another thread? The code is not thread-safe, so you shouldn't be doing it. On Dec 27, 2012 6:21 PM, "Andy Ballingall TF" wrote: > Hi, > > CZMQ's zloop reactor ( http://czmq.zeromq.org/manual:zloop ) is a > handy

Re: [zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Pieter Hintjens
Hi Andy, Good catch. How are you adding/removing timers if not in a handler, though? As handlers are all finished before the next poll starts, this should work. -Pieter On Thu, Dec 27, 2012 at 11:20 AM, Andy Ballingall TF wrote: > Hi, > > CZMQ's zloop reactor ( http://czmq.zeromq.org/manual:

[zeromq-dev] questions about zmq

2012-12-27 Thread Lushuifeng
Hi: I'm using zmq(3.2 version) to do message transmission and distribution currently, however, several problems has encountered me and I'm hoping to get help from you, my question is listed as below: First, in order to accelerate the processing speed of the end of the receiving message, I exte

Re: [zeromq-dev] inproc: If first connect occurs before bind, then retries don't seem to succeed...

2012-12-27 Thread Andy Ballingall TF
Hi Pieter, On 22 December 2012 12:06, Pieter Hintjens wrote: > Yes, this seems to be a bug. I've logged an issue > https://zeromq.jira.com/browse/LIBZMQ-487 and uploaded a test case: > https://github.com/zeromq/issues/blob/master/487/issue.c. > Thanks! > However I'd advise against retrying a con

[zeromq-dev] zloop_timer() does not fire if added after zloop_start()...

2012-12-27 Thread Andy Ballingall TF
Hi, CZMQ's zloop reactor ( http://czmq.zeromq.org/manual:zloop ) is a handy thing, but one thing caught me out. In my design, after starting a reactor (with zloop_start()), I wanted to later add a timer (with zloop_timer() ). However, this timer didn't appear to fire when expected (or at all).

Re: [zeromq-dev] Problem routing packet back to client

2012-12-27 Thread Hsiao Henry
Guys I solved the problem. Turns out I can't do this from RESPONDER: ZmqSocket receive_worker = context.CreateSocket(SocketType.PUSH); while (true) { something receive_worker.Connect(response_address); receive_worker.SendMessage(response_zmqmessage); receive_worker.Disc