Re: [zeromq-dev] ZMQ::FFI - Perl bindings using libffi and FFI::Raw
Nice! While I'm at it, I think I'm going to retire developing ZMQ::LibZMQ* and stuff now that you have an FFI version and have an good alternative. To perl guys on this list: holler if you want to take over my ZMQ modules. --d 2013/10/7 Dylan Cali calid1...@gmail.com Hello, I recently released the module ZMQ::FFI for Perl. From the description: ZMQ::FFI exposes a high level, transparent, OO interface to zeromq independent of the underlying libzmq version. Where semantics differ, it will dispatch to the appropriate backend for you. As it uses ffi, there is no dependency on XS or compilation. In addition underlying zmq calls are checked for you, and in the case of an error ZMQ::FFI will die with the appropriate system error message. More information at: https://github.com/calid/zmq-ffi https://metacpan.org/module/ZMQ::FFI Let me know if you have any feedback. Thanks, Dylan ___ 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] ZMQ::LibZMQ3 Installation in windows
So, was there an error while installing? --d 2013/2/8 sudheer kumar sudheerkuma...@ymail.com I followed http://www.zeromq.org/build:mingw for building ZMQ with MinGW : and I get the error: test_connect_delay.cpp:28:21 fatalerror:pthread.h: No such file or directory With Visual studio2008 it is working fine, but I wasn't able to install perl module by using the .dll where I get some build errors. Finally I want to install perl module ZMQ::LibZMQ3 in windows. I browsed much stuff for installing the perl module and the close I get to is https://github.com/lestrrat/ZeroMQ-Perl/issues/12 where Makefile is tweaked. Any pointers to installing zeromq and the perl module on windows would be highly appreciated. Thanks, sudheer ___ 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] ZMQ::LibZMQ3
Pedro, beat you to it. https://metacpan.org/release/DMAKI/ZMQ-LibZMQ3-1.08/ --d 2013/1/19 Pedro Melo m...@simplicidade.org Hi, On Fri, Jan 18, 2013 at 11:28 PM, Nishant Mittal nmit...@rblt.com wrote: I installed zeromq and the perl module on my home machine but when i try to run the worker or client i get these errors...anybody has any clue? $ ./test_client.pl 1 Subroutine ZMQ::LibZMQ3::zmq_init redefined at /usr/local/lib/perl/5.14.2/ZMQ/LibZMQ3.pm line 52. Subroutine ZMQ::LibZMQ3::zmq_term redefined at /usr/local/lib/perl/5.14.2/ZMQ/LibZMQ3.pm line 55. It's a harmless warning. Will be fixed in the next release, I'll patch it if Daisuke doesn't beat me to it. Do you know which version of libzmq are you using? 3.2.2? Bye, -- Pedro Melo @pedromelo http://www.simplicidade.org/ http://about.me/melo xmpp:m...@simplicidade.org mailto:m...@simplicidade.org ___ 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] PR: fix configure help message for --with-libczmq
https://github.com/zeromq/filemq/pull/17 Ditto, as the subject states. --d ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] ZMQ performance
nitpick, but isn't zmq_init() the one that's deprecated, and zmq_ctx_new() its replacement? 2013/1/9 A. Mark gougol...@gmail.com Good guess, but I'm using this one: ctx = zmq_init( threads); from http://api.zeromq.org/3-2:zmq-init with the number of threads parameter passed as a command line argument to the test programs. I assume it should have the same effect as zmq_ctx_set() since zmq_ctx_new is deprecated. So I've tried different number of threads on each end but it doesn't seem to get better performance with more threads. BTW to be precise I have 2 command line arguments to client_zmq: usage: client_zmq connect-to message-size message-count zmq-threads workers So I can set the internal zmq threads as well as how many workers threads to spawn in the client. In server_zmq I can only set the zmq-threads of course. usage: server_zmq connect-to message-size message-count zmq-threads And yes I'm using the same context in the programs. On Tue, Jan 8, 2013 at 7:06 PM, Apostolis Xekoukoulotakis xekou...@gmail.com wrote: Just guessing here. Are you using the same context in all threads and if so, maybe you need to increase the threads that the omq uses inside it. http://api.zeromq.org/3-2:zmq-ctx-set 2013/1/9 A. Mark gougol...@gmail.com OK, so I went back and I fixed a couple of issues and reattached the two modified test programs, added RCV/SND buffer shaping and now it uses zmq_msg_init_data (zero-copy) for better performance. I'm getting about 2.5GB/s avg at best which is a lot better then with remote_thr local_thr but still a 25% less then what I'm expecting at least 3.4GB/s. When I initiate 4 simultaneous procesess(not threads) for each client and server via separate ports the total does add up to ~3.3GB/s as it should. The trouble is for that to work that way I need to bind 4 ports and the whole point in using accept is to have multiple connections on the same port traditionally. Is there a way to achieve the desired throughput via 0MQ without using separate ports for each socket? I think using multiple connections (via separate threads) on the same ZMQ socket should naturally do it but according to the results it doesn't happen. On Mon, Jan 7, 2013 at 7:16 PM, A. Mark gougol...@gmail.com wrote: Hello, I'm very interested in porting my current transfer engine to 0MQ. The current engine is written in pure BSD sockets and has certain limitations that would be easily overcome by QMQ's intelligent and versatile design. However my main concern is performance on very long messages in access of 1MB. The current backbone MT design is the following: control node (client ) --- server A--- worker node 1 --- worker node 1 -- server B | | | worker node 2 --- worker node 2 ---| | | --worker node N --- worker node N -- So the control client controls whatever task needs to be performed by submitting requests to a server, the actual work is done by the worker nodes in each separate thread on the server. The worker nodes are synchronized across the two servers but they work independently since they are working on the same task. Each worker node has it's own FD but connect to the same TCP address and port. The main task of each node is to perform some transformation on some large data buffer from a buffer pool then push the finished result to the other server. My current benchmarks gives me 3.5GBytes/s using TCP over the local loop when simply pushing the buffers without doing any work. I ran the 0MQ benchmarks local_thr and remote_thr, and the performance is only 1.5GB/s at best, with large buffers(messages) and lower with small ones. I'm also concerned looking at the benchmarks for the 10GE test. My current engine can perform at a steady 1.1GBytes/s with large buffers over 10GE. I've also tried a modified version of the two benchmarks to try to emulate the above situation, but the performance is about the same. The modified MT code is attached. Is there something else I need to do to get the best performance out of 0MQ using MT for this work flow engine? ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Sincerely yours, Apostolis Xekoukoulotakis ___ 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 mailing list zeromq-dev@lists.zeromq.org
Re: [zeromq-dev] Perl bindings ZeroMQ block publishing messages to Mojolicous over WebSocket
Please let me know if I am missing something or is there a different way to achieve this. This is wrong: zmq_setsockopt($socket,ZMQ_SUBSCRIBE,ZMQ_NOBLOCK); ** This needs to be two calls: zmq_setsocktop($socket, ZMQ_SUBSRCRIBE, $SUBSCRIBE_STRING); zmq_recvmsg($socket, ZMQ_DONTWAIT); # DONTWAIT == new name for NOBLOCK When in doubt, ALWAYS READ THE DOCS FOR THE C API. `man zmq_setsockopt` would quickly show that DONTWAIT/NOBLOCK doesn't belong there. `man zmq_recvmsg` shows that DONTWAIT should be specified in the flags --d 2013/1/5 Manu Agarwal magar...@rblt.com Hi, ** ** I am trying to write a simple Perl code which subscribe messages from ZeroMQ and publish them over WebSocket using Mojolicious. As soon as I subscribe to zeromq for receiving messages, the websocket sent part stops working. If I try to dump the $self-tx, I see the messages and the correct client information, but no data is being sent. ** ** Please find below a sample code snippet for this, ** ** #!/usr/bin/perl ** ** use strict; use warnings; use Data::Dumper; use Mojolicious::Lite; use ZMQ::LibZMQ3; use ZMQ::Constants qw(:all); ** ** websocket '/paper' = sub { my $self = shift; my $ctxt = zmq_init; my $socket = zmq_socket( $ctxt, ZMQ_SUB ); zmq_connect( $socket, tcp://manu.rsi.com:7000 ); $self-app-log-debug('WebSocket connected.'); $self-send('WebSocket connected.'); zmq_setsockopt($socket,ZMQ_SUBSCRIBE,ZMQ_NOBLOCK); while(my $msg = zmq_recvmsg( $socket )){ $self-send(Received a message data);*** * } zmq_close($socket); }; ** ** app-start; ** ** ** ** Please let me know if I am missing something or is there a different way to achieve this. I am trying a simple glue code, which gets Messages over ZeroMQ and send over Mojo WebSocket. ** ** Thanks Manu ** ** ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev 2013/1/5 Manu Agarwal magar...@rblt.com Hi, ** ** I am trying to write a simple Perl code which subscribe messages from ZeroMQ and publish them over WebSocket using Mojolicious. As soon as I subscribe to zeromq for receiving messages, the websocket sent part stops working. If I try to dump the $self-tx, I see the messages and the correct client information, but no data is being sent. ** ** Please find below a sample code snippet for this, ** ** #!/usr/bin/perl ** ** use strict; use warnings; use Data::Dumper; use Mojolicious::Lite; use ZMQ::LibZMQ3; use ZMQ::Constants qw(:all); ** ** websocket '/paper' = sub { my $self = shift; my $ctxt = zmq_init; my $socket = zmq_socket( $ctxt, ZMQ_SUB ); zmq_connect( $socket, tcp://manu.rsi.com:7000 ); $self-app-log-debug('WebSocket connected.'); $self-send('WebSocket connected.'); zmq_setsockopt($socket,ZMQ_SUBSCRIBE,ZMQ_NOBLOCK); while(my $msg = zmq_recvmsg( $socket )){ $self-send(Received a message data);*** * } zmq_close($socket); }; ** ** app-start; ** ** ** ** Please let me know if I am missing something or is there a different way to achieve this. I am trying a simple glue code, which gets Messages over ZeroMQ and send over Mojo WebSocket. ** ** Thanks Manu ** ** ___ 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] zmq_socket and threads
I hope you are not trying to do this in perl. The perl binding does not allow sharing sockets in between threads, period. --d ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Multipart msgs and Perl
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 message, ZMQ_SNDMORE); # which means, send the first two byts of your message zeromq2.x had the former semantics, zeromq3.x has the latter. And your example would work if you just change zmq_send to zmq_sendmsg, albeit you have zero error detection and you don't check for zmq_getsockopt($socket, ZMQ_RCVMORE), which zmq_recvmsg (3) clearly states. --d 2012/12/28 Nishant Mittal nmit...@rblt.com: 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 help Nishant On Thu, Dec 27, 2012 at 4:29 PM, Pedro Melo m...@simplicidade.org wrote: Hi, On 27/12/2012, at 20:46, Nishant Mittal nmit...@rblt.com 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. Bye, ___ 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 -- Nishant Mittal Director, Product Development Rosenblatt Securities Inc. 20 Broad Street New York, NY 10005 Direct: 212-607-3159 Mobile: 646-504-2629 ___ 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] Multipart msgs and Perl
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 p...@imatix.com: 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 pelletier.mic...@gmail.com 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 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 27, 2012 at 12:46 PM, Nishant Mittal nmit...@rblt.com wrote: 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 ___ 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 mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] CTRL+C
I thought windows doesn't handle SIGINT the way us in unix land expect? http://msdn.microsoft.com/en-us/library/xdkz3x12(v=vs.110).aspx --d 2012/10/30 Pieter Hintjens p...@imatix.com: On Tue, Oct 30, 2012 at 6:31 AM, Balázs Varga bb.va...@gmail.com wrote: I know this link,installing a handler is not a problem,make the blocing calls exit is the problem. Right. The problem for libzmq afair is twofold: one, the OS has to interrupt the blocking call cleanly, which e.g. means in C not allowing SIGINT to kill the process; and two, libzmq has to return EINTR to the caller, which it does since release 2.1 or so. In some runtimes the first part doesn't happen, which suggests the signal is being trapped elsewhere. I know it's been a long-standing difficulty in pyzmq to get this right, so perhaps that's the place to get more help on this. -Pieter ___ 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] Guide, fragments translations
Which repo is this (can't seem to find it)? I'd love to add Perl stuff there. --d 2012/10/22 Pieter Hintjens p...@imatix.com: Hi Folks, Specifically, those who have helped make the language-specific versions in PHP, Python, Lua, and Haxe: I've added a mechanism to translate code fragments (previously only in C) into other languages. The fragments are in the github repo, fragments/ subdirectory. Copy and translate as for examples. We should be able to get PDFs and eBooks that are almost 100% perfect in non-C languages. -Pieter ___ 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] Perl question: ZMQ + AnyEvent
Hi, I'm the maintainer of perl ZMQ modules. I'm away fron my computer atm, so can only guess, but does it work if you put a AnyEvent::Util::fh_nonblocking($fd) before creating the IO watcher? and yes, for new code you should be using ZMQ::LibMQ2. 2012年9月22日土曜日 Robert Olson ol...@mcs.anl.gov: On Sep 21, 2012, at 5:31 PM, Pedro Melo wrote: Hi, On Fri, Sep 21, 2012 at 9:11 PM, Robert Olson ol...@mcs.anl.gov wrote: On Sep 21, 2012, at 2:30 PM, Robert Olson wrote: However, in my client, if I set up AnyEvent to wait for the reply from the broker I am never notified. The client works perfectly if I use a synchronous receive on the socket. Interesting: in the async code if I issue a nonblocking recv() before I drop into the AnyEvent wait code, it works properly. Is this the expected behavior? My gut felling when I read your code was that it was correct, it would be the code I would write in this situation. Adding that nonblocking read seems to be clearing some flag that signals the socket as nothing more to read at the moment but I don't remember the existence of such a flag… I would do one thing though: move from ZeroMQ binding to the new ZMQ bindings. The second ones are written as a direct map to the C API (like ZeroMQ::Raw) but are supported, where as ZeroMQ has several open bugs without answers. One particular problem is with ZeroMQ and fork's, you'll get a libzmq assertion. Fixed in ZMQ. Ah, excellent - I hadn't come across the ZMQ bindings. I'll look into that. Thanks. --bob ___ 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] Pull request to retire devices and replace with proxies
Please be considerate of downstream users and keep the zmq_device() stuff for the duration of the current major release? I mean you can add a zmq_proxy() by all means, but please keep zmq_device() as an alias, along with any constants (if any) that has to do with the device stuff so our existing code still work. Once the major version number bumps up, go ahead and remove it. This would make us binding authors' life much easier. --d 2012/9/8 MinRK benjami...@gmail.com: On Fri, Sep 7, 2012 at 12:48 PM, Nathan nathan.sto...@gmail.com wrote: On Fri, Sep 7, 2012 at 12:39 PM, MinRK benjami...@gmail.com wrote: On Fri, Sep 7, 2012 at 3:25 AM, Ian Barber ian.bar...@gmail.com wrote: On Fri, Sep 7, 2012 at 11:03 AM, Pieter Hintjens p...@imatix.com wrote: Hi all, From https://github.com/zeromq/libzmq/pull/422 LGTM. I think the proxy name fits the concept better, particularly with the capture socket option (which is very akin to the monitored device in pyzmq iirc). It kind of frees up the language as well - if someone does want to build a little service that does some work they can call it a device without it being confused with the zmq_device function to - though as you say that hasn't happened that much! I agree that proxy is a better name, though I am not certain the cost of renaming is outweighed by the better name. I have a practical question as maintainer of pyzmq. PyZMQ has a notion of 'devices', e.g. from zmq.devices import monitored_queue for the device derivative Ian alluded to, or from zmq.devices import ThreadDevice for a class that runs zmq_device in a GIL-less background thread Does this suggest that I should now be moving these to zmq.proxies, and zmq.proxies.ThreadProxy? I know I will get loads of complaints from users for changing APIs simply because the name is better, but at least I can tell them to email Pieter :) One comment on the capture socket: When I wrote the monitored queue which does essentially the same thing, I needed direction information (whether the message came from the frontend or the backend), rather than just publishing everything as-is. This allows a design where one SUB socket can monitor messages from a collection of proxies, and know where messages are coming from (frontend/backend as well as which proxy). If you are concerned about keeping backwards compatibility it is as easy as leaving a devices module with: ThreadDevice = proxies.ThreadProxy etc. ...and documenting that they are deprecated, point to what to use going forward, and removing the compatibility layer at some point in the future. Yes, I would certainly do that. But deprecating names is not significantly less painful than simply changing them, as people still have to update their code in the exact same way, just not so abruptly. And they will rightfully complain that they are getting nothing for their trouble. ~ Nathan ___ 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 mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Pull request to retire devices and replace with proxies
I'm just trying to avoid seeing 2.x - 3.0 - 3.x nightmare by being vocal. The 'current' major release is actually 2.x, which is unaffected. There has still yet to be a single stable 3.x release. But 3.x has been released. People download it, and I have a few users for the binding. Yeah, so it's not stable so I'd be okay seeing bugs, but /if/ it were to break compatibility in terms of a function rename (which means it's not a change for functionality) and my users complain to me, which in turn will make me be pissed as hell (yes, I know it's not going to happen in this particular point) I'm just making sure it's taken into account by actually voicing that I care. And if it is, then by all means, please push the innovation forward. So just to recap: * I dig bug fixes, new features * I DONT dig gratuitous aesthetic changes w/o back-compatibility * I'm just making sure that there's somebody thinking about it, because if nobody says it out loud and it slips by, I'm the one to blame In this case it looks like it is taken care of, so my job is done :) Thanks, --d ___ 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
Hi, FYI I have gone on to restructure the Perl bindings like so: https://github.com/lestrrat/p5-ZMQ/ # they are also available on CPAN basically, I moved out the version specific stuff out to ZMQ::LibZMQ2 and ZMQ::LibZMQ3 so that I don't have to put #ifdef s all over the place. porting from ZeroMQ to ZMQ::LibZMQ* should be pretty straight forward. Please let me know if you have problems at https://github.com/lestrrat/p5-ZMQ/issues --d 2012/7/17 Marko Trajkov markostraj...@gmail.com: 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
Here's a working example using ZMQ::LibZMQ2 https://gist.github.com/3129346 Maybe I wasn't explicit enough, but ZeroMQ.pm is done for. I'm no longer going to maintain it. please use ZMQ::LibZMQ2 or ZMQ::LibZMQ3 --d 2012/7/17 Marko Trajkov markostraj...@gmail.com: Hi, thanks for replays, I really appreciate it, but I still didn't have success in making it working. Server binds on tcp://192.168.109.255:5560 (my local address) and client connect to same address, bat they don't communicate. When they try to receive data (recv()-data;) both becomes blocked. In the example, client sends Hello but when I use tcpdump to monitor all traffic, I don't see that anything was sent. By the way, is it possible to use UDP sockets in ZeroMQ, I don't see that something like this is possible in the guide, only (inproc, ipc, tcp, pgm, epgm). Kind Regards, Marko Trajkov On Mon, Jul 16, 2012 at 9:38 AM, Marko Trajkov markostraj...@gmail.com 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 mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
[zeromq-dev] zmq_init(-1) on libzmq master
Hi, I asked this earlier in IRC: 11:38 lestrrat: shouldn't zmq_init( -1 ) be an error (i.e. return NULL) ?seems like a check used to exist until 6e71a54b, but after that it's gone Is this intentional? It used to return NULL until the above commit. --d ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Getting 0MQ/3.1 to stable status
nice. I'll rename the perl binding to ZMQ for 3.1 support as well --d 2012/02/17 8:14 Pieter Hintjens p...@imatix.com: Hi all, It's probably a good time to start moving 0MQ/3.1 towards stable status. Several things you can do to help: * If you have outstanding issues in 3.1 that you need fixed, please remind us of them * If you're maintaining a language binding, make sure you have 3.1 support in place * If you're maintaining documentation that refers to 2.1, time to start making a 3.1 upgrade We may be able to get all our projects ready for a 3.1 release candidate within 2-3 weeks. -Pieter ___ 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] Question: release policies and v3.x
From my perspective, the bottom line is: Just decide what you guys want to do and stick to it Because that will be easier to explain in my docs for my users. So in that sense, while I don't care which way or the other engineering-wise, if you've already released 3.x with IDENTITY (whoops), I'd rather wait till 4.0 to see the deprecation/removal --d 2011/7/18 Pieter Hintjens p...@imatix.com: Hi all, A question to the list about release policies[1] and the 3.x development. Background: we are removing ZMQ_IDENTITY from the product, it's a necessary step to continuing to improve the product. (Incidentally, if you are using ZMQ_IDENTITY, let us know your use case). The current release policies require that we start a 4.0 branch to make this change, since it would break compatibility with 3.0 applications. Does people (and especially binding authors) prefer: (a) starting a 4.0 version for this work (which means that 3.x will stop when 3.0.x is mature) (b) doing this work in 3.1, and changing the release policies to allow this. Thanks Pieter [1] http://www.zeromq.org/docs:policies ___ 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] Trademark policy for 0MQ
1. Initial Reaction = I understand that you need to set the rules, so I'm not against the trademark stuff in principle, but I'm a bit upset at how this came about to be - Especially the fact that I was pretty much just told to change the name of the Perl binding without any forewarning. As for the perl binding name, it's very uncommon for perl bindings to have a Perl- prefix as suggested in the trademark page. In this (perl) culture having such a prefix looks extremely lame. Also, I think the wording on the trademark page looks hostile. That's part why I'm being pissy - I felt like I was threatened. As discussed separately in IRC, something like the Debian trademark ( http://www.debian.org/trademark ) would have made me feel little more secure about it. 2. In Search Of A Compromise === Now having expressed my pissy reaction, let me try to be a bit more constructive... If you insist on the package changing its name, fine. The owners have the final say, so I'll comply. But for the perl binding I at least need a good alternative name suggestion. Perl culture doesn't use the Perl prefix. If you want to put a prefix, either a package/software name or term that describes the module's nature is used: e.g. Net::SNMP, Test::Exception, etc. I really don't have a good candidate for zeromq. Net::ZeroMQ? Yeah, sure it's network related, but it feels weird. ZeroMQ is ZeroMQ... that's why the previous owner ( who started the perl binding ) named it so. 3. Concerns = The other side effect of a rename is that I'd have to tell all of my users (which, I don't know how many there are, so it might or might not be a significant number) to switch the module name. Granted, it's just a simple search/replace, but it's a hassle that I'd have to impose on them nonetheless. I personally don't feel like it's worth it at this point. 4. Summary = * I understand you need to have a guideline. * If you really insist, the name for the perl binding can be changed. * I currently don't have a good alternative name. * I personally don't feel the naming is worth the trouble. * The wording on that trademark page looks very hostile. Can you please adjust the wording on that trademark page so that it's more relaxed? So yeah, I understand why this is necessary, and I'm not against the principle. But I don't like how it's handled, I don't like how it's worded, and I don't think forcing a rename on a binding is worth it. An please next time, send me a friendly warning before filing an issue? I'm usually not this pissy, and I usually just comply with such guidelines (I'm an obedient Japanese guy, remember?) Regards, --d 2011/5/12 Pieter Hintjens p...@imatix.com: Hi all, I've written down a provisional policy for use of the 0MQ-related trademarks, here: http://www.imatix.com/trademark-policy The intention is to prevent confusion from other products that call themselves zeromq and prevent forks that live outside the 0MQ community. Please discuss, if this is an aspect you care about. -Pieter ___ 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] 0MQ stable release 2.1 (v2.1.2, rc2) released
woot! zeromq team++ --d 2011/3/6 Pieter Hintjens p...@imatix.com: Hi all, We're pleased to announce that 0MQ stable release 2.1 (v2.1.2, rc2) has been released and is available for download at: * http://download.zeromq.org/zeromq-2.1.2.tar.gz (UNIX line endings) * http://download.zeromq.org/zeromq-2.1.2.zip (Windows line endings) This 2.1 release candidate is considered highly stable especially over 2.0.10. We recommend you use this release for all 0MQ projects where possible. It fixes several memory leaks since rc1, and OpenPGM should be working properly again. The release notes follow this email; full details can of course be found in the ChangeLog included in the distribution. - Pieter Hintjens iMatix 0MQ version 2.1.2 (rc2), released on 2011/03/06 === Bug fixes - * 0MQ now correctly handles durable inproc sockets; previously it ignored explicit identities on inproc sockets. * Various memory leaks were fixed. * OpenPGM sender/receiver creation fixed. ___ 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] perl binding build errors
Hey, I just noticed this now, but please check and report issues under http://github.com/lestrrat/ZeroMQ-Perl. that is where currently development is taking place, and if you file issues elsewhere, I don't get notified. Thanks, --d 2011/1/11 Vick Khera vi...@khera.org: On Mon, Jan 10, 2011 at 9:29 AM, Pieter Hintjens p...@imatix.com wrote: Looks like you're using the wrong (out of date) version of ZeroMQ. Take the current git master, it'll probably work better. Thanks. Using the 2.1.0 tarball I was able to build the perl module. I started to use the git sources, but there are no man pages with that type of install, and that was slowing me down... yes, I'm an old school man page reader. :) ___ 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] 0MQ version 2.1.0 (Beta) released
woot! --d 2010/12/2 Martin Lucina m...@kotelna.sk: Hi all, we're pleased to announce that 0MQ version 2.1.0 (Beta) has been released and is available for download at: * http://download.zeromq.org/zeromq-2.1.0.tar.gz (UNIX line endings) * http://download.zeromq.org/zeromq-2.1.0.zip (Windows line endings) As part of improving the 0MQ downloads, we have a new download host, http://downloads.zeromq.org/. We will eventually remove the old tarballs hosted on Wikidot. You can also find MD5 and SHA-1 checksums of all recent released files at the above location. This release is the result of many months of work -- many bugs have been fixed but no doubt some new ones have been introduced so at this stage we consider this Beta quality. If you are starting a new project with 0MQ, we strongly recommend that you go with 2.1.0. Thanks to everyone who contributed to the release, especially Martin Sustrik for his hard work on the new socket shutdown semantics and Mikko Koppanen for refactoring the autoconf build system. The release notes follow this email; full details can of course be found in the ChangeLog included in the distribution. Note that at the moment the reference manual at http://api.zeromq.org/ is still for the 2.0.x stable release; this will be updated later; refer to the included man pages/HTML instead. Enjoy! -mato 0MQ version 2.1.0 (Beta), released on 2010/12/01 New functionality - * New semantics for zmq_close () and zmq_term () ensure that all messages are sent before the application terminates. This behaviour may be modified using the new ZMQ_LINGER socket option; for further details refer to the reference manual. * The new socket options ZMQ_FD and ZMQ_EVENTS provide a way to integrate 0MQ sockets into existing poll/event loops. * Sockets may now be migrated between OS threads, as long as the application ensures that a full memory barrier is issued. * The 0MQ ABI exported by libzmq.so has been formalised; DSO symbol visibility is used on supported platforms to ensure that only public ABI symbols are exported. The library ABI version has been set to 1.0.0 for this release. * OpenPGM has been updated to version 5.0.92. This version no longer depends on GLIB, and integration with 0MQ should be much improved. * zmq_poll() now honors timeouts precisely, and no longer returns if no events are signaled. * Blocking calls now return EINTR if interrupted by the delivery of a signal; this also means that language bindings which previously had problems with handling SIGINT/^C should now work correctly. * The ZMQ_TYPE socket option was added; this allows retrieval of the socket type after creation. * Added a ZMQ_VERSION macro to zmq.h for compile-time API version detection. * The ZMQ_RECONNECT_IVL and ZMQ_BACKLOG socket options have been added. Bug fixes - * Forwarder and streamer devices now handle multi-part messages correctly. * 0MQ no longer asserts when malformed data is received on the wire. * 0MQ internal timers now work correctly if the TSC jumps backwards. * The internal signalling functionality (mailbox) has been improved to automatically resize socket buffers on POSIX systems. * Many more. Building * 0MQ now builds correctly with many more non-GCC compilers (Sun Studio, Intel ICC, CLang). * AIX and HP-UX builds should work now. * FD_SETSIZE has been set to 1024 by default for MSVC builds. * Windows builds using GCC (MinGW) now work out of the box. Distribution * A simple framework for regression tests has been added, along with a few basic self-tests. The tests can be run using make check. ___ 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] Making language bindings work with both maint andmaster
I'm not sure why master and maint are featured here -- are we talking about the scenario where version X was released, but before version X + 1 is released and master still has the version number X ? If the above is correct, why don't zmq simply up the internal version number to X + 1 upon the release of X ? Oh wait, or are you saying that currently there's no way to figure out the version of zmq before compiling the bindings? If that's the case I'd rather have a command line utility zmq-config, rather than a typedef so I can detect it even before I start compiling my binding. (Yes, I know we've already had this discussion elsewhere) As for using the same baseline for bindings and the libzmq version, I'm very against it. Maintaining binding modules on CPAN has often showed that this causes more pain to the users (not the maintainers) unless we're actually bundling the bindings with the main library (which I'm also against, because that's just not how Perl works) I think each language would have a preferred way to maintain such bindings, and to tie the main library and the bindings like that may work for one language, but would cause severe pain for others. I'd vote for a much looser coupling of between the main library and the bindings, such as via #define ZMQ_VERSION or an external script like zmq-config I proposed above. --d 2010/10/3 Martin Sustrik sust...@250bpm.com: Joshua, That may actually work. Thoughts anyone? Martin On 10/03/2010 03:12 AM, Joshua Foster wrote: Another approach is to tag the binding's baseline with the version that it matches. That way if we want to use 2.0.8, we just update to that tag. If there is a version specific fix, we can always create a small branch for that version. Joshua On 10/2/2010 4:34 PM, Mikko Koppanen wrote: On Sat, Oct 2, 2010 at 9:01 PM, Martin Sustriksust...@250bpm.com wrote: On 10/02/2010 09:59 PM, gonzalo diethelm wrote: My suggestion was to have #define macros to identify the version of 0MQ against which a binding is being compiled. Something like ZMQ_MAJOR, ZMQ_MINOR, etc. Or a single #define ZMQ_VERSION to 20101002 (MMDD). Yeah, something like that. Let's see what other binding maintainer say about the topic. Hi, Things such as ZMQ_TYPE are easy to ifdef out based on the constant but breaks in functionality or API are possibly harder without 'pre-processor-checkable' version number. Let's say I wanted certain functionality to be present if libzmq version is 2.1.1 or higher. With version id it would be the following (major,three digits for minor,three digits for patch) #if ZMQ_VERSION_ID= 2001001 Where as with ZMQ_MAJOR/MINOR/PATCH it would be: #if ZMQ_MAJOR 2 || (ZMQ_MAJOR == 2 ZMQ_MINOR= 1 ZMQ_PATCH= 1) I guess this is a matter of taste but I prefer the former one (there is no harm in defining both). What would be the benefit of using MMDD instead of the actual version number? ___ 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 mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Making language bindings work with both maint andmaster
Yeah, I know, I let that slip by on purpose. I guess I didn't fool anyone ;) --d 2010/10/4 Mikko Koppanen mikko.koppa...@gmail.com: On Mon, Oct 4, 2010 at 7:29 AM, Daisuke Maki lestr...@gmail.com wrote: Oh wait, or are you saying that currently there's no way to figure out the version of zmq before compiling the bindings? If that's the case I'd rather have a command line utility zmq-config, rather than a typedef so I can detect it even before I start compiling my binding. (Yes, I know we've already had this discussion elsewhere) Hi, you can use pkg-config --modversion libzmq for this. -- Mikko Koppanen ___ 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] Using multiple contexts
My tests do this in the same file: { # test case 1 my $ctxt = ZeroMQ::Context-new(); # internally calls zmq_init(); ... test code here } # contxt freed { # test case 2 my $ctxt = ZeroMQ::Context-new(); # internally calls zmq_init(); ... test code here } # contxt freed should this work? And how about when you fork? Who should own the context? the parent? the child? or should it be shared? --d 2010/9/14 Martin Sustrik sust...@250bpm.com: Hi Pieter, One frequent misuse of 0MQ is that newbies tend to open multiple context objects with no apparent reason. What about explaining the correct usage in the user guide? The _only_ use case for multiple contexts is this one: Person A writes a library using 0MQ. Person B writes another library using 0MQ. Person C links both libraries to his application. If each haven't had a separate context the two 0MQ instances would clash. Name clashes in the shared namespace for inproc endpoints. How many I/O threads to launch, A's amount or B's amount? etc. In short: If you are writing an application use _one_ context object. Another context object can arrive in the process only by linking with a different application. Martin ___ 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] 0MQ process, stability guarantees, releases etc.
Hi, So, from now on, all the contributors to zeromq2 repo, to both master and maint branches -- even those that had direct commit access in the past -- are going to send patches to the mailing list. I will then apply them (or reject them) in such a way to ensure that versioning contract is fulfilled. I'm by no means an active developer to this project, but I just wanted to make sure that you're not discouraging accepting git pull requests -- sending diffs/patches to the mailing list is so 20th century ;) Since you're all using github, just fork 0mq, create your own branch, work on it, and notify you guys for a review + merge. that's all it takes, and it's a heck of a lot easier than applying myriads of patches in random order. Just my $.02 while I wait for 2.1 to come out... ;) --d ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev
Re: [zeromq-dev] Topic branch for EINTR work
Hi, Works for me! Verified using my test script for Plack-Handler-Mongrel2 --d 2010/9/4 Martin Sustrik sust...@250bpm.com: Hi Brian, Chuck, Lestrrat, There's eintr branch in zeromq/zeromq2 repo at github. The blocking calls (zmq_send, zmq_recv and zmq_poll) should return EINTR in case of Ctrl+C. Can you please check it whether it works as expected? Thanks. Martin ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev