From steve.shuo.feng at gmail.com Mon Jul 2 09:56:50 2012 From: steve.shuo.feng at gmail.com (Feng Shuo) Date: Mon, 2 Jul 2012 15:56:50 +0800 Subject: [zeromq-dev] OpenSUSE Build Service for ZeroMQ In-Reply-To: References: Message-ID: Hi Pieter, I created the page at http://www.zeromq.org/distro:opensuse. Since I'm not a native English speaker, I'm very happy if anyone could review the page and fix any grammar issues. :-) On Thu, Jun 28, 2012 at 4:04 PM, Pieter Hintjens wrote: > On Wed, Jun 27, 2012 at 3:43 PM, Feng Shuo > wrote: > > > Just an update. I create two upstream builds in the OBS by it's "git > source" > > service. Whenever there is a commit, OBS will pull the updates and do a > on > > all platforms... > > Nice. On the http://www.zeromq.org/community page there is a section > for builds and distros, and you might add an OpenSUSE page here > (http://zeromq.distro:opensuse). > > -Pieter > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Feng Shuo Tel: (86)10-59851155-2116 Fax: (86)10-59851155-2008 Tianjin Zhongke Blue Whale Information Technologies Co., Ltd 10th Floor, Tower A, The GATE building, No. 19 Zhong-guan-cun Avenue Haidian District, Beijing, China Postcode 100080 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120702/305e54b9/attachment.htm From ph at imatix.com Mon Jul 2 12:02:32 2012 From: ph at imatix.com (Pieter Hintjens) Date: Mon, 2 Jul 2012 19:02:32 +0900 Subject: [zeromq-dev] OpenSUSE Build Service for ZeroMQ In-Reply-To: References: Message-ID: Steve, Looks great, and I didn't see a single spelling or grammar issue... :) -Pieter On Mon, Jul 2, 2012 at 4:56 PM, Feng Shuo wrote: > I created the page at http://www.zeromq.org/distro:opensuse. Since I'm not a > native English speaker, I'm very happy if anyone could review the page and > fix any grammar issues. :-) From dacmorton at gmail.com Mon Jul 2 17:09:15 2012 From: dacmorton at gmail.com (Daniel Morton) Date: Mon, 2 Jul 2012 15:09:15 +0000 (UTC) Subject: [zeromq-dev] Make Install Error Message-ID: I run ./configure and make seemingly without incident; make check passes all 9 tests but when I run make install I get the following error message: Making install in src test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" /bin/sh ../libtool --mode=install /usr/bin/install -c libzmq.la '/usr/local/lib' libtool: install: /usr/bin/install -c .libs/libzmq.1.dylib /usr/local/lib/libzmq.1.dylib install: /usr/local/lib/libzmq.1.dylib: Permission denied make[2]: *** [install-libLTLIBRARIES] Error 71 make[1]: *** [install-am] Error 2 make: *** [install-recursive] Error 1 What isn't working? From pelletier.michel at gmail.com Mon Jul 2 17:45:59 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 2 Jul 2012 08:45:59 -0700 Subject: [zeromq-dev] Make Install Error In-Reply-To: References: Message-ID: By default make install installs to /usr/local which requires root permissions. You can either run make install as root or pass "--prefix=/different/path" to configure to install it to a different path. -Michel On Mon, Jul 2, 2012 at 8:09 AM, Daniel Morton wrote: > I run ./configure and make seemingly without incident; > make check passes all 9 tests but when I run make > install I get the following error message: > > > Making install in src > test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" > /bin/sh ../libtool --mode=install /usr/bin/install -c libzmq.la '/usr/local/lib' > libtool: install: > /usr/bin/install -c .libs/libzmq.1.dylib /usr/local/lib/libzmq.1.dylib > install: /usr/local/lib/libzmq.1.dylib: Permission denied > make[2]: *** [install-libLTLIBRARIES] Error 71 > make[1]: *** [install-am] Error 2 > make: *** [install-recursive] Error 1 > > What isn't working? > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From minling.ann at gmail.com Mon Jul 2 12:19:20 2012 From: minling.ann at gmail.com (=?Big5?B?qvSx07lh?=) Date: Mon, 2 Jul 2012 18:19:20 +0800 Subject: [zeromq-dev] zeromq epgm transport cannot work Message-ID: hi~ There are some problems when i use the zeromq epgm transport. My system is ubuntu 12.04. I have built the source with --with-pgm option. Problem 1: zmq_bind(socket, "epgm://eth0;224.0.0.1:5555"); zmq_connect(socket, "epgm://eth0;224.0.0.1:5555"); even i place the eth0 with it's ip address but both sides have error message: Assertion failed: res != NULL (pgm_socket.cpp:137) Abort (core dumped) Problem 2: zmq_bind(socket, "epgm://*;224.0.0.1:5555"); zmq_connect(socket, "epgm://*;224.0.0.1:5555") There are no error message but the receiver side doesn't receive any messages. Please help me. I don't know what's wrong. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120702/003158a8/attachment.htm From steven.mccoy at miru.hk Mon Jul 2 19:13:36 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Mon, 2 Jul 2012 13:13:36 -0400 Subject: [zeromq-dev] zeromq epgm transport cannot work In-Reply-To: References: Message-ID: On Monday, 2 July 2012, ??? wrote: > hi~ > > There are some problems when i use the zeromq epgm transport. > > My system is ubuntu 12.04. > > I have built the source with --with-pgm option. > > Problem 1: > > zmq_bind(socket, "epgm://eth0;224.0.0.1:5555"); > zmq_connect(socket, "epgm://eth0;224.0.0.1:5555"); > > even i place the eth0 with it's ip address but both sides have error > message: > > Assertion failed: res != NULL (pgm_socket.cpp:137) > Abort (core dumped) > > Problem 2: > > zmq_bind(socket, "epgm://*;224.0.0.1:5555"); > zmq_connect(socket, "epgm://*;224.0.0.1:5555") > > There are no error message but the receiver side doesn't receive any > messages. > > Please help me. I don't know what's wrong. > > Thanks. > If this is the 3.x release candidate please try git head instead. This is a known and resolved defect. -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120702/2376fdc5/attachment.htm From lists at chuckremes.com Mon Jul 2 20:48:25 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 2 Jul 2012 13:48:25 -0500 Subject: [zeromq-dev] daily build cluster question Message-ID: <96219A52-FDEA-4377-9ED4-6C17B00C0E6B@chuckremes.com> I see on the #zeromq.build channel that the ffi-rzmq gem has failures on Debian linux. I'm the maintainer of that gem and would like to fix those failures. On my OSX box *and* my Archlinux box, the specs all pass. What version of Debian Linux (3, 4, 5 or 6) should I install to match the build cluster so I can reproduce this problem? cr From tolitius at gmail.com Mon Jul 2 20:48:09 2012 From: tolitius at gmail.com (Anatoly) Date: Mon, 2 Jul 2012 14:48:09 -0400 Subject: [zeromq-dev] Releasing RAM in Chunks Message-ID: ?MQ Crowd, Reading messages from a socket, placing them on the zmq (PUSH). On the other side reading messages of off the queue (PULL) and persisting them in to DB. If we get millions of messages, ?MQ takes X GB of RAM (since the pushing in this case is at much higher speed than pulling that waits for a DB for each pull), and does not release these Gigs until ALL of the messages are consumed (e.g. pulled). Is there a way to configure it to release memory in chunks as the queue is being emptied? Thank you, /Anatoly -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120702/410882f6/attachment.htm From lists at chuckremes.com Mon Jul 2 20:53:52 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 2 Jul 2012 13:53:52 -0500 Subject: [zeromq-dev] Releasing RAM in Chunks In-Reply-To: References: Message-ID: <5497E2E4-701F-485D-9E1D-EFB9AA242BD3@chuckremes.com> On Jul 2, 2012, at 1:48 PM, Anatoly wrote: > ?MQ Crowd, > > Reading messages from a socket, placing them on the zmq (PUSH). On the other side reading messages of off the queue (PULL) and persisting them in to DB. > > If we get millions of messages, ?MQ takes X GB of RAM (since the pushing in this case is at much higher speed than pulling that waits for a DB for each pull), and does not release these Gigs until ALL of the messages are consumed (e.g. pulled). > > Is there a way to configure it to release memory in chunks as the queue is being emptied? What you have posted should not be true. The memory for a message will be released when you call zmq_msg_close(). If you are making that call and the memory isn't freed, then there is a bug. See the man page at http://api.zeromq.org/2-2:zmq-msg-close If you see something different, then please provide an example (written in C) that demonstrates the problem and open a bug. Thank you. cr From justin at affinix.com Mon Jul 2 21:57:33 2012 From: justin at affinix.com (Justin Karneges) Date: Mon, 2 Jul 2012 12:57:33 -0700 Subject: [zeromq-dev] HWM behaviour & blocking In-Reply-To: References: <4FAA0461.1050205@steffen-mueller.net> <201206281106.38406.justin@affinix.com> Message-ID: <201207021257.33721.justin@affinix.com> On Friday, June 29, 2012 06:13:53 AM Paul Colomiets wrote: > On Thu, Jun 28, 2012 at 9:06 PM, Justin Karneges wrote: > > It's really just for functional completeness of my event-driven wrapper. > > The only time I can see this coming up in practice is an application > > that pushes a message just before exiting. > > > > For now, I set ZMQ_LINGER to 0 when a socket object is destroyed, making > > the above application impossible to create. What I'm thinking of doing > > now is offering an alternate, blocking-based shutdown method. This would > > violate the spirit of my wrapper, but may work well enough for apps that > > finish with a single socket doing a write-and-exit. > > I think you should just set linger and use it. zmq_close() doesn't > block. The zmq_term() blocks. Wow, silly me working around a non-problem. I was assuming zmq_close() blocked. Thanks for clarifying. Justin From ph at imatix.com Tue Jul 3 02:02:38 2012 From: ph at imatix.com (Pieter Hintjens) Date: Tue, 3 Jul 2012 09:02:38 +0900 Subject: [zeromq-dev] Releasing RAM in Chunks In-Reply-To: References: Message-ID: Anatoly, The standard causes for memory exhaustion are, in order: * You're forgetting to close messages, or doing it at the wrong time. * Your consumer is unable to process messages at full speed, so the queue builds up. In the second case you need to decide how you want to handle the excess. -Pieter On Tue, Jul 3, 2012 at 3:48 AM, Anatoly wrote: > ?MQ Crowd, > > Reading messages from a socket, placing them on the zmq (PUSH). On the > other side reading messages of off the queue (PULL) and persisting them in > to DB. > > If we get millions of messages, ?MQ takes X GB of RAM (since the pushing > in this case is at much higher speed than pulling that waits for a DB for > each pull), and does not release these Gigs until ALL of the messages are > consumed (e.g. pulled). > > Is there a way to configure it to release memory in chunks as the queue > is being emptied? > > Thank you, > /Anatoly > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From steve.shuo.feng at gmail.com Tue Jul 3 08:40:33 2012 From: steve.shuo.feng at gmail.com (Feng Shuo) Date: Tue, 3 Jul 2012 14:40:33 +0800 Subject: [zeromq-dev] OpenSUSE Build Service for ZeroMQ In-Reply-To: References: Message-ID: Thank you. I also added pages for RHEL/CentOS and SLES. http://www.zeromq.org/distro:centos and http://www.zeromq.org/distro:sles On Mon, Jul 2, 2012 at 6:02 PM, Pieter Hintjens wrote: > Steve, > > Looks great, and I didn't see a single spelling or grammar issue... :) > > -Pieter > > On Mon, Jul 2, 2012 at 4:56 PM, Feng Shuo > wrote: > > > I created the page at http://www.zeromq.org/distro:opensuse. Since I'm > not a > > native English speaker, I'm very happy if anyone could review the page > and > > fix any grammar issues. :-) > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Feng Shuo Tel: (86)10-59851155-2116 Fax: (86)10-59851155-2008 Tianjin Zhongke Blue Whale Information Technologies Co., Ltd 10th Floor, Tower A, The GATE building, No. 19 Zhong-guan-cun Avenue Haidian District, Beijing, China Postcode 100080 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120703/089eec34/attachment.htm From paul at colomiets.name Tue Jul 3 10:25:26 2012 From: paul at colomiets.name (Paul Colomiets) Date: Tue, 3 Jul 2012 11:25:26 +0300 Subject: [zeromq-dev] Releasing RAM in Chunks In-Reply-To: References: Message-ID: Hi Anatoly, On Mon, Jul 2, 2012 at 9:48 PM, Anatoly wrote: > ?MQ Crowd, > > Reading messages from a socket, placing them on the zmq (PUSH). On the > other side reading messages of off the queue (PULL) and persisting them in > to DB. > > If we get millions of messages, ?MQ takes X GB of RAM (since the pushing > in this case is at much higher speed than pulling that waits for a DB for > each pull), and does not release these Gigs until ALL of the messages are > consumed (e.g. pulled). > > Is there a way to configure it to release memory in chunks as the queue > is being emptied? > Unless you do something wrong, as others described. The effect you see may be because of memory fragmentation, so as last resort you can try to link your app against jemalloc, as there is evidence that jemalloc handles fragmentation better. In any case please report what fixed the problem. -- Paul From rblists at gmail.com Wed Jul 4 12:05:53 2012 From: rblists at gmail.com (Raphael Bauduin) Date: Wed, 4 Jul 2012 12:05:53 +0200 Subject: [zeromq-dev] Interrupted System Call: advice to handle it Message-ID: Hi, I'm using the ruby zmq bindings in a web application. I regularly get error message "ZMQ::Error: Interrupted system call" related to a send. This is in a Ruby on Rails application served with passenger, which spawns worker processes. I think I have identified a process that generated this error, and an strace on it shows no activity at all. This process however keeps open a connection to the mysql server. An accumulation of such errors will eventually become problematic server side, in addition to clients getting an error page and messages being lost. I'm looking for advice in avoiding this error and possibly for further debugging hints. Related to that I have several questions: - Should I simply catch this exception, and retry the send if needed? As this is done in the process sending the page content back to the client, won't it possibly make some requests too slow? (This could still be better than an error as we have currently) - If my understanding is correct, the problem occurs with blocking syscalls, and requests having the error don't return any content to the client. But what happens if I make the send non blocking? (http://zeromq.github.com/rbzmq/classes/ZMQ/Socket.html#M000010) - Finally, what might interrupt the syscall? Any interesting read about this? Thanks in advance Raph From krikun.daniel at gmail.com Wed Jul 4 12:22:08 2012 From: krikun.daniel at gmail.com (Daniel Krikun) Date: Wed, 4 Jul 2012 13:22:08 +0300 Subject: [zeromq-dev] match request and reply Message-ID: Hello, I'm building a service-oriented system. A client sends a request to create some entity on the server. The server creates the entity and then replies with the entity's handle, so that the client can send more requests regarding the entity (i.e. modify/delete it). I need to match the request to create an entity with the reply containing its handle (otherwise a client could potentially confuse between different entities' handles). Is there any recommended way do that in zeromq? Any 'best practices'? If I understand that correctly, using REQ-REP socket combination ensures that the reply will match the request, however: 1. The server is multi-threaded and does not ensures first-come-first-served policy 2. Some request are left without reply intentionally, which is not possible with REQ-REP, so I actually use DEALER-DEALER combination. Regards, -- Daniel Krikun -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120704/1c2df728/attachment.htm From lists at chuckremes.com Wed Jul 4 17:16:11 2012 From: lists at chuckremes.com (Chuck Remes) Date: Wed, 4 Jul 2012 10:16:11 -0500 Subject: [zeromq-dev] match request and reply In-Reply-To: References: Message-ID: <84DCE31A-B237-4DC9-879F-AEA0A819D3BF@chuckremes.com> On Jul 4, 2012, at 5:22 AM, Daniel Krikun wrote: > Hello, > > I'm building a service-oriented system. A client sends a request to create some entity on the server. The server creates the entity and then replies with the entity's handle, so that the client can send more requests regarding the entity (i.e. modify/delete it). > I need to match the request to create an entity with the reply containing its handle (otherwise a client could potentially confuse between different entities' handles). > > Is there any recommended way do that in zeromq? Any 'best practices'? I usually use the Majordomo protocol / pattern as the basis for most of the work I do. > If I understand that correctly, using REQ-REP socket combination ensures that the reply will match the request, however: > 1. The server is multi-threaded and does not ensures first-come-first-served policy You solve this by using Dealer/Router. > 2. Some request are left without reply intentionally, which is not possible with REQ-REP, so I actually use DEALER-DEALER combination. You should use Dealer/ROUTER instead of Dealer/Dealer. cr From lists at chuckremes.com Wed Jul 4 17:20:01 2012 From: lists at chuckremes.com (Chuck Remes) Date: Wed, 4 Jul 2012 10:20:01 -0500 Subject: [zeromq-dev] Interrupted System Call: advice to handle it In-Reply-To: References: Message-ID: <01B73EA7-9C85-467A-AF3E-533BC52E5945@chuckremes.com> On Jul 4, 2012, at 5:05 AM, Raphael Bauduin wrote: > Hi, > > I'm using the ruby zmq bindings in a web application. I regularly get > error message "ZMQ::Error: Interrupted system call" related to a send. > This is in a Ruby on Rails application served with passenger, which > spawns worker processes. I think I have identified a process that > generated this error, and an strace on it shows no activity at all. > This process however keeps open a connection to the mysql server. An > accumulation of such errors will eventually become problematic server > side, in addition to clients getting an error page and messages being > lost. I'm assuming this happens under MRI. Is it 1.8.x or 1.9.x? Do you see the same behavior when running your app with JRuby or Rubinius? > I'm looking for advice in avoiding this error and possibly for further > debugging hints. Related to that I have several questions: > - Should I simply catch this exception, and retry the send if needed? > As this is done in the process sending the page content back to the > client, won't it possibly make some requests too slow? (This could > still be better than an error as we have currently) Using exception handling for flow control in Ruby can be slow. But unless you are building the next amazon.com then it probably won't hurt you too much. You could give this a try though it's always better to figure out the actual underlying cause and fix it. Using exceptions here is just a band-aid. > - If my understanding is correct, the problem occurs with blocking > syscalls, and requests having the error don't return any content to > the client. But what happens if I make the send non blocking? > (http://zeromq.github.com/rbzmq/classes/ZMQ/Socket.html#M000010) Try it and see. > - Finally, what might interrupt the syscall? Any interesting read about this? Something in your app is generating a signal. The technique I use to figure out these kinds of errors is to run my app under other Ruby runtimes. Most of the time they will fail differently and/or give me an exact backtrace pointing to the source of the problem. Lastly, you may want to look at the ffi-rzmq gem (disclaimer: I'm its maintainer). It has a different API from the zmq gem but it appears to enjoy wider usage by the community so it may be a bit more stable. cr From mark.farnan at petrolink.com Wed Jul 4 20:30:29 2012 From: mark.farnan at petrolink.com (Mark Farnan) Date: Wed, 4 Jul 2012 13:30:29 -0500 Subject: [zeromq-dev] Websockets as a Transport ? Message-ID: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Howdy all, I'm evaluating zeroMQ, and one main criteria we have is to support Websockets for client to server communications. Has there been any work on making a native Websocket transport for ZeroMQ in the core C++ libraries ? Regards Mark Farnan Director, Product Development Petrolink Services Inc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120704/d5b42ddd/attachment.htm From xekoukou at gmail.com Wed Jul 4 22:37:23 2012 From: xekoukou at gmail.com (Apostolis Xekoukoulotakis) Date: Wed, 4 Jul 2012 23:37:23 +0300 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Message-ID: This isnt the official response. It is very easy though to create a bridge between the two if you use nodejs and the socket.io module. There was also a project to put the zeromq semantics in the browser. https://github.com/progrium/nullmq 2012/7/4 Mark Farnan > Howdy all,**** > > ** ** > > I?m evaluating zeroMQ, and one main criteria we have is to support > Websockets for client to server communications.**** > > ** ** > > Has there been any work on making a native Websocket transport for ZeroMQ > in the core C++ libraries ?**** > > ** ** > > ** ** > > Regards**** > > ** ** > > Mark Farnan**** > > Director, Product Development**** > > Petrolink Services Inc**** > > ** ** > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- Sincerely yours, Apostolis Xekoukoulotakis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120704/77b7a2ff/attachment.htm From mark.farnan at petrolink.com Wed Jul 4 23:06:51 2012 From: mark.farnan at petrolink.com (Mark Farnan) Date: Wed, 4 Jul 2012 16:06:51 -0500 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Message-ID: <028901cd5a28$ef548da0$cdfda8e0$@petrolink.com> Thanks for the quick reply. I am actually not so much interested in the browser, as I am in using Websockets for the underlying transport between applications / clients & Server, which have to communicate across the Internet, (over firewalls). Websockets works extremely well for this purpose, to provide a bidirectional socket based connection, over ports 80/443. Many corporate firewalls have TCP ports blocked, and opening them is not an option for our application. ZeroMQ looks perfect for the task in all things, except no Websocket transport (to replace the TCP transport), so I was hoping someone has looked at it already. Writing it ourselves may be an option, vs using another of the Messaging systems. Regards Mark Farnan From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Apostolis Xekoukoulotakis Sent: Wednesday, July 04, 2012 3:37 PM To: ZeroMQ development list Subject: Re: [zeromq-dev] Websockets as a Transport ? This isnt the official response. It is very easy though to create a bridge between the two if you use nodejs and the socket.io module. There was also a project to put the zeromq semantics in the browser. https://github.com/progrium/nullmq 2012/7/4 Mark Farnan Howdy all, I'm evaluating zeroMQ, and one main criteria we have is to support Websockets for client to server communications. Has there been any work on making a native Websocket transport for ZeroMQ in the core C++ libraries ? Regards Mark Farnan Director, Product Development Petrolink Services Inc _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Sincerely yours, Apostolis Xekoukoulotakis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120704/0185cf93/attachment.htm From ian.barber at gmail.com Wed Jul 4 23:44:58 2012 From: ian.barber at gmail.com (Ian Barber) Date: Wed, 4 Jul 2012 22:44:58 +0100 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Message-ID: On Wed, Jul 4, 2012 at 7:30 PM, Mark Farnan wrote: > Howdy all,**** > > ** ** > > I?m evaluating zeroMQ, and one main criteria we have is to support > Websockets for client to server communications.**** > > ** ** > > Has there been any work on making a native Websocket transport for ZeroMQ > in the core C++ libraries ? > No work that made it anywhere near head, but as Apostolis said there are plenty of bridging methods. My personal favourite is Paul's ZeroGW: https://github.com/tailhook/zerogw Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120704/76e75e0d/attachment.htm From cangussu at gmail.com Thu Jul 5 00:24:21 2012 From: cangussu at gmail.com (Thiago Cangussu) Date: Wed, 4 Jul 2012 19:24:21 -0300 Subject: [zeromq-dev] How to safely use a socket in multiple threads in zmq 2.1.11 Message-ID: Hi, I have a pool of threads that needs to send messages to a zmq socket. I was creating the socket, connecting, sending the message and closing it for each message, but it is for sure not an optimal usage of resources, since if I create/close sockets too fast, zmq is not able do release them as fast and I get the error: "too many open files (signaler.cpp 330)". Since I have no control over those threads, I'm about to try the following solution: 1 - create a pool of connected sockets (REQ, inproc) 2 - when a client thread wants to send a message, it grabs a socket from the pool 3 - the thread performs a send/recv 4 - the thread releases the socket (which will be again available in the pool) The question is: what should I do to make this multi-threaded usage of sockets safe? Is it enough to guarantee that multiple threads do not perform send/receive simultaneously? Thanks, Thiago -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120704/dba017b0/attachment.htm From shemminger at vyatta.com Thu Jul 5 00:57:15 2012 From: shemminger at vyatta.com (Stephen Hemminger) Date: Wed, 4 Jul 2012 15:57:15 -0700 Subject: [zeromq-dev] How to safely use a socket in multiple threads in zmq 2.1.11 In-Reply-To: References: Message-ID: <20120704155715.63ffadfe@nehalam.linuxnetplumber.net> On Wed, 4 Jul 2012 19:24:21 -0300 Thiago Cangussu wrote: > Hi, > > I have a pool of threads that needs to send messages to a zmq socket. I was > creating the socket, connecting, sending the message and closing it for > each message, but it is for sure not an optimal usage of resources, since > if I create/close sockets too fast, zmq is not able do release them as fast > and I get the error: "too many open files (signaler.cpp 330)". Since I have > no control over those threads, I'm about to try the following solution: > > 1 - create a pool of connected sockets (REQ, inproc) > 2 - when a client thread wants to send a message, it grabs a socket from > the pool > 3 - the thread performs a send/recv > 4 - the thread releases the socket (which will be again available in the > pool) > > The question is: what should I do to make this multi-threaded usage of > sockets safe? Is it enough to guarantee that multiple threads do not > perform send/receive simultaneously? > > Thanks, > Thiago You can have a per-thread pool of sockets, but you can't create socket in one thread and then use it in another. Can you just have one socket per thread in thread local storage? From whjackson at gmail.com Thu Jul 5 02:57:36 2012 From: whjackson at gmail.com (Whitney Jackson) Date: Wed, 4 Jul 2012 19:57:36 -0500 Subject: [zeromq-dev] blocking zmq_close? Message-ID: Hi, I'm using the ZMQ_FD getsockopt feature to integrate ZeroMQ into an event loop that I don't control and don't have the source code for. This works quite well except when I want to close a ZeroMQ socket. Since zmq_close is non-blocking, control gets returned to the event loop before the socket is fully shutdown causing this error: Bad file descriptor (epoll.cpp:69) gdb on the core file shows #0 0xf77bf430 in __kernel_vsyscall () #1 0x45d7395f in raise () from /lib/libc.so.6 #2 0x45d752b3 in abort () from /lib/libc.so.6 #3 0xf36f719c in zmq::zmq_abort (errmsg_=0x45eaf393 "Bad file descriptor") at err.cpp:76 #4 0xf36f5f0a in zmq::epoll_t::add_fd (this=0x9029a10, fd_=14, events_=0x902a2b0) at epoll.cpp:69 #5 0xf370c3d7 in zmq::socket_base_t::start_reaping (this=0x902a210, poller_=0x9029a10) at socket_base.cpp:717 #6 0xf3705a87 in zmq::reaper_t::process_reap (this=0x90287e0, socket_=0x902a210) at reaper.cpp:101 #7 0xf36fbfd4 in zmq::object_t::process_command (this=0x90287e0, cmd_=...) at object.cpp:120 #8 0xf370591f in zmq::reaper_t::in_event (this=0x90287e0) at reaper.cpp:72 #9 0xf36f64f7 in zmq::epoll_t::loop (this=0x9029a10) at epoll.cpp:161 #10 0xf36f65c5 in zmq::epoll_t::worker_routine (arg_=0x9029a10) at epoll.cpp:174 #11 0xf3710792 in thread_routine (arg_=0x9029a54) at thread.cpp:75 #12 0xf7749adf in start_thread () from /lib/libpthread.so.0 #13 0x45e3655e in clone () from /lib/libc.so.6 I can prevent the error by doing a zmq_term on the context or just sleeping before returning control to the event loop but obviously these solutions aren't optimal. Is there some way to block until zmq_close is really done? Whitney From justin at affinix.com Thu Jul 5 03:52:11 2012 From: justin at affinix.com (Justin Karneges) Date: Wed, 4 Jul 2012 18:52:11 -0700 Subject: [zeromq-dev] blocking zmq_close? In-Reply-To: References: Message-ID: <201207041852.12047.justin@affinix.com> On Wednesday, July 04, 2012 05:57:36 PM Whitney Jackson wrote: > Hi, > > I'm using the ZMQ_FD getsockopt feature to integrate ZeroMQ into an > event loop that I don't control and don't have the source code for. > This works quite well except when I want to close a ZeroMQ socket. > Since zmq_close is non-blocking, control gets returned to the event > loop before the socket is fully shutdown causing this error: > > Bad file descriptor (epoll.cpp:69) > > gdb on the core file shows > > #0 0xf77bf430 in __kernel_vsyscall () > #1 0x45d7395f in raise () from /lib/libc.so.6 > #2 0x45d752b3 in abort () from /lib/libc.so.6 > #3 0xf36f719c in zmq::zmq_abort (errmsg_=0x45eaf393 "Bad file > descriptor") at err.cpp:76 > #4 0xf36f5f0a in zmq::epoll_t::add_fd (this=0x9029a10, fd_=14, > events_=0x902a2b0) at epoll.cpp:69 > #5 0xf370c3d7 in zmq::socket_base_t::start_reaping (this=0x902a210, > poller_=0x9029a10) at socket_base.cpp:717 > #6 0xf3705a87 in zmq::reaper_t::process_reap (this=0x90287e0, > socket_=0x902a210) at reaper.cpp:101 > #7 0xf36fbfd4 in zmq::object_t::process_command (this=0x90287e0, > cmd_=...) at object.cpp:120 > #8 0xf370591f in zmq::reaper_t::in_event (this=0x90287e0) at reaper.cpp:72 > #9 0xf36f64f7 in zmq::epoll_t::loop (this=0x9029a10) at epoll.cpp:161 > #10 0xf36f65c5 in zmq::epoll_t::worker_routine (arg_=0x9029a10) at > epoll.cpp:174 #11 0xf3710792 in thread_routine (arg_=0x9029a54) at > thread.cpp:75 #12 0xf7749adf in start_thread () from /lib/libpthread.so.0 > #13 0x45e3655e in clone () from /lib/libc.so.6 > > I can prevent the error by doing a zmq_term on the context or just > sleeping before returning control to the event loop but obviously > these solutions aren't optimal. > > Is there some way to block until zmq_close is really done? How about removing the socket's fd from the eventloop's monitoring at the time of close? It would be surprising if you can add an fd but not remove it... Justin From whjackson at gmail.com Thu Jul 5 04:15:09 2012 From: whjackson at gmail.com (Whitney Jackson) Date: Wed, 4 Jul 2012 21:15:09 -0500 Subject: [zeromq-dev] blocking zmq_close? In-Reply-To: <201207041852.12047.justin@affinix.com> References: <201207041852.12047.justin@affinix.com> Message-ID: > How about removing the socket's fd from the eventloop's monitoring at the time > of close? It would be surprising if you can add an fd but not remove it... Yep. The propriety event loop does provide a mechanism for removing fds as well as adding them. I use that and can verify using strace that the event loop no longer includes my fd in it's select calls afterwards. Sadly, it still blows up as soon as I close the socket if I don't zmq_term or sleep. I'm guessing somewhere in the code I can't see the fd is being touched in a way that doesn't show up in strace. I could go the route of filing a bug with the commercial / closed source event loop people but am guessing I won't have much luck there. If it's possible to work around this by just not giving control back to the event loop until the socket is fully closed that would be ideal. On Wed, Jul 4, 2012 at 8:52 PM, Justin Karneges wrote: > On Wednesday, July 04, 2012 05:57:36 PM Whitney Jackson wrote: >> Hi, >> >> I'm using the ZMQ_FD getsockopt feature to integrate ZeroMQ into an >> event loop that I don't control and don't have the source code for. >> This works quite well except when I want to close a ZeroMQ socket. >> Since zmq_close is non-blocking, control gets returned to the event >> loop before the socket is fully shutdown causing this error: >> >> Bad file descriptor (epoll.cpp:69) >> >> gdb on the core file shows >> >> #0 0xf77bf430 in __kernel_vsyscall () >> #1 0x45d7395f in raise () from /lib/libc.so.6 >> #2 0x45d752b3 in abort () from /lib/libc.so.6 >> #3 0xf36f719c in zmq::zmq_abort (errmsg_=0x45eaf393 "Bad file >> descriptor") at err.cpp:76 >> #4 0xf36f5f0a in zmq::epoll_t::add_fd (this=0x9029a10, fd_=14, >> events_=0x902a2b0) at epoll.cpp:69 >> #5 0xf370c3d7 in zmq::socket_base_t::start_reaping (this=0x902a210, >> poller_=0x9029a10) at socket_base.cpp:717 >> #6 0xf3705a87 in zmq::reaper_t::process_reap (this=0x90287e0, >> socket_=0x902a210) at reaper.cpp:101 >> #7 0xf36fbfd4 in zmq::object_t::process_command (this=0x90287e0, >> cmd_=...) at object.cpp:120 >> #8 0xf370591f in zmq::reaper_t::in_event (this=0x90287e0) at reaper.cpp:72 >> #9 0xf36f64f7 in zmq::epoll_t::loop (this=0x9029a10) at epoll.cpp:161 >> #10 0xf36f65c5 in zmq::epoll_t::worker_routine (arg_=0x9029a10) at >> epoll.cpp:174 #11 0xf3710792 in thread_routine (arg_=0x9029a54) at >> thread.cpp:75 #12 0xf7749adf in start_thread () from /lib/libpthread.so.0 >> #13 0x45e3655e in clone () from /lib/libc.so.6 >> >> I can prevent the error by doing a zmq_term on the context or just >> sleeping before returning control to the event loop but obviously >> these solutions aren't optimal. >> >> Is there some way to block until zmq_close is really done? > > How about removing the socket's fd from the eventloop's monitoring at the time > of close? It would be surprising if you can add an fd but not remove it... > > Justin > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From ivan.pechorin at gmail.com Thu Jul 5 08:27:15 2012 From: ivan.pechorin at gmail.com (Ivan Pechorin) Date: Thu, 5 Jul 2012 10:27:15 +0400 Subject: [zeromq-dev] How to safely use a socket in multiple threads in zmq 2.1.11 In-Reply-To: References: Message-ID: 2012/7/5 Thiago Cangussu > > The question is: what should I do to make this multi-threaded usage of > sockets safe? Is it enough to guarantee that multiple threads do not > perform send/receive simultaneously? > > This is already in the FAQ [1]: "For those situations where a dedicated socket per thread is infeasible, a socket may be shared *if and only if *each thread executes a full memory barrier before accessing the socket. Most languages support a Mutex or Spinlock which will execute the full memory barrier on your behalf." In particular, for Linux/UNIX systems with pthreads, the memory barrier by pthread_mutex_lock(), pthread_mutex_unlock() and a bunch of other pthread_* functions is guaranteed by the POSIX specification [2]. So, if you don't have control on a number of threads that use ZeroMQ sockets and the performance penalty of mutex lock/unlock on every operation is not a problem for your needs, just make sure that your pool of sockets is protected by mutexes. [1] http://www.zeromq.org/area:faq [2] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_11 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/67e94ea6/attachment.htm From ivan.pechorin at gmail.com Thu Jul 5 08:35:13 2012 From: ivan.pechorin at gmail.com (Ivan Pechorin) Date: Thu, 5 Jul 2012 10:35:13 +0400 Subject: [zeromq-dev] How to safely use a socket in multiple threads in zmq 2.1.11 In-Reply-To: <20120704155715.63ffadfe@nehalam.linuxnetplumber.net> References: <20120704155715.63ffadfe@nehalam.linuxnetplumber.net> Message-ID: 2012/7/5 Stephen Hemminger > > You can have a per-thread pool of sockets, but you can't create socket > in one thread and then use it in another. You CAN create in one thread and then use it in another - just ensure there's a memory barrier in the middle. > Can you just have one socket > per thread in thread local storage? > Sometime it's not feasible because you don't have control on these threads and on their number. For instance, if you develop some library or component that is intended to run inside an existing application or app server, and this app or app server uses lots (hundreds or even thousands) of threads, you will hit the open file limit at some point if you create socket per thread when really all you need is just a pool of few sockets. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/b0ffb641/attachment.htm From Sharon.Ben-Asher at avg.com Thu Jul 5 08:51:58 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Thu, 5 Jul 2012 06:51:58 +0000 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FBE75@ex10czdmb01> Hello, I am trying to build ZeroMQ build for Android. I have a VM with Ubuntu 12.04 on x86_64, NDK is R8, configured as standalone toolchain, exactly like your websites instructs. I downloaded the 3.x git project (git clone https://github.com/zeromq/zeromq3-x.git) configure was ok. When I do make, I get the following errors: cc1plus: warnings being treated as errors tcp_address.cpp: In constructor 'zmq::tcp_address_t::tcp_address_t(const sockaddr*, socklen_t)': tcp_address.cpp:374: error: comparison between signed and unsigned integer expressions tcp_address.cpp:377: error: comparison between signed and unsigned integer expressions tcp_address.cpp: In member function 'const bool zmq::tcp_address_mask_t::match_address(const sockaddr*, socklen_t) const': tcp_address.cpp:580: error: comparison between signed and unsigned integer expressions make[2]: *** [libzmq_la-tcp_address.lo] Error 1 make[2]: Leaving directory `/home/sharon/zeromq3-x/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/sharon/zeromq3-x/src' make: *** [all-recursive] Error 1 Attached is the full make output + configure.log Thanks, Sharon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/bed79e59/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: make.out Type: application/octet-stream Size: 2667 bytes Desc: make.out Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/bed79e59/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: config.log Type: application/octet-stream Size: 88686 bytes Desc: config.log Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/bed79e59/attachment-0001.obj From ph at imatix.com Thu Jul 5 11:43:36 2012 From: ph at imatix.com (Pieter Hintjens) Date: Thu, 5 Jul 2012 18:43:36 +0900 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B2E7FBE75@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B2E7FBE75@ex10czdmb01> Message-ID: Hi Sharon, Is it possible that socklen_t is signed on that compiler? Try inserting a cast "(size_t) sa_len". If that works, we'll make a patch. -Pieter On Thu, Jul 5, 2012 at 3:51 PM, Sharon Ben-Asher wrote: > Hello, > > > > I am trying to build ZeroMQ build for Android. I have a VM with Ubuntu > 12.04 on x86_64, NDK is R8, configured as standalone toolchain, exactly like > your websites instructs. > > I downloaded the 3.x git project (git clone > https://github.com/zeromq/zeromq3-x.git) > > configure was ok. > > When I do make, I get the following errors: > > > > cc1plus: warnings being treated as errors > > tcp_address.cpp: In constructor 'zmq::tcp_address_t::tcp_address_t(const > sockaddr*, socklen_t)': > > tcp_address.cpp:374: error: comparison between signed and unsigned integer > expressions > > tcp_address.cpp:377: error: comparison between signed and unsigned integer > expressions > > tcp_address.cpp: In member function 'const bool > zmq::tcp_address_mask_t::match_address(const sockaddr*, socklen_t) const': > > tcp_address.cpp:580: error: comparison between signed and unsigned integer > expressions > > make[2]: *** [libzmq_la-tcp_address.lo] Error 1 > > make[2]: Leaving directory `/home/sharon/zeromq3-x/src' > > make[1]: *** [all] Error 2 > > make[1]: Leaving directory `/home/sharon/zeromq3-x/src' > > make: *** [all-recursive] Error 1 > > > > Attached is the full make output + configure.log > > > > Thanks, > > > > Sharon > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From Sharon.Ben-Asher at avg.com Thu Jul 5 11:56:26 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Thu, 5 Jul 2012 09:56:26 +0000 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FBECF@ex10czdmb01> I solved the problem by converting the sizeof to int like this if (sa->sa_family == AF_INET && sa_len >= (int)sizeof (address.ipv4)) { I guess it's a platform specific issue? Anyway, it is needed to compile the lib for ARM. From: Sharon Ben-Asher Sent: Thursday, July 05, 2012 9:52 AM To: 'zeromq-dev at lists.zeromq.org' Subject: Error: comparison between signed and unsigned integer expressions Hello, I am trying to build ZeroMQ build for Android. I have a VM with Ubuntu 12.04 on x86_64, NDK is R8, configured as standalone toolchain, exactly like your websites instructs. I downloaded the 3.x git project (git clone https://github.com/zeromq/zeromq3-x.git) configure was ok. When I do make, I get the following errors: cc1plus: warnings being treated as errors tcp_address.cpp: In constructor 'zmq::tcp_address_t::tcp_address_t(const sockaddr*, socklen_t)': tcp_address.cpp:374: error: comparison between signed and unsigned integer expressions tcp_address.cpp:377: error: comparison between signed and unsigned integer expressions tcp_address.cpp: In member function 'const bool zmq::tcp_address_mask_t::match_address(const sockaddr*, socklen_t) const': tcp_address.cpp:580: error: comparison between signed and unsigned integer expressions make[2]: *** [libzmq_la-tcp_address.lo] Error 1 make[2]: Leaving directory `/home/sharon/zeromq3-x/src' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/sharon/zeromq3-x/src' make: *** [all-recursive] Error 1 Attached is the full make output + configure.log Thanks, Sharon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/2091f86d/attachment.htm From ph at imatix.com Thu Jul 5 12:02:33 2012 From: ph at imatix.com (Pieter Hintjens) Date: Thu, 5 Jul 2012 19:02:33 +0900 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B2E7FBECF@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B2E7FBECF@ex10czdmb01> Message-ID: Hi Sharon, OK, so socklen_t is definitely signed on your platform. If you would make an issue in Jira, I'll make a patch for all current 0MQ versions. Thanks Pieter On Thu, Jul 5, 2012 at 6:56 PM, Sharon Ben-Asher wrote: > I solved the problem by converting the sizeof to int like this > > if (sa->sa_family == AF_INET && sa_len >= (int)sizeof (address.ipv4)) { > > I guess it?s a platform specific issue? Anyway, it is needed to compile the > lib for ARM. > > > > From: Sharon Ben-Asher > Sent: Thursday, July 05, 2012 9:52 AM > To: 'zeromq-dev at lists.zeromq.org' > Subject: Error: comparison between signed and unsigned integer expressions > > > > Hello, > > > > I am trying to build ZeroMQ build for Android. I have a VM with Ubuntu > 12.04 on x86_64, NDK is R8, configured as standalone toolchain, exactly like > your websites instructs. > > I downloaded the 3.x git project (git clone > https://github.com/zeromq/zeromq3-x.git) > > configure was ok. > > When I do make, I get the following errors: > > > > cc1plus: warnings being treated as errors > > tcp_address.cpp: In constructor 'zmq::tcp_address_t::tcp_address_t(const > sockaddr*, socklen_t)': > > tcp_address.cpp:374: error: comparison between signed and unsigned integer > expressions > > tcp_address.cpp:377: error: comparison between signed and unsigned integer > expressions > > tcp_address.cpp: In member function 'const bool > zmq::tcp_address_mask_t::match_address(const sockaddr*, socklen_t) const': > > tcp_address.cpp:580: error: comparison between signed and unsigned integer > expressions > > make[2]: *** [libzmq_la-tcp_address.lo] Error 1 > > make[2]: Leaving directory `/home/sharon/zeromq3-x/src' > > make[1]: *** [all] Error 2 > > make[1]: Leaving directory `/home/sharon/zeromq3-x/src' > > make: *** [all-recursive] Error 1 > > > > Attached is the full make output + configure.log > > > > Thanks, > > > > Sharon > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From ivan.pechorin at gmail.com Thu Jul 5 12:09:14 2012 From: ivan.pechorin at gmail.com (Ivan Pechorin) Date: Thu, 5 Jul 2012 14:09:14 +0400 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions In-Reply-To: References: <671E27F33F2F25499F78A4AFA494E63B2E7FBECF@ex10czdmb01> Message-ID: 2012/7/5 Pieter Hintjens > Hi Sharon, > > OK, so socklen_t is definitely signed on your platform. If you would > make an issue in Jira, I'll make a patch for all current 0MQ versions. > > Android NDK has the following typedef: typedef int socklen_t I wonder why they choose to go against UNIX specs that require socklen_t to be unsigned (see http://pubs.opengroup.org/onlinepubs/7908799/xns/syssocket.h.html) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/6784fcb1/attachment.htm From Sharon.Ben-Asher at avg.com Thu Jul 5 12:28:32 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Thu, 5 Jul 2012 10:28:32 +0000 Subject: [zeromq-dev] Error: cannot link with -lzmq Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FBF01@ex10czdmb01> Hello again, After successful build of the C lib, I have a problem with building zmq.jar: configure:15622: checking for zmq_init in -lzmq configure:15647: g++ -o conftest -g -O2 -D_REENTRANT -D_THREAD_SAFE -fPIC -I/home/sharon/zeromq-android/include -L/home/sharon/zeromq-android/lib conftest.cpp -lzmq >&5 /usr/bin/ld: skipping incompatible /home/sharon/zeromq-android/lib/libzmq.so when searching for -lzmq /usr/bin/ld: skipping incompatible /home/sharon/zeromq-android/lib/libzmq.a when searching for -lzmq /usr/bin/ld: cannot find -lzmq collect2: ld returned 1 exit status Thanks Sharon From: Sharon Ben-Asher Sent: Thursday, July 05, 2012 12:56 PM To: 'zeromq-dev at lists.zeromq.org' Subject: RE: Error: comparison between signed and unsigned integer expressions I solved the problem by converting the sizeof to int like this if (sa->sa_family == AF_INET && sa_len >= (int)sizeof (address.ipv4)) { I guess it's a platform specific issue? Anyway, it is needed to compile the lib for ARM. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/d1bd988f/attachment.htm From bb.varga at gmail.com Thu Jul 5 12:34:48 2012 From: bb.varga at gmail.com (=?UTF-8?Q?Bal=C3=A1zs_Varga?=) Date: Thu, 5 Jul 2012 12:34:48 +0200 Subject: [zeromq-dev] Delphi binding. Message-ID: Dear members, I just want to let you know, that I've started working on a 0MQ binding for Delphi, and pushed the initial version of the code, which is here: https://github.com/bvarga/delphizmq . For now it's not well tested, however 20 examples translated from the guide are working great for me. bye balazs. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/bf82194f/attachment.htm From cangussu at gmail.com Thu Jul 5 14:13:29 2012 From: cangussu at gmail.com (Thiago Cangussu) Date: Thu, 5 Jul 2012 09:13:29 -0300 Subject: [zeromq-dev] How to safely use a socket in multiple threads in zmq 2.1.11 In-Reply-To: References: Message-ID: On Thu, Jul 5, 2012 at 3:27 AM, Ivan Pechorin wrote: > > > 2012/7/5 Thiago Cangussu > >> >> The question is: what should I do to make this multi-threaded usage of >> sockets safe? Is it enough to guarantee that multiple threads do not >> perform send/receive simultaneously? >> >> > This is already in the FAQ [1]: > > "For those situations where a dedicated socket per thread is infeasible, a > socket may be shared *if and only if *each thread executes a full memory > barrier before accessing the socket. Most languages support a Mutex or > Spinlock which will execute the full memory barrier on your behalf." > My bad, I only checked the guide/man-pages and was a little unsure that a mutex would do the trick. > In particular, for Linux/UNIX systems with pthreads, the memory barrier > by pthread_mutex_lock(), pthread_mutex_unlock() and a bunch of other > pthread_* functions is guaranteed by the POSIX specification [2]. > > So, if you don't have control on a number of threads that use ZeroMQ > sockets and the performance penalty of mutex lock/unlock on every operation > is not a problem for your needs, just make sure that your pool of sockets > is protected by mutexes. > That's the case, I was ok with the performance penalty of creating/closing the socket, but the file descriptor limit is a problem. The mutex lock/unlock will not be an issue. Thanks a lot, Thiago -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/e03d9c1b/attachment.htm From cangussu at gmail.com Thu Jul 5 14:19:57 2012 From: cangussu at gmail.com (Thiago Cangussu) Date: Thu, 5 Jul 2012 09:19:57 -0300 Subject: [zeromq-dev] How to safely use a socket in multiple threads in zmq 2.1.11 In-Reply-To: References: <20120704155715.63ffadfe@nehalam.linuxnetplumber.net> Message-ID: On Thu, Jul 5, 2012 at 3:35 AM, Ivan Pechorin wrote: > Can you just have one socket >> per thread in thread local storage? >> > > Sometime it's not feasible because you don't have control on these threads > and on their number. > > For instance, if you develop some library or component that is intended to > run inside an existing application or app server, and this app or app > server uses lots (hundreds or even thousands) of threads, you will hit the > open file limit at some point if you create socket per thread when really > all you need is just a pool of few sockets. > That's exactly the case. And there is also the problem that I need to close the sockets before calling zmq_term. I actually tried this solution (TLS) but it started to look like a code smell, so I revisited the muti-thread use of sockets. As a side note, the guide really did a good job keeping me away from using sockets from multiple threads :) Thanks, Thiago -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/27c0ae4e/attachment.htm From steven.mccoy at miru.hk Thu Jul 5 15:12:02 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Thu, 5 Jul 2012 09:12:02 -0400 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions In-Reply-To: References: <671E27F33F2F25499F78A4AFA494E63B2E7FBECF@ex10czdmb01> Message-ID: On 5 July 2012 06:09, Ivan Pechorin wrote: > Android NDK has the following typedef: > > typedef int socklen_t > > I wonder why they choose to go against UNIX specs that require socklen_t > to be unsigned (see > http://pubs.opengroup.org/onlinepubs/7908799/xns/syssocket.h.html) > It appears to be a BSD trait,here's a rather moody article about it: http://everything2.com/title/socklen_t -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/9de6415e/attachment.htm From diffuser78 at gmail.com Thu Jul 5 17:23:53 2012 From: diffuser78 at gmail.com (Diffuser78) Date: Thu, 5 Jul 2012 08:23:53 -0700 Subject: [zeromq-dev] Design Suggestion for simple app using zmq Message-ID: 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: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/1bed8a32/attachment.htm From paul at colomiets.name Thu Jul 5 22:02:40 2012 From: paul at colomiets.name (Paul Colomiets) Date: Thu, 5 Jul 2012 23:02:40 +0300 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Message-ID: Hi Mark, Ian, On Thu, Jul 5, 2012 at 12:44 AM, Ian Barber wrote: >> I?m evaluating zeroMQ, and one main criteria we have is to support >> Websockets for client to server communications. >> >> >> >> Has there been any work on making a native Websocket transport for ZeroMQ >> in the core C++ libraries ? > > > No work that made it anywhere near head, but as Apostolis said there are > plenty of bridging methods. My personal favourite is Paul's ZeroGW: > https://github.com/tailhook/zerogw > Thanks Ian, I appreciate your respect :) However, zerogw is designed with browser clients in mind. Mark's use case may be a bit different. Although, I would support usage of zerogw for other applications, but I'm not going to implement outbound websocket connections at the current stage of evolution of zerogw, so you need some complementary client implementation. -- Paul From mark.farnan at petrolink.com Fri Jul 6 00:53:18 2012 From: mark.farnan at petrolink.com (Mark Farnan) Date: Thu, 5 Jul 2012 17:53:18 -0500 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Message-ID: <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> Correct, What I am after is a bit different. I am looking for using Websockets as native transport, machine to machine running ZeroMQ natively at each end, across firewalls. For our case we can't rely on a TCP port being open to work through. Websockets provides the ideal transport protocol for this. i.e. Connects Https Handles Security (even basic Auth is fine, as it is HttpS). Upgrades the connection to Websocket wss ZeroMQ runs 'as is' over the now established Websocket. This, or something similar, is what I am thinking. (You can actually do all of this in one step with a http connect and upgrade frame) So ideally a client would provide the address, i.e. "wss://someserver.someplace.com/something", to the Socket Connect function, along with an optional username and PW, It establishes the session, and ZeroMQ works as before from there. The ZeroMQ receiving the connection would need a registered callback of some kind to handle the authentication, which just passes back 'true or false' if its accepted or not. Would anyone else maybe interested in doing this ? Regards Mark -----Original Message----- From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Paul Colomiets Sent: Thursday, July 05, 2012 3:03 PM To: ZeroMQ development list Subject: Re: [zeromq-dev] Websockets as a Transport ? Hi Mark, Ian, On Thu, Jul 5, 2012 at 12:44 AM, Ian Barber wrote: >> I'm evaluating zeroMQ, and one main criteria we have is to support >> Websockets for client to server communications. >> >> >> >> Has there been any work on making a native Websocket transport for >> ZeroMQ in the core C++ libraries ? > > > No work that made it anywhere near head, but as Apostolis said there > are plenty of bridging methods. My personal favourite is Paul's ZeroGW: > https://github.com/tailhook/zerogw > Thanks Ian, I appreciate your respect :) However, zerogw is designed with browser clients in mind. Mark's use case may be a bit different. Although, I would support usage of zerogw for other applications, but I'm not going to implement outbound websocket connections at the current stage of evolution of zerogw, so you need some complementary client implementation. -- Paul _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev From ian.barber at gmail.com Fri Jul 6 01:27:24 2012 From: ian.barber at gmail.com (Ian Barber) Date: Fri, 6 Jul 2012 00:27:24 +0100 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> Message-ID: On Thu, Jul 5, 2012 at 11:53 PM, Mark Farnan wrote: > Correct, What I am after is a bit different. > > I am looking for using Websockets as native transport, machine to machine > running ZeroMQ natively at each end, across firewalls. For our case we > can't rely on a TCP port being open to work through. Websockets provides > the ideal transport protocol for this. > > i.e. > Connects Https > Handles Security (even basic Auth is fine, as it is HttpS). > Upgrades the connection to Websocket wss > ZeroMQ runs 'as is' over the now established Websocket. It's a non-trivial bit of work to implement a new transport, but it's definitely an option. I'll doubt you'll get someone willing to jump in and do it unless someone is quietly already working on it though, as it'd be a fair investment of time. If you're interested in doing it yourself though people here can certainly point you in the right direction. Other options worth considering would be: 1 - Pieter's VTX: https://github.com/imatix/vtx - this is designed to be an easier way of adding extra protocols, building on top of the existing zeromq library. 2 - Running ZeroMQ TCP across port 80 or 443. Depending on the firewall config, you might find this is enough to get the traffic through and will get you up and running with a lot less effort. YMMV. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120706/6c54393d/attachment.htm From mark.farnan at petrolink.com Fri Jul 6 01:39:01 2012 From: mark.farnan at petrolink.com (Mark Farnan) Date: Thu, 5 Jul 2012 18:39:01 -0500 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> Message-ID: <005e01cd5b07$5b4ddaa0$11e98fe0$@petrolink.com> Thanks for the quick reply. I'll take a look at VTX. Sadly, we already know that using ZeroMQ on Port 80/443 won't fly at all. Been down this road already with trying to use a TCP socket on these ports. Regards Mark Farnan Director, Product Development Petrolink Services Inc +1 281 908 9814 From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Ian Barber Sent: Thursday, July 05, 2012 6:27 PM To: ZeroMQ development list Subject: Re: [zeromq-dev] Websockets as a Transport ? On Thu, Jul 5, 2012 at 11:53 PM, Mark Farnan wrote: Correct, What I am after is a bit different. I am looking for using Websockets as native transport, machine to machine running ZeroMQ natively at each end, across firewalls. For our case we can't rely on a TCP port being open to work through. Websockets provides the ideal transport protocol for this. i.e. Connects Https Handles Security (even basic Auth is fine, as it is HttpS). Upgrades the connection to Websocket wss ZeroMQ runs 'as is' over the now established Websocket. It's a non-trivial bit of work to implement a new transport, but it's definitely an option. I'll doubt you'll get someone willing to jump in and do it unless someone is quietly already working on it though, as it'd be a fair investment of time. If you're interested in doing it yourself though people here can certainly point you in the right direction. Other options worth considering would be: 1 - Pieter's VTX: https://github.com/imatix/vtx - this is designed to be an easier way of adding extra protocols, building on top of the existing zeromq library. 2 - Running ZeroMQ TCP across port 80 or 443. Depending on the firewall config, you might find this is enough to get the traffic through and will get you up and running with a lot less effort. YMMV. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/deebe02b/attachment.htm From diffuser78 at gmail.com Fri Jul 6 01:58:53 2012 From: diffuser78 at gmail.com (Diffuser78) Date: Thu, 5 Jul 2012 16:58:53 -0700 Subject: [zeromq-dev] Design Suggestion for simple app using zmq In-Reply-To: References: Message-ID: Anyone ? On Thu, Jul 5, 2012 at 8:23 AM, Diffuser78 wrote: > 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: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/dbea23b7/attachment.htm From jhawk28 at gmail.com Fri Jul 6 04:52:29 2012 From: jhawk28 at gmail.com (Joshua Foster) Date: Thu, 5 Jul 2012 22:52:29 -0400 Subject: [zeromq-dev] Design Suggestion for simple app using zmq In-Reply-To: References: Message-ID: <9C9647F5-F8B5-4A52-913A-5EEE441D68EC@gmail.com> Are the ACK's async? If they are not, you can use the REQ socket instead. Are you using multiple threads? Joshua On Jul 5, 2012, at 7:58 PM, Diffuser78 wrote: > Anyone ? > > On Thu, Jul 5, 2012 at 8:23 AM, Diffuser78 wrote: > 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. > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120705/5f828ab7/attachment.htm From ph at imatix.com Fri Jul 6 05:27:34 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 6 Jul 2012 12:27:34 +0900 Subject: [zeromq-dev] Delphi binding. In-Reply-To: References: Message-ID: Nice... :) On Thu, Jul 5, 2012 at 7:34 PM, Bal?zs Varga wrote: > Dear members, > > I just want to let you know, that I've started working on a 0MQ binding for > Delphi, and pushed the initial version of the code, which is here: > https://github.com/bvarga/delphizmq . For now it's not well tested, however > 20 examples translated from the guide are working great for me. > > bye > balazs. > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From hurtonm at gmail.com Fri Jul 6 10:28:32 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Fri, 6 Jul 2012 10:28:32 +0200 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B2E7FBE75@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B2E7FBE75@ex10czdmb01> Message-ID: Hi Sharon, what revision are you using? Commit eb6c668c2ae961a4a53d11d81dd6d2df5bffa666 from Javier Lopez already fixes that. - Martin On Thu, Jul 5, 2012 at 8:51 AM, Sharon Ben-Asher wrote: > Hello, > > > > I am trying to build ZeroMQ build for Android. I have a VM with Ubuntu > 12.04 on x86_64, NDK is R8, configured as standalone toolchain, exactly like > your websites instructs. > > I downloaded the 3.x git project (git clone > https://github.com/zeromq/zeromq3-x.git) > > configure was ok. > > When I do make, I get the following errors: > > > > cc1plus: warnings being treated as errors > > tcp_address.cpp: In constructor 'zmq::tcp_address_t::tcp_address_t(const > sockaddr*, socklen_t)': > > tcp_address.cpp:374: error: comparison between signed and unsigned integer > expressions > > tcp_address.cpp:377: error: comparison between signed and unsigned integer > expressions > > tcp_address.cpp: In member function 'const bool > zmq::tcp_address_mask_t::match_address(const sockaddr*, socklen_t) const': > > tcp_address.cpp:580: error: comparison between signed and unsigned integer > expressions > > make[2]: *** [libzmq_la-tcp_address.lo] Error 1 > > make[2]: Leaving directory `/home/sharon/zeromq3-x/src' > > make[1]: *** [all] Error 2 > > make[1]: Leaving directory `/home/sharon/zeromq3-x/src' > > make: *** [all-recursive] Error 1 > > > > Attached is the full make output + configure.log > > > > Thanks, > > > > Sharon > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From ph at imatix.com Fri Jul 6 10:34:27 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 6 Jul 2012 17:34:27 +0900 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions In-Reply-To: References: <671E27F33F2F25499F78A4AFA494E63B2E7FBE75@ex10czdmb01> Message-ID: On Fri, Jul 6, 2012 at 5:28 PM, Martin Hurton wrote: > Hi Sharon, what revision are you using? > Commit eb6c668c2ae961a4a53d11d81dd6d2df5bffa666 from Javier Lopez > already fixes that. :-) Lol, and my patch unfixes it. Will revert. -Pieter From rplehmann at gmail.com Fri Jul 6 10:39:06 2012 From: rplehmann at gmail.com (Rene-Pierre Lehmann) Date: Fri, 06 Jul 2012 19:39:06 +1100 Subject: [zeromq-dev] Full-duplex tcp sockets on io threads Message-ID: <3bc319aab14294a9be67ee62dfc789f3@ripi.net> Hi, Is it possible with zeromq to use underlying tcp sockets in a full-duplex fashion? By full duplex I mean that an io thread may read from a tcp socket while another io thread may concurrently write to the same socket. Cheers, Rene-Pierre. From ph at imatix.com Fri Jul 6 12:57:59 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 6 Jul 2012 19:57:59 +0900 Subject: [zeromq-dev] Full-duplex tcp sockets on io threads In-Reply-To: <3bc319aab14294a9be67ee62dfc789f3@ripi.net> References: <3bc319aab14294a9be67ee62dfc789f3@ripi.net> Message-ID: On Fri, Jul 6, 2012 at 5:39 PM, Rene-Pierre Lehmann wrote: > Is it possible with zeromq to use underlying tcp sockets in a > full-duplex fashion? > By full duplex I mean that an io thread may read from a tcp socket > while another io thread may concurrently write to the same socket. No, this will cause the library to crash. However you can create two sockets in two threads, and use one for input, and one for output. -Pieter From mek at mek.uz.ua Fri Jul 6 16:08:48 2012 From: mek at mek.uz.ua (Max Kuznecov) Date: Fri, 6 Jul 2012 17:08:48 +0300 Subject: [zeromq-dev] Using zeroMQ socket from freeradius module Message-ID: Hi! I'm facing a strange problem which I'm unable to resolve for about a week, so I decided to ask in the list as a last resort. I've got a system which collects requests from custom freeradius account module, stores them in persistent queue on disk and then serves to the agents, which put them into postgres afterwards. Here's a brief arch image: http://imageshack.us/photo/my-images/821/archn.png/ In radius module a single 0mq socket (REQ) is instantiated which is later used for sending requests to collector. Collector is a separate process which binds on the REP socket (tcp, on the same port as radius module, of course) Collector's loop code: http://pastebin.com/xuN4pitv Radius module code: http://pastebin.com/HhUK4nGG It uses mutexes as radius calls the function from various threads. xsend function is a basic wrapper: http://pastebin.com/V3dG0kV9 So, the problem is: when the radius initiates the module, it successfully creates the context and the socket. But, when it tries to send a message to the collector, the following happens: Send operation reports ok (code 0), but when it tries to receive afterwards it blocks. And the collector doesn't receive the data sent by module! I've put a lot of debug printfs all around and the collector just doesn't seem to complete the recv function call. But what is the most strange in all this is that if I run radius with debug flag (-X) which tell it to run in single threaded and in foreground - everything works just as planned - modules sends messages to collector, collector replies etc. Even when I supply a -f option to radiusd, which just evades calling fork() it still works. It doesn't only when radius daemon is run in background. So, basically this is what I cannot understand, if it didn't work in any case I'd understand, but this... Maybe anybody could came up with any idea about what's wrong here. I'd be greatly appreciated! -- ~syhpoon From mek at mek.uz.ua Fri Jul 6 16:11:20 2012 From: mek at mek.uz.ua (Max Kuznecov) Date: Fri, 6 Jul 2012 17:11:20 +0300 Subject: [zeromq-dev] Using zeroMQ socket from freeradius module In-Reply-To: References: Message-ID: Oh, sorry I forgot to mention versions: linux centos 6.2, zeromq 2.2.0 2012/7/6 Max Kuznecov : > Hi! > > I'm facing a strange problem which I'm unable to resolve for about a > week, so I decided to ask in the list as a last resort. > > I've got a system which collects requests from custom freeradius > account module, stores them in persistent queue on disk and then > serves to the agents, which put them into postgres afterwards. > Here's a brief arch image: http://imageshack.us/photo/my-images/821/archn.png/ > > In radius module a single 0mq socket (REQ) is instantiated which is > later used for sending requests to collector. > > Collector is a separate process which binds on the REP socket (tcp, on > the same port as radius module, of course) > Collector's loop code: http://pastebin.com/xuN4pitv > > Radius module code: http://pastebin.com/HhUK4nGG > It uses mutexes as radius calls the function from various threads. > > xsend function is a basic wrapper: http://pastebin.com/V3dG0kV9 > > So, the problem is: when the radius initiates the module, it > successfully creates the context and the socket. > But, when it tries to send a message to the collector, the following happens: > Send operation reports ok (code 0), but when it tries to receive > afterwards it blocks. And the collector doesn't receive the data sent > by module! > > I've put a lot of debug printfs all around and the collector just > doesn't seem to complete the recv function call. > But what is the most strange in all this is that if I run radius with > debug flag (-X) which tell it to run in single threaded and in > foreground - everything works just as planned - modules sends messages > to collector, collector replies etc. Even when I supply a -f option to > radiusd, which just evades calling fork() it still works. It doesn't > only when radius daemon is run in background. > > So, basically this is what I cannot understand, if it didn't work in > any case I'd understand, but this... > Maybe anybody could came up with any idea about what's wrong here. I'd > be greatly appreciated! > > -- > ~syhpoon -- ~syhpoon From diffuser78 at gmail.com Fri Jul 6 17:08:24 2012 From: diffuser78 at gmail.com (Diffuser78) Date: Fri, 6 Jul 2012 08:08:24 -0700 Subject: [zeromq-dev] Design Suggestion for simple app using zmq In-Reply-To: <9C9647F5-F8B5-4A52-913A-5EEE441D68EC@gmail.com> References: <9C9647F5-F8B5-4A52-913A-5EEE441D68EC@gmail.com> Message-ID: There is no particular requirement for the ACKs to be async. The only requirement is that I should be able to may server's ACK to the message that client had sent ? Is there a deterministic way to do that ? I am not planning to use multiple threads. Any other thoughts are welcome. Many thanks. On Thu, Jul 5, 2012 at 7:52 PM, Joshua Foster wrote: > Are the ACK's async? If they are not, you can use the REQ socket instead. > Are you using multiple threads? > > Joshua > > On Jul 5, 2012, at 7:58 PM, Diffuser78 wrote: > > Anyone ? > > On Thu, Jul 5, 2012 at 8:23 AM, Diffuser78 wrote: > >> 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. >> > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120706/bee3cbad/attachment.htm From bklooste at gmail.com Fri Jul 6 17:41:04 2012 From: bklooste at gmail.com (Bennie Kloosteman) Date: Fri, 6 Jul 2012 23:41:04 +0800 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> Message-ID: Hi Mark, Web socket uses tcp underneath so getting through the firewall is no issue just use port 80 , and in fact web sockets ( and things that use port 80 ) have issues with some ISP html proxy servers and load balancers and it will take time for these products to mature to handle web sockets. AFAIK web sockets is also client to server and most clients already have open all ports out and few in , if you want in a solution like Microsoft Azure uses is ideal ( they have a tcp connection , it tries to open a firewall port to receive and if it fails it relays it via the cloud - but in the best case you have direct client to client connections) I would not trust https too much it does not add a lot , make sure the authentication is good. Also by the time you add the higher level costs like encryption what is the point to using a light weight protocol like zeromq ? You may as well use a nice API like WS-Eventing which can still do 3ms packets ( 100Kpackets/sec per server) Ben On Fri, Jul 6, 2012 at 6:53 AM, Mark Farnan wrote: > Correct, What I am after is a bit different. > > I am looking for using Websockets as native transport, machine to machine > running ZeroMQ natively at each end, across firewalls. For our case we > can't rely on a TCP port being open to work through. Websockets provides > the ideal transport protocol for this. > > i.e. > Connects Https > Handles Security (even basic Auth is fine, as it is HttpS). > Upgrades the connection to Websocket wss > ZeroMQ runs 'as is' over the now established Websocket. > > This, or something similar, is what I am thinking. (You can actually do > all of this in one step with a http connect and upgrade frame) > > So ideally a client would provide the address, i.e. > "wss://someserver.someplace.com/something", to the Socket Connect > function, > along with an optional username and PW, It establishes the session, > and > ZeroMQ works as before from there. > > The ZeroMQ receiving the connection would need a registered callback of > some > kind to handle the authentication, which just passes back 'true or false' > if its accepted or not. > > > Would anyone else maybe interested in doing this ? > > Regards > > Mark > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120706/5a03d588/attachment.htm From hurtonm at gmail.com Fri Jul 6 19:40:23 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Fri, 6 Jul 2012 19:40:23 +0200 Subject: [zeromq-dev] Full-duplex tcp sockets on io threads In-Reply-To: References: <3bc319aab14294a9be67ee62dfc789f3@ripi.net> Message-ID: Now, both read and write operations on a given TCP socket are performed by the same IO thread. See stream_engine implementation. - Martin On Fri, Jul 6, 2012 at 12:57 PM, Pieter Hintjens wrote: > On Fri, Jul 6, 2012 at 5:39 PM, Rene-Pierre Lehmann wrote: > >> Is it possible with zeromq to use underlying tcp sockets in a >> full-duplex fashion? >> By full duplex I mean that an io thread may read from a tcp socket >> while another io thread may concurrently write to the same socket. > > No, this will cause the library to crash. However you can create two > sockets in two threads, and use one for input, and one for output. > > -Pieter > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From mark.farnan at petrolink.com Sat Jul 7 02:16:00 2012 From: mark.farnan at petrolink.com (Mark Farnan) Date: Fri, 6 Jul 2012 19:16:00 -0500 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> Message-ID: <017801cd5bd5$b0804390$1180cab0$@petrolink.com> Hi Ben, HttpS (more specifically SSL) is mandatory requirement in the Industry, just forget trying to do anything without it that involves the Internet. You are correct that Websockets uses TCP underneath, just the same as HTTP uses TCP underneath, and that's also the issue. The protocol for Websocket establishment works over 80/443 in places where trying to do a TCP open will FAIL. (we've tested it). There are any number of statefull firewalls which will allow the initial HTTPS connection, but will block a TCP one. It will also fail a security Audit, as it is against Policy of the major companies in question. I'm referring here to some of the biggest Oil companies in the world. (Policies we can't change). Websockets uses standard HTTP/S methods to upgrade the connection. We have found issues using straight ws:// connection due to some firewalls, but so far almost everything allows wss:// which is SSL Websocket, upgraded from a HTTPS connection. It is this upgrade mechanism that is critical for it to work. Websockets are bidirectional once established, not 'client server'. We also don't want to use STUN, ICE or any of the Nat traversal mechanisms via the 'cloud'. That will also fail security audits for a start. Initial Establishment of the Websocket connection is client to server of course. I don't personally see how adding encryption makes using something like ZeroMQ a problem ? If it's the fastest protocol without transport encryption, it should remain the fastest one WITH transport layer encryption. WS-Eventing still requires bidirectional connection establishment. This isn't going to fly with clients where one of the nodes is behind a NAT device. We looked at that, but appeared to be a non-starter. In my opinion, Websockets will likely represent the future of Internet Push or Publish/Subscribe Traffic (It's a hunch). The first few messaging systems which embrace it are likely to dominate. I was hoping ZeroMQ might have been going that way also. RabbitMQ has a websocket transport, going to try that out next week. Regards Mark Farnan Director, Product Development Petrolink Services Inc +1 281 908 9814 From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Bennie Kloosteman Sent: Friday, July 06, 2012 10:41 AM To: ZeroMQ development list Subject: Re: [zeromq-dev] Websockets as a Transport ? Hi Mark, Web socket uses tcp underneath so getting through the firewall is no issue just use port 80 , and in fact web sockets ( and things that use port 80 ) have issues with some ISP html proxy servers and load balancers and it will take time for these products to mature to handle web sockets. AFAIK web sockets is also client to server and most clients already have open all ports out and few in , if you want in a solution like Microsoft Azure uses is ideal ( they have a tcp connection , it tries to open a firewall port to receive and if it fails it relays it via the cloud - but in the best case you have direct client to client connections) I would not trust https too much it does not add a lot , make sure the authentication is good. Also by the time you add the higher level costs like encryption what is the point to using a light weight protocol like zeromq ? You may as well use a nice API like WS-Eventing which can still do 3ms packets ( 100Kpackets/sec per server) Ben On Fri, Jul 6, 2012 at 6:53 AM, Mark Farnan wrote: Correct, What I am after is a bit different. I am looking for using Websockets as native transport, machine to machine running ZeroMQ natively at each end, across firewalls. For our case we can't rely on a TCP port being open to work through. Websockets provides the ideal transport protocol for this. i.e. Connects Https Handles Security (even basic Auth is fine, as it is HttpS). Upgrades the connection to Websocket wss ZeroMQ runs 'as is' over the now established Websocket. This, or something similar, is what I am thinking. (You can actually do all of this in one step with a http connect and upgrade frame) So ideally a client would provide the address, i.e. "wss://someserver.someplace.com/something", to the Socket Connect function, along with an optional username and PW, It establishes the session, and ZeroMQ works as before from there. The ZeroMQ receiving the connection would need a registered callback of some kind to handle the authentication, which just passes back 'true or false' if its accepted or not. Would anyone else maybe interested in doing this ? Regards Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120706/9100c1f0/attachment.htm From ian.barber at gmail.com Sat Jul 7 07:28:14 2012 From: ian.barber at gmail.com (Ian Barber) Date: Sat, 7 Jul 2012 06:28:14 +0100 Subject: [zeromq-dev] Using zeroMQ socket from freeradius module In-Reply-To: References: Message-ID: On Fri, Jul 6, 2012 at 3:11 PM, Max Kuznecov wrote: > Oh, sorry I forgot to mention versions: > linux centos 6.2, zeromq 2.2.0 > > Is the context created in the process before the fork happens? Might be worth trying moving where the context and socket are created - it can be tricky with fork after context creation as the IO thread is created, the context handle is copied with the fork, but the thread isn't. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/d9714de9/attachment.htm From mek at mek.uz.ua Sat Jul 7 13:18:32 2012 From: mek at mek.uz.ua (Max Kuznecov) Date: Sat, 7 Jul 2012 14:18:32 +0300 Subject: [zeromq-dev] Using zeroMQ socket from freeradius module In-Reply-To: References: Message-ID: Indeed! Looks like freeradius instantiates its modules before forking. I've postponed context/socket initialization and now everything works perfectly. Thank you very much! 2012/7/7 Ian Barber : > > > On Fri, Jul 6, 2012 at 3:11 PM, Max Kuznecov wrote: >> >> Oh, sorry I forgot to mention versions: >> linux centos 6.2, zeromq 2.2.0 >> > > Is the context created in the process before the fork happens? Might be > worth trying moving where the context and socket are created - it can be > tricky with fork after context creation as the IO thread is created, the > context handle is copied with the fork, but the thread isn't. > > Ian > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- ~syhpoon From mark_sutheran at yahoo.com Sat Jul 7 15:42:42 2012 From: mark_sutheran at yahoo.com (Mark Sutheran) Date: Sat, 7 Jul 2012 06:42:42 -0700 (PDT) Subject: [zeromq-dev] Asymmetrical PUB-SUB problem Message-ID: <1341668562.77211.YahooMailNeo@web160306.mail.bf1.yahoo.com> I'm having a strange?asymmetrical?problem with tcp PUB/SUB between two boxes - it appears to fail one way. Details:? * zeromq version: 3.2, using the Java wrapper. * Scenario has two machines A (Ubuntu, x64) and B (Angstrom, arm8) * Both connected directly via wireless interface (B is acting as AP). Scenario 1: A->B. All as expected. * Box A:PUB bind wlan0 - publish messages 1x per second. *?Box?A:SUB connect - see messages, yay! *?Box?B:SUB connect - see messages, yay! Scenario 2: B->A. Problem *?Box?B:PUB bind wlan0 - publish messages 1x per second. *?Box?B:SUB connect - see messages, yay! *?Box?A:SUB connect - no messages, boo! However, if I change pattern... Scenario 3: Comparison *?Box?A: REQ - make n requests. *?Box?B: REP - send n replies. Replies received on Machine A as expected. Yay. There are absolutely no messages received at the SUB on A from the PUB on B (irrespective of the process start order) however, connecting a SUB on B to the interface's ip works fine. If I reverse the boxes I see the behaviour I expect - i.e. the SUBs on both boxes see the messages. As a contrast: if I run a REQ on A and REP on B, everything works as expected and the message sent from B is received at A. This is presumably a problem with my hardware/OS but I'm not sure even where to start looking... any pointers would be greatly appreciated. Cheers, Mark -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/aab2fab0/attachment.htm From jhawk28 at gmail.com Sat Jul 7 16:14:32 2012 From: jhawk28 at gmail.com (Joshua Foster) Date: Sat, 07 Jul 2012 10:14:32 -0400 Subject: [zeromq-dev] Asymmetrical PUB-SUB problem In-Reply-To: <1341668562.77211.YahooMailNeo@web160306.mail.bf1.yahoo.com> References: <1341668562.77211.YahooMailNeo@web160306.mail.bf1.yahoo.com> Message-ID: <4FF84448.6080306@gmail.com> Try binding to * on box b when publishing. Joshua > Mark Sutheran > July 7, 2012 9:42 AM > I'm having a strange asymmetrical problem with tcp PUB/SUB between two > boxes - it appears to fail one way. > > Details: > * zeromq version: 3.2, using the Java wrapper. > * Scenario has two machines A (Ubuntu, x64) and B (Angstrom, arm8) > * Both connected directly via wireless interface (B is acting as AP). > > Scenario 1: A->B. All as expected. > * Box A:PUB bind wlan0 - publish messages 1x per second. > * Box A:SUB connect - see messages, yay! > * Box B:SUB connect - see messages, yay! > > Scenario 2: B->A. Problem > * Box B:PUB bind wlan0 - publish messages 1x per second. > * Box B:SUB connect - see messages, yay! > * Box A:SUB connect - no messages, boo! > > However, if I change pattern... > > Scenario 3: Comparison > * Box A: REQ - make n requests. > * Box B: REP - send n replies. Replies received on Machine A as > expected. Yay. > > There are absolutely no messages received at the SUB on A from the PUB > on B (irrespective of the process start order) however, connecting a > SUB on B to the interface's ip works fine. If I reverse the boxes I > see the behaviour I expect - i.e. the SUBs on both boxes see the > messages. As a contrast: if I run a REQ on A and REP on B, everything > works as expected and the message sent from B is received at A. > > This is presumably a problem with my hardware/OS but I'm not sure even > where to start looking... any pointers would be greatly appreciated. > > Cheers, > Mark > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/9890e689/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/9890e689/attachment.jpg From mark_sutheran at yahoo.com Sat Jul 7 16:36:26 2012 From: mark_sutheran at yahoo.com (Mark Sutheran) Date: Sat, 7 Jul 2012 07:36:26 -0700 (PDT) Subject: [zeromq-dev] Asymmetrical PUB-SUB problem In-Reply-To: <4FF84448.6080306@gmail.com> References: <1341668562.77211.YahooMailNeo@web160306.mail.bf1.yahoo.com> <4FF84448.6080306@gmail.com> Message-ID: <1341671786.85047.YahooMailNeo@web160305.mail.bf1.yahoo.com> Thanks for the suggestion Joshua. Unfortunately this doesn't fix the problem. (I restricted the publisher to the one interface in order to avoid any possible confusion due to?potential?routing through some other interface) However to add to the information - the SUB on box B can successfully connect to and receive data from any valid interface (wlan0, localhost, eth0) when the PUB binds to *. Cheers, Mark ________________________________ From: Joshua Foster To: Mark Sutheran ; ZeroMQ development list Sent: Saturday, 7 July 2012, 22:14 Subject: Re: [zeromq-dev] Asymmetrical PUB-SUB problem Try binding to * on box b when publishing. Joshua Mark Sutheran >July 7, 2012 9:42 AM >I'm having a strange?asymmetrical?problem with tcp PUB/SUB between two boxes - it appears to fail one way. > > > >Details:? >* zeromq version: 3.2, using the Java wrapper. >* Scenario has two machines A (Ubuntu, x64) and B (Angstrom, arm8) >* Both connected directly via wireless interface (B is acting as AP). > > >Scenario 1: A->B. All as expected. >* Box A:PUB bind wlan0 - publish messages 1x per second. >*?Box?A:SUB connect - see messages, yay! >*?Box?B:SUB connect - see messages, yay! > > >Scenario 2: B->A. Problem >*?Box?B:PUB bind wlan0 - publish messages 1x per second. >*?Box?B:SUB connect - see messages, yay! >*?Box?A:SUB connect - no messages, boo! > > >However, if I change pattern... > > >Scenario 3: Comparison >*?Box?A: REQ - make n requests. >*?Box?B: REP - send n replies. Replies received on Machine A as expected. Yay. > > >There are absolutely no messages received at the SUB on A from the PUB on B (irrespective of the process start order) however, connecting a SUB on B to the interface's ip works fine. If I reverse the boxes I see the behaviour I expect - i.e. the SUBs on both boxes see the messages. As a contrast: if I run a REQ on A and REP on B, everything works as expected and the message sent from B is received at A. > > >This is presumably a problem with my hardware/OS but I'm not sure even where to start looking... any pointers would be greatly appreciated. > > >Cheers, >Mark > > >_______________________________________________ >zeromq-dev mailing list >zeromq-dev at lists.zeromq.org >http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/3deea357/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/3deea357/attachment.jpg From bklooste at gmail.com Sat Jul 7 17:48:05 2012 From: bklooste at gmail.com (Bennie Kloosteman) Date: Sat, 7 Jul 2012 23:48:05 +0800 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: <017801cd5bd5$b0804390$1180cab0$@petrolink.com> References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> <043801cd5b00$f84d8550$e8e88ff0$@petrolink.com> <017801cd5bd5$b0804390$1180cab0$@petrolink.com> Message-ID: On Sat, Jul 7, 2012 at 8:16 AM, Mark Farnan wrote: > Hi Ben,**** > > ** ** > > HttpS (more specifically SSL) is mandatory requirement in the Industry, > just forget trying to do anything without it that involves the Internet. > I know but you said minimal authentication , if you break the authentication you can create an SSL socket. I have also wondered about HTTPS on private network , people with network access have admin and can watch your packets and on the internet it is really hard to separate a single http channel in a gigabit traffic stream ( I tried )... It does cover low speed ISPs and wireless connections where people don't turn on encryption and that makes it essential . > **** > > ** ** > > You are correct that Websockets uses TCP underneath, just the same as HTTP > uses TCP underneath, and that?s also the issue. The protocol for Websocket > establishment works over 80/443 in places where trying to do a TCP open > will FAIL. (we?ve tested it). There are any number of statefull firewalls > which will allow the initial HTTPS connection, but will block a TCP one. > So are they look for a http in the header ? That's easy enough to dummy ... I have frequently used tcp over port 80 which works through most firewalls unless you have a nasty http proxy server / load balancer but a lot of those ( not all ) also have issues with web sockets. > **** > > ** ** > > It will also fail a security Audit, as it is against Policy of the major > companies in question. I?m referring here to some of the biggest Oil > companies in the world. (Policies we can?t change). > How can it fail when web sockets do the same thing ..I worked for a major merchant bank and if you had a good reason security was normally granted. You may be stuck with a requirement for encryption which can make sense, > **** > > ** ** > > Websockets uses standard HTTP/S methods to upgrade the connection. We > have found issues using straight ws:// connection due to some firewalls, > but so far almost everything allows wss:// which is SSL Websocket, > upgraded from a HTTPS connection. It is this upgrade mechanism that is > critical for it to work. > That is useful a friend had a look at it last year and had some hassles. That said unless you have tested MANY ISP I would extremely careful with a new technology. especially transparent http proxies , load balancers which can be 10 year old boxes and nasty things like the great firewall. I mean some isp love breaking long connections since you may be hogging resources. > **** > > ** ** > > Websockets are bidirectional once established, not ?client server?. We > also don?t want to use STUN, ICE or any of the Nat traversal mechanisms via > the ?cloud?. That will also fail security audits for a start. Initial > Establishment of the Websocket connection is client to server of course. > Its still client server even if bi directional eg you cant have 2 clients communicating directly without going to your server. Its just the client is piggy backing on the return channel which makes it similar to bi directional but unlike real bi directional system if the one socket goes the connection goes. > ** ** > > I don?t personally see how adding encryption makes using something like > ZeroMQ a problem ? If it?s the fastest protocol without transport > encryption, it should remain the fastest one WITH transport layer > encryption. > Once you add the encryption and internet latency the difference becomes very small possibly negligible. **** > ** ** > > WS-Eventing still requires bidirectional connection establishment. This > isn?t going to fly with clients where one of the nodes is behind a NAT > device. We looked at that, but appeared to be a non-starter.**** > > ** > Nope ,nothing in the spec says that only the common implementations are bi directional .I have seen store and forward and I built a system with WS-Eventing where the clients ( 3000 windows mobile handhelds behind many different NATs) polled a message holding service which held the eventing server for new messages. Building push was also possible , since it was WCF based I quickly build a prototype ( change the binding and hook it up to where the polled messages were dispatched ) which automatically used a connection similar to web sockets but it didn't make it because we had many connection drop outs(mobile nets) and there were a few bugs to sort out which would make it too expensive . > ** > > ** ** > > In my opinion, Websockets will likely represent the future of Internet > Push or Publish/Subscribe Traffic (It?s a hunch). The first few messaging > systems which embrace it are likely to dominate. I was hoping ZeroMQ might > have been going that way also. > I really have seen little use for these roles, to me the compelling roll for web sockets is to write more complex html5 javascript apps that use them due to a simple API will less security hassles . Not to replace messaging systems which all have ways through firewalls already. For many cases the cloud based connection services offer a compelling argument due to the possibility of server less communication for many clients and a fall back to relay. And for internet based system a huge issue in communication is still the protocol hence FIX and SOA /WSEventing wsdl systems have a big place. Many messaging systems like zeroMQ are used in merchant banks and things like that and they are counting every tenth of a milli second especially for price information and frequent trading systems. In many of those environments they use private links so no need for encryption. So to me its likely that messaging will remain fragmented. I thought the same about WS-Eventing and to me its a great system , very flexible ( eg easy to hook in many systems , or down load events to new servers to handle alsmots limitless load ) but few people have used it - public internet pub sub itsefl is not that popular, both of which to me are dissapointing. > **** > > ** ** > > RabbitMQ has a websocket transport, going to try that out next week. > It makes more sense for AMQP based systems , they are more complex/ flexible and less light weight. I havent heard anyone in ZeroMq using http yet alone https though im only a casual observer now. Regards, Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/0e6afa9e/attachment.htm From mark_sutheran at yahoo.com Sat Jul 7 18:22:25 2012 From: mark_sutheran at yahoo.com (Mark Sutheran) Date: Sat, 7 Jul 2012 09:22:25 -0700 (PDT) Subject: [zeromq-dev] Asymmetrical PUB-SUB problem In-Reply-To: <1341671786.85047.YahooMailNeo@web160305.mail.bf1.yahoo.com> References: <1341668562.77211.YahooMailNeo@web160306.mail.bf1.yahoo.com> <4FF84448.6080306@gmail.com> <1341671786.85047.YahooMailNeo@web160305.mail.bf1.yahoo.com> Message-ID: <1341678145.8240.YahooMailNeo@web160302.mail.bf1.yahoo.com> Ok, apols - looks like it's my bad! Rebuilt all the libs on the client box (A) to the latest and greatest and the problem went away. So I guess this was a backwards-only?compatibility?issue between different versions (fits the pattern) Cheers, Mark ________________________________ From: Mark Sutheran To: ZeroMQ development list Sent: Saturday, 7 July 2012, 22:36 Subject: Re: [zeromq-dev] Asymmetrical PUB-SUB problem Thanks for the suggestion Joshua. Unfortunately this doesn't fix the problem. (I restricted the publisher to the one interface in order to avoid any possible confusion due to?potential?routing through some other interface) However to add to the information - the SUB on box B can successfully connect to and receive data from any valid interface (wlan0, localhost, eth0) when the PUB binds to *. Cheers, Mark ________________________________ From: Joshua Foster To: Mark Sutheran ; ZeroMQ development list Sent: Saturday, 7 July 2012, 22:14 Subject: Re: [zeromq-dev] Asymmetrical PUB-SUB problem Try binding to * on box b when publishing. Joshua Mark Sutheran >July 7, 2012 9:42 AM >I'm having a strange?asymmetrical?problem with tcp PUB/SUB between two boxes - it appears to fail one way. > > > >Details:? >* zeromq version: 3.2, using the Java wrapper. >* Scenario has two machines A (Ubuntu, x64) and B (Angstrom, arm8) >* Both connected directly via wireless interface (B is acting as AP). > > >Scenario 1: A->B. All as expected. >* Box A:PUB bind wlan0 - publish messages 1x per second. >*?Box?A:SUB connect - see messages, yay! >*?Box?B:SUB connect - see messages, yay! > > >Scenario 2: B->A. Problem >*?Box?B:PUB bind wlan0 - publish messages 1x per second. >*?Box?B:SUB connect - see messages, yay! >*?Box?A:SUB connect - no messages, boo! > > >However, if I change pattern... > > >Scenario 3: Comparison >*?Box?A: REQ - make n requests. >*?Box?B: REP - send n replies. Replies received on Machine A as expected. Yay. > > >There are absolutely no messages received at the SUB on A from the PUB on B (irrespective of the process start order) however, connecting a SUB on B to the interface's ip works fine. If I reverse the boxes I see the behaviour I expect - i.e. the SUBs on both boxes see the messages. As a contrast: if I run a REQ on A and REP on B, everything works as expected and the message sent from B is received at A. > > >This is presumably a problem with my hardware/OS but I'm not sure even where to start looking... any pointers would be greatly appreciated. > > >Cheers, >Mark > > >_______________________________________________ >zeromq-dev mailing list >zeromq-dev at lists.zeromq.org >http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/8b0301ff/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120707/8b0301ff/attachment.jpg From Sharon.Ben-Asher at avg.com Sun Jul 8 08:40:04 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Sun, 8 Jul 2012 06:40:04 +0000 Subject: [zeromq-dev] Error: comparison between signed and unsigned integer expressions Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FC024@ex10czdmb01> Hi Pieter, Here you go Issue LIBZMQ-394 - socklen_t is signed int in Android NDK Now, I will be glad for some pointer on my linkage error ... thanks :) Sharon From: Pieter Hintjens Sent: Thu, 5 Jul 2012 19:02:33 +0900 To: ZeroMQ development list Subject: Re: [zeromq-dev] Error: comparison between signed and unsigned integer expressions Hi Sharon, OK, so socklen_t is definitely signed on your platform. If you would make an issue in Jira, I'll make a patch for all current 0MQ versions. Thanks Pieter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120708/ad2b26b0/attachment.htm From Sharon.Ben-Asher at avg.com Sun Jul 8 10:35:39 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Sun, 8 Jul 2012 08:35:39 +0000 Subject: [zeromq-dev] Error: cannot link with -lzmq Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FD08E@ex10czdmb01> Ok, I solved the issue by installing gcc-multilib and g++-multilib packages. Maybe you should mention this in the Android build webpage? Thanks, Sharon From: Sharon Ben-Asher Sent: Thursday, July 05, 2012 1:29 PM To: 'zeromq-dev at lists.zeromq.org' Subject: Error: cannot link with -lzmq Hello again, After successful build of the C lib, I have a problem with building zmq.jar: configure:15622: checking for zmq_init in -lzmq configure:15647: g++ -o conftest -g -O2 -D_REENTRANT -D_THREAD_SAFE -fPIC -I/home/sharon/zeromq-android/include -L/home/sharon/zeromq-android/lib conftest.cpp -lzmq >&5 /usr/bin/ld: skipping incompatible /home/sharon/zeromq-android/lib/libzmq.so when searching for -lzmq /usr/bin/ld: skipping incompatible /home/sharon/zeromq-android/lib/libzmq.a when searching for -lzmq /usr/bin/ld: cannot find -lzmq collect2: ld returned 1 exit status Thanks Sharon From: Sharon Ben-Asher Sent: Thursday, July 05, 2012 12:56 PM To: 'zeromq-dev at lists.zeromq.org' Subject: RE: Error: comparison between signed and unsigned integer expressions I solved the problem by converting the sizeof to int like this if (sa->sa_family == AF_INET && sa_len >= (int)sizeof (address.ipv4)) { I guess it's a platform specific issue? Anyway, it is needed to compile the lib for ARM. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120708/c5dcca1d/attachment.htm From ph at imatix.com Mon Jul 9 02:42:51 2012 From: ph at imatix.com (Pieter Hintjens) Date: Mon, 9 Jul 2012 09:42:51 +0900 Subject: [zeromq-dev] Error: cannot link with -lzmq In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B2E7FD08E@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B2E7FD08E@ex10czdmb01> Message-ID: Hi Sharon, > I solved the issue by installing gcc-multilib and g++-multilib packages. > Maybe you should mention this in the Android build webpage? It's a wiki, go ahead and edit that page. -Pieter From ph at imatix.com Mon Jul 9 03:41:26 2012 From: ph at imatix.com (Pieter Hintjens) Date: Mon, 9 Jul 2012 10:41:26 +0900 Subject: [zeromq-dev] Weird Fish Book Message-ID: Hi all, FYI, the 0MQ Weird Fish Book (based on the Guide) is coming out in paper sometime soon, and is available in Safari: http://my.safaribooksonline.com/book/-/9781449334437 Thanks to the many people who contributed examples, errata, and suggestions! -Pieter From thatch45 at gmail.com Mon Jul 9 06:53:24 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Sun, 8 Jul 2012 22:53:24 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion Message-ID: Hi, I have a report of an assertion in Salt. It is very rare and I cannot reliably reproduce it. The user that has reported it gave me a strace output which makes it look like the assertion is happening in a multiprocess. I am aware that you cannot have the same socket call from another thread or process, but I see no indication that this is the case. Here is the trace: 14:51:29.164045 epoll_wait(9, {{EPOLLIN, {u32=44624800, u64=44624800}}}, 256, 4294967295) = 1 14:51:55.130374 poll([{fd=8, events=POLLIN}], 1, 0) = 1 ([{fd=8, revents=POLLIN}]) 14:51:55.130428 write(2, "Assertion failed: ok (mailbox.cpp:84)\n", 38) = -1 EBADF (Bad file descriptor) 14:51:55.130466 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 14:51:55.130500 tgkill(5969, 5980, SIGABRT) = 0 14:51:55.130530 --- SIGABRT (Aborted) @ 0 (0) --- Any ideas? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120708/86789c79/attachment.htm From Lev at visionmap.com Mon Jul 9 09:49:12 2012 From: Lev at visionmap.com (Lev Borovoi) Date: Mon, 9 Jul 2012 10:49:12 +0300 Subject: [zeromq-dev] "Hello world" example crashes on 3.2.0 Message-ID: Hi I tried to run the "Hello world" server source (see http://zguide.zeromq.org/page:all#toc5). Since I want to use 0mq 3.2.0 rather than 2.2.0, I replaced zmq_recv by zmq_recvmsg and zmq_send by zmq_sendmsg. However, when I start the client, the server crashes with this message: Assertion failed: (msg_->flags () & msg_t::identity) == 0 (..\..\..\src\router.cpp:222) Since I'm running this on Windows, I also replaced sleep(1) with Sleep(1000). What am I doing wrong and how should I fix it? This email and any files transmitted with it are confidential and contain proprietary information belonging to VisionMap Ltd. VisionMap Ltd. asserts in respect of this email and any files transmitted with it all rights for confidentiality and proprietary interests to the fullest extent permitted by law. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/b64254cb/attachment.htm From ph at imatix.com Mon Jul 9 10:40:45 2012 From: ph at imatix.com (Pieter Hintjens) Date: Mon, 9 Jul 2012 17:40:45 +0900 Subject: [zeromq-dev] "Hello world" example crashes on 3.2.0 In-Reply-To: References: Message-ID: Lev, > I tried to run the ?Hello world? server source (see > http://zguide.zeromq.org/page:all#toc5). Since I want to use 0mq 3.2.0 > rather than 2.2.0, I replaced zmq_recv by zmq_recvmsg and zmq_send by > zmq_sendmsg. However, when I start the client, the server crashes with this > message: > > Assertion failed: (msg_->flags () & msg_t::identity) == 0 > (..\..\..\src\router.cpp:222) I could not reproduce this. Could you send the actual client and server code that you used? Thanks Pieter From ph at imatix.com Mon Jul 9 10:52:45 2012 From: ph at imatix.com (Pieter Hintjens) Date: Mon, 9 Jul 2012 17:52:45 +0900 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: Hi Thomas, Can you definitely exclude that sockets end up in the wrong thread? I mean, are you at any time passing socket handles between threads? -Pieter On Mon, Jul 9, 2012 at 1:53 PM, Thomas S Hatch wrote: > Hi, > > I have a report of an assertion in Salt. It is very rare and I cannot > reliably reproduce it. The user that has reported it gave me a strace output > which makes it look like the assertion is happening in a multiprocess. I am > aware that you cannot have the same socket call from another thread or > process, but I see no indication that this is the case. > > Here is the trace: > > 14:51:29.164045 epoll_wait(9, {{EPOLLIN, {u32=44624800, u64=44624800}}}, > 256, 4294967295) = 1 > 14:51:55.130374 poll([{fd=8, events=POLLIN}], 1, 0) = 1 ([{fd=8, > revents=POLLIN}]) > 14:51:55.130428 write(2, "Assertion failed: ok (mailbox.cpp:84)\n", 38) = -1 > EBADF (Bad file descriptor) > 14:51:55.130466 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 > 14:51:55.130500 tgkill(5969, 5980, SIGABRT) = 0 > 14:51:55.130530 --- SIGABRT (Aborted) @ 0 (0) --- > > Any ideas? > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From rblists at gmail.com Mon Jul 9 11:40:01 2012 From: rblists at gmail.com (Raphael Bauduin) Date: Mon, 9 Jul 2012 11:40:01 +0200 Subject: [zeromq-dev] Interrupted System Call: advice to handle it In-Reply-To: <01B73EA7-9C85-467A-AF3E-533BC52E5945@chuckremes.com> References: <01B73EA7-9C85-467A-AF3E-533BC52E5945@chuckremes.com> Message-ID: On Wed, Jul 4, 2012 at 5:20 PM, Chuck Remes wrote: > > On Jul 4, 2012, at 5:05 AM, Raphael Bauduin wrote: > >> Hi, >> >> I'm using the ruby zmq bindings in a web application. I regularly get >> error message "ZMQ::Error: Interrupted system call" related to a send. >> This is in a Ruby on Rails application served with passenger, which >> spawns worker processes. I think I have identified a process that >> generated this error, and an strace on it shows no activity at all. >> This process however keeps open a connection to the mysql server. An >> accumulation of such errors will eventually become problematic server >> side, in addition to clients getting an error page and messages being >> lost. > > I'm assuming this happens under MRI. Is it 1.8.x or 1.9.x? It is REE: ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02 > > Do you see the same behavior when running your app with JRuby or Rubinius? > The problem is that I don't have the problem systematically. It happens once every x days in production where there are thousands of page views that run the code in question. So it's very hard to reproduce. >> I'm looking for advice in avoiding this error and possibly for further >> debugging hints. Related to that I have several questions: >> - Should I simply catch this exception, and retry the send if needed? >> As this is done in the process sending the page content back to the >> client, won't it possibly make some requests too slow? (This could >> still be better than an error as we have currently) > > Using exception handling for flow control in Ruby can be slow. But unless you are building the next amazon.com then it probably won't hurt you too much. You could give this a try though it's always better to figure out the actual underlying cause and fix it. Using exceptions here is just a band-aid. > >> - If my understanding is correct, the problem occurs with blocking >> syscalls, and requests having the error don't return any content to >> the client. But what happens if I make the send non blocking? >> (http://zeromq.github.com/rbzmq/classes/ZMQ/Socket.html#M000010) > > Try it and see. My question was more about knowing if the same problem could occur. As mentioned above, I can't reproduce the problem systematically. > >> - Finally, what might interrupt the syscall? Any interesting read about this? > > Something in your app is generating a signal. The technique I use to figure out these kinds of errors is to run my app under other Ruby runtimes. Most of the time they will fail differently and/or give me an exact backtrace pointing to the source of the problem. Can it also be a signal coming from outside the app, eg passenger? Or can it be due to the fact that I set the LINGER option? s.setsockopt(ZMQ::LINGER,100) .. s.send(m) s.close Any suggestion on this would be really welcome! > > Lastly, you may want to look at the ffi-rzmq gem (disclaimer: I'm its maintainer). It has a different API from the zmq gem but it appears to enjoy wider usage by the community so it may be a bit more stable. Thanks for the tip, I add it as an option, but I'd like to understand what's going on too. Raph > > cr > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Web database: http://www.myowndb.com Free Software Developers Meeting: http://www.fosdem.org From thatch45 at gmail.com Mon Jul 9 20:13:09 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Mon, 9 Jul 2012 12:13:09 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: No, I am confident that we are not passing sockets through threads or processes. Could this have anything to do with closing and re opening connections? On Mon, Jul 9, 2012 at 2:52 AM, Pieter Hintjens wrote: > Hi Thomas, > > Can you definitely exclude that sockets end up in the wrong thread? I > mean, are you at any time passing socket handles between threads? > > -Pieter > > On Mon, Jul 9, 2012 at 1:53 PM, Thomas S Hatch wrote: > > Hi, > > > > I have a report of an assertion in Salt. It is very rare and I cannot > > reliably reproduce it. The user that has reported it gave me a strace > output > > which makes it look like the assertion is happening in a multiprocess. I > am > > aware that you cannot have the same socket call from another thread or > > process, but I see no indication that this is the case. > > > > Here is the trace: > > > > 14:51:29.164045 epoll_wait(9, {{EPOLLIN, {u32=44624800, u64=44624800}}}, > > 256, 4294967295) = 1 > > 14:51:55.130374 poll([{fd=8, events=POLLIN}], 1, 0) = 1 ([{fd=8, > > revents=POLLIN}]) > > 14:51:55.130428 write(2, "Assertion failed: ok (mailbox.cpp:84)\n", 38) > = -1 > > EBADF (Bad file descriptor) > > 14:51:55.130466 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 > > 14:51:55.130500 tgkill(5969, 5980, SIGABRT) = 0 > > 14:51:55.130530 --- SIGABRT (Aborted) @ 0 (0) --- > > > > Any ideas? > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/d05c1cd9/attachment.htm From ian.barber at gmail.com Mon Jul 9 20:52:05 2012 From: ian.barber at gmail.com (Ian Barber) Date: Mon, 9 Jul 2012 19:52:05 +0100 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 7:13 PM, Thomas S Hatch wrote: > No, I am confident that we are not passing sockets through threads or > processes. > Could this have anything to do with closing and re opening connections? > Do you pull the FD out directly, or is this just from accessing via the regular ZMQ_ functions? Also, do you have any idea how quickly a socket might be destroyed and recreated or similar? Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/20fd83ff/attachment.htm From thatch45 at gmail.com Mon Jul 9 20:58:11 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Mon, 9 Jul 2012 12:58:11 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 12:52 PM, Ian Barber wrote: > > > On Mon, Jul 9, 2012 at 7:13 PM, Thomas S Hatch wrote: > >> No, I am confident that we are not passing sockets through threads or >> processes. >> Could this have anything to do with closing and re opening connections? >> > > Do you pull the FD out directly, or is this just from accessing via the > regular ZMQ_ functions? Also, do you have any idea how quickly a socket > might be destroyed and recreated or similar? > > Ian > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > There is an option in Salt that makes the SUB socket close and reconnect to the master every N seconds to recover from disconnection over unreliable connections, aka the internet. The default is every 60 seconds It just uses the regular ZMQ function via pyzmq -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/72dea619/attachment.htm From lists at chuckremes.com Mon Jul 9 21:14:24 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 9 Jul 2012 14:14:24 -0500 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Jul 9, 2012, at 1:58 PM, Thomas S Hatch wrote: > On Mon, Jul 9, 2012 at 12:52 PM, Ian Barber wrote: > > > On Mon, Jul 9, 2012 at 7:13 PM, Thomas S Hatch wrote: > No, I am confident that we are not passing sockets through threads or processes. > Could this have anything to do with closing and re opening connections? > > Do you pull the FD out directly, or is this just from accessing via the regular ZMQ_ functions? Also, do you have any idea how quickly a socket might be destroyed and recreated or similar? > > Ian > > > There is an option in Salt that makes the SUB socket close and reconnect to the master every N seconds to recover from disconnection over unreliable connections, aka the internet. The default is every 60 seconds > > It just uses the regular ZMQ function via pyzmq Can we assume that this socket is removed from the poll items list that zmq_poll() uses? (I am assuming you are using zmq_poll() in Salt and that these SUB sockets are added/deleted as necessary.) cr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/23e20240/attachment.htm From thatch45 at gmail.com Mon Jul 9 21:17:06 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Mon, 9 Jul 2012 13:17:06 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 1:14 PM, Chuck Remes wrote: > > On Jul 9, 2012, at 1:58 PM, Thomas S Hatch wrote: > > On Mon, Jul 9, 2012 at 12:52 PM, Ian Barber wrote: > >> >> >> On Mon, Jul 9, 2012 at 7:13 PM, Thomas S Hatch wrote: >> >>> No, I am confident that we are not passing sockets through threads or >>> processes. >>> Could this have anything to do with closing and re opening connections? >>> >> >> Do you pull the FD out directly, or is this just from accessing via the >> regular ZMQ_ functions? Also, do you have any idea how quickly a socket >> might be destroyed and recreated or similar? >> >> Ian >> >> > There is an option in Salt that makes the SUB socket close and reconnect > to the master every N seconds to recover from disconnection over unreliable > connections, aka the internet. The default is every 60 seconds > > It just uses the regular ZMQ function via pyzmq > > > Can we assume that this socket is removed from the poll items list that > zmq_poll() uses? (I am assuming you are using zmq_poll() in Salt and that > these SUB sockets are added/deleted as necessary.) > > cr > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > Yes, they are, here is the code: https://github.com/saltstack/salt/blob/develop/salt/minion.py#L470 I do not doubt that I have made a mistake in here -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/fead149c/attachment.htm From lists at chuckremes.com Mon Jul 9 21:43:08 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 9 Jul 2012 14:43:08 -0500 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Jul 9, 2012, at 2:17 PM, Thomas S Hatch wrote: > Yes, they are, here is the code: > https://github.com/saltstack/salt/blob/develop/salt/minion.py#L470 > > I do not doubt that I have made a mistake in here I see that you are unregistering, closing the socket, and then immediately creating a new socket with the same IDENTITY. I did not see any code setting the LINGER option to drop packets, so if a late packet arrives I suppose it could cause that zmq_close() to hang. Alternately, reusing the IDENTITY before the socket is completely closed (an async operation) may be a cause. Any chance you can close the socket and then schedule (within your loop) the creation of a replacement socket a few milliseconds later? These are just two guesses based on 5m review of the code. I hope it sparks an idea or a new avenue to pursue. cr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/4e400880/attachment.htm From thatch45 at gmail.com Mon Jul 9 21:59:54 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Mon, 9 Jul 2012 13:59:54 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 1:43 PM, Chuck Remes wrote: > On Jul 9, 2012, at 2:17 PM, Thomas S Hatch wrote: > > Yes, they are, here is the code: > https://github.com/saltstack/salt/blob/develop/salt/minion.py#L470 > > I do not doubt that I have made a mistake in here > > > I see that you are unregistering, closing the socket, and then immediately > creating a new socket with the same IDENTITY. > > I did not see any code setting the LINGER option to drop packets, so if a > late packet arrives I suppose it could cause that zmq_close() to hang. > > Alternately, reusing the IDENTITY before the socket is completely closed > (an async operation) may be a cause. Any chance you can close the socket > and then schedule (within your loop) the creation of a replacement socket a > few milliseconds later? > > These are just two guesses based on 5m review of the code. I hope it > sparks an idea or a new avenue to pursue. > > cr > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > Thanks! Is there a way to check if the socket is completely closed? will socket.closed accurately return this data? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/7468fb69/attachment.htm From edwinamsler at thinkboxsoftware.com Mon Jul 9 22:24:21 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Mon, 09 Jul 2012 15:24:21 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark Message-ID: <4FFB3DF5.7010407@thinkboxsoftware.com> So here I am, publishing messages through ZeroMQ's send() function at about 300MB/s, and my network's set to only send at 10MB/s. This is kind of a big problem because, while I don't care if the clients loose data on their end, the server is either using its memory until it crashes, or I'm setting its high water mark and loosing about 29 of every thirty messages I produce because I don't know that ZeroMQ can't keep up. Ideally, when a HWM condition happened, send() would return false, then I'd test EAGAIN so I could decide for myself whether I should drop the message, or retry later. With that kind of functionality, I could throttle back my producer algorithm so that I exactly meet the demand of ZeroMQ instead of overwhelming/starving it out. I'm willing to do the work if this sort of addition makes sense to the rest of the project. I'd rather contribute here instead of forking it off in some forgotten repository. Can/should this be done? Is there someone out there willing to mentor me? Thanks, Edwin -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/440bc088/attachment.htm From thatch45 at gmail.com Mon Jul 9 22:26:24 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Mon, 9 Jul 2012 14:26:24 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 1:59 PM, Thomas S Hatch wrote: > > > On Mon, Jul 9, 2012 at 1:43 PM, Chuck Remes wrote: > >> On Jul 9, 2012, at 2:17 PM, Thomas S Hatch wrote: >> >> Yes, they are, here is the code: >> https://github.com/saltstack/salt/blob/develop/salt/minion.py#L470 >> >> I do not doubt that I have made a mistake in here >> >> >> I see that you are unregistering, closing the socket, and then >> immediately creating a new socket with the same IDENTITY. >> >> I did not see any code setting the LINGER option to drop packets, so if a >> late packet arrives I suppose it could cause that zmq_close() to hang. >> >> Alternately, reusing the IDENTITY before the socket is completely closed >> (an async operation) may be a cause. Any chance you can close the socket >> and then schedule (within your loop) the creation of a replacement socket a >> few milliseconds later? >> >> These are just two guesses based on 5m review of the code. I hope it >> sparks an idea or a new avenue to pursue. >> >> cr >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> Thanks! > Is there a way to check if the socket is completely closed? will > socket.closed accurately return this data? > Actually, I should ask... The main issue we are seeing in here is that the SUB socket looses connection from the PUB socket when connecting over unreliable connections like the internet. Is there a way to detect if the SUB socket is still connected to the PUB socket? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/78dd3bfb/attachment.htm From pelletier.michel at gmail.com Mon Jul 9 22:28:27 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 9 Jul 2012 13:28:27 -0700 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: From ian.barber at gmail.com Mon Jul 9 22:29:19 2012 From: ian.barber at gmail.com (Ian Barber) Date: Mon, 9 Jul 2012 21:29:19 +0100 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFB3DF5.7010407@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: On Mon, Jul 9, 2012 at 9:24 PM, Edwin Amsler < edwinamsler at thinkboxsoftware.com> wrote: > > Ideally, when a HWM condition happened, send() would return false, then > I'd test EAGAIN so I could decide for myself whether I should drop the > message, or retry later. With that kind of functionality, I could throttle > back my producer algorithm so that I exactly meet the demand of ZeroMQ > instead of overwhelming/starving it out. > > This is pretty much how it works with most socket types - if you use the ZMQ_NOBLOCK flag, you'll get the EAGAIN if you've hit HWM. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/d30a445c/attachment.htm From edwinamsler at thinkboxsoftware.com Mon Jul 9 22:31:43 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Mon, 09 Jul 2012 15:31:43 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: <4FFB3FAF.8000809@thinkboxsoftware.com> Guh? Reeeaally? Through my testing the publisher never errored on send, so I didn't test EAGAIN. A large part of the project is in metaphorical pieces on the floor while I redesign something. When I get it back together, I'll test this. Can anyone else confirm that that's what happens even on publisher sockets? On 09/07/2012 3:29 PM, Ian Barber wrote: > > > On Mon, Jul 9, 2012 at 9:24 PM, Edwin Amsler > > wrote: > > > Ideally, when a HWM condition happened, send() would return false, > then I'd test EAGAIN so I could decide for myself whether I should > drop the message, or retry later. With that kind of functionality, > I could throttle back my producer algorithm so that I exactly meet > the demand of ZeroMQ instead of overwhelming/starving it out. > > > This is pretty much how it works with most socket types - if you use > the ZMQ_NOBLOCK flag, you'll get the EAGAIN if you've hit HWM. > > Ian > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/b66eff22/attachment.htm From ian.barber at gmail.com Mon Jul 9 22:32:28 2012 From: ian.barber at gmail.com (Ian Barber) Date: Mon, 9 Jul 2012 21:32:28 +0100 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: On Mon, Jul 9, 2012 at 9:29 PM, Ian Barber wrote: > >> > This is pretty much how it works with most socket types - if you use the > ZMQ_NOBLOCK flag, you'll get the EAGAIN if you've hit HWM. > > Ian > You can see all of the HWM responses here: http://api.zeromq.org/2-1:zmq-socket Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/3cfbeb44/attachment.htm From ian.barber at gmail.com Mon Jul 9 22:34:02 2012 From: ian.barber at gmail.com (Ian Barber) Date: Mon, 9 Jul 2012 21:34:02 +0100 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: On Mon, Jul 9, 2012 at 9:26 PM, Thomas S Hatch wrote: > > Actually, I should ask... > > The main issue we are seeing in here is that the SUB socket looses > connection from the PUB socket when connecting over unreliable connections > like the internet. Is there a way to detect if the SUB socket is still > connected to the PUB socket? > Sort of: Either layer a heartbeat on top, or use the ZMQ_MONITOR stuff in ZMQ3.1+ to look for disconnect events. I suspect you'll get better accuracy with the heartbeat (as it'll catch a multitude of sins), but monitor would easier. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/99515270/attachment.htm From pelletier.michel at gmail.com Mon Jul 9 22:41:43 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 9 Jul 2012 13:41:43 -0700 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFB3DF5.7010407@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: Have you looked at the suicidal snail pattern? http://zguide.zeromq.org/page:all#Slow-Subscriber-Detection-Suicidal-Snail-Pattern -Michel On Mon, Jul 9, 2012 at 1:24 PM, Edwin Amsler wrote: > So here I am, publishing messages through ZeroMQ's send() function at about > 300MB/s, and my network's set to only send at 10MB/s. > > This is kind of a big problem because, while I don't care if the clients > loose data on their end, the server is either using its memory until it > crashes, or I'm setting its high water mark and loosing about 29 of every > thirty messages I produce because I don't know that ZeroMQ can't keep up. > > Ideally, when a HWM condition happened, send() would return false, then I'd > test EAGAIN so I could decide for myself whether I should drop the message, > or retry later. With that kind of functionality, I could throttle back my > producer algorithm so that I exactly meet the demand of ZeroMQ instead of > overwhelming/starving it out. > > I'm willing to do the work if this sort of addition makes sense to the rest > of the project. I'd rather contribute here instead of forking it off in some > forgotten repository. > > Can/should this be done? Is there someone out there willing to mentor me? > > Thanks, > > Edwin > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From edwinamsler at thinkboxsoftware.com Mon Jul 9 22:44:45 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Mon, 09 Jul 2012 15:44:45 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: <4FFB42BD.1030506@thinkboxsoftware.com> No need. I don't even care about subscribers. It's all about feeding the sending state machine efficiently. On 09/07/2012 3:41 PM, Michel Pelletier wrote: > Have you looked at the suicidal snail pattern? > > http://zguide.zeromq.org/page:all#Slow-Subscriber-Detection-Suicidal-Snail-Pattern > > -Michel > > On Mon, Jul 9, 2012 at 1:24 PM, Edwin Amsler > wrote: >> So here I am, publishing messages through ZeroMQ's send() function at about >> 300MB/s, and my network's set to only send at 10MB/s. >> >> This is kind of a big problem because, while I don't care if the clients >> loose data on their end, the server is either using its memory until it >> crashes, or I'm setting its high water mark and loosing about 29 of every >> thirty messages I produce because I don't know that ZeroMQ can't keep up. >> >> Ideally, when a HWM condition happened, send() would return false, then I'd >> test EAGAIN so I could decide for myself whether I should drop the message, >> or retry later. With that kind of functionality, I could throttle back my >> producer algorithm so that I exactly meet the demand of ZeroMQ instead of >> overwhelming/starving it out. >> >> I'm willing to do the work if this sort of addition makes sense to the rest >> of the project. I'd rather contribute here instead of forking it off in some >> forgotten repository. >> >> Can/should this be done? Is there someone out there willing to mentor me? >> >> Thanks, >> >> Edwin >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From edwinamsler at thinkboxsoftware.com Mon Jul 9 22:46:18 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Mon, 09 Jul 2012 15:46:18 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: <4FFB431A.8030503@thinkboxsoftware.com> There doesn't seem to be anything about how it signals that the high water mark happened. Unless I didn't read it thoroughly enough. "When a/ZMQ_PUB/socket enters an exceptional state due to having reached the high water mark for a/subscriber/, then any messages that would be sent to the/subscriber/in question shall instead be dropped until the exceptional state ends. The/zmq_send()/function shall never block for this socket type." On 09/07/2012 3:32 PM, Ian Barber wrote: > > > On Mon, Jul 9, 2012 at 9:29 PM, Ian Barber > wrote: > > > > This is pretty much how it works with most socket types - if you > use the ZMQ_NOBLOCK flag, you'll get the EAGAIN if you've hit HWM. > > Ian > > > You can see all of the HWM responses here: > http://api.zeromq.org/2-1:zmq-socket > > Ian > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/a2026a85/attachment.htm From lists at chuckremes.com Mon Jul 9 22:52:01 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 9 Jul 2012 15:52:01 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFB431A.8030503@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> <4FFB431A.8030503@thinkboxsoftware.com> Message-ID: On Jul 9, 2012, at 3:46 PM, Edwin Amsler wrote: > There doesn't seem to be anything about how it signals that the high water mark happened. Unless I didn't read it thoroughly enough. > > "When a ZMQ_PUB socket enters an exceptional state due to having reached the high water mark for a subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the exceptional state ends. The zmq_send()function shall never block for this socket type." Ed, time for you to write a few lines of code to prove this works (or doesn't) for your use case. You can figure it out a lot faster than asking here now that you've been given some direction. Let us know how it works out. cr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/fe8c025e/attachment.htm From edwinamsler at thinkboxsoftware.com Mon Jul 9 22:54:31 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Mon, 09 Jul 2012 15:54:31 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: References: <4FFB3DF5.7010407@thinkboxsoftware.com> <4FFB431A.8030503@thinkboxsoftware.com> Message-ID: <4FFB4507.2060704@thinkboxsoftware.com> I prefer Edwin. I'll make a test case, then report back. On 09/07/2012 3:52 PM, Chuck Remes wrote: > On Jul 9, 2012, at 3:46 PM, Edwin Amsler wrote: > >> There doesn't seem to be anything about how it signals that the high >> water mark happened. Unless I didn't read it thoroughly enough. >> >> "When a/ZMQ_PUB/socket enters an exceptional state due to having >> reached the high water mark for a/subscriber/, then any messages that >> would be sent to the/subscriber/in question shall instead be dropped >> until the exceptional state ends. The/zmq_send()/function shall never >> block for this socket type." > > Ed, time for you to write a few lines of code to prove this works (or > doesn't) for your use case. You can figure it out a lot faster than > asking here now that you've been given some direction. > > Let us know how it works out. > > cr > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120709/a936f1c9/attachment.htm From pelletier.michel at gmail.com Mon Jul 9 23:00:28 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 9 Jul 2012 14:00:28 -0700 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFB42BD.1030506@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> <4FFB42BD.1030506@thinkboxsoftware.com> Message-ID: On Mon, Jul 9, 2012 at 1:44 PM, Edwin Amsler wrote: > No need. I don't even care about subscribers. It's all about feeding the > sending state machine efficiently. The SSP is about never getting to the point where the PUB socket drops messages, because your subscribes never go slow enough to fill the queue. If you don't care about subscribers, then it sounds like the right pattern for you. -Michel > > On 09/07/2012 3:41 PM, Michel Pelletier wrote: >> Have you looked at the suicidal snail pattern? >> >> http://zguide.zeromq.org/page:all#Slow-Subscriber-Detection-Suicidal-Snail-Pattern >> >> -Michel >> >> On Mon, Jul 9, 2012 at 1:24 PM, Edwin Amsler >> wrote: >>> So here I am, publishing messages through ZeroMQ's send() function at about >>> 300MB/s, and my network's set to only send at 10MB/s. >>> >>> This is kind of a big problem because, while I don't care if the clients >>> loose data on their end, the server is either using its memory until it >>> crashes, or I'm setting its high water mark and loosing about 29 of every >>> thirty messages I produce because I don't know that ZeroMQ can't keep up. >>> >>> Ideally, when a HWM condition happened, send() would return false, then I'd >>> test EAGAIN so I could decide for myself whether I should drop the message, >>> or retry later. With that kind of functionality, I could throttle back my >>> producer algorithm so that I exactly meet the demand of ZeroMQ instead of >>> overwhelming/starving it out. >>> >>> I'm willing to do the work if this sort of addition makes sense to the rest >>> of the project. I'd rather contribute here instead of forking it off in some >>> forgotten repository. >>> >>> Can/should this be done? Is there someone out there willing to mentor me? >>> >>> Thanks, >>> >>> Edwin >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From lists at chuckremes.com Mon Jul 9 23:08:24 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 9 Jul 2012 16:08:24 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFB4507.2060704@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> <4FFB431A.8030503@thinkboxsoftware.com> <4FFB4507.2060704@thinkboxsoftware.com> Message-ID: <40076981-40A0-4497-BD1D-5AFEDA0E94A3@chuckremes.com> On Jul 9, 2012, at 3:54 PM, Edwin Amsler wrote: > I prefer Edwin. I'll make a test case, then report back. Noted for future posts. We look forward to hearing from you. cr From paul at colomiets.name Tue Jul 10 08:59:53 2012 From: paul at colomiets.name (Paul Colomiets) Date: Tue, 10 Jul 2012 09:59:53 +0300 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFB3DF5.7010407@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: Hi Edwin, On Mon, Jul 9, 2012 at 11:24 PM, Edwin Amsler wrote: > So here I am, publishing messages through ZeroMQ's send() function at about > 300MB/s, and my network's set to only send at 10MB/s. > > This is kind of a big problem because, while I don't care if the clients > loose data on their end, the server is either using its memory until it > crashes, or I'm setting its high water mark and loosing about 29 of every > thirty messages I produce because I don't know that ZeroMQ can't keep up. > > Ideally, when a HWM condition happened, send() would return false, then I'd > test EAGAIN so I could decide for myself whether I should drop the message, > or retry later. With that kind of functionality, I could throttle back my > producer algorithm so that I exactly meet the demand of ZeroMQ instead of > overwhelming/starving it out. > > I'm willing to do the work if this sort of addition makes sense to the rest > of the project. I'd rather contribute here instead of forking it off in some > forgotten repository. > > Can/should this be done? Is there someone out there willing to mentor me? > The behavior is intentional for pub/sub sockets. If you'd have only one subscriber you could use push/pull. Push sockets block when reach high water mark, so are Req sockets. The pub/sub sockets can't reliably block in general case because there could be multiple subscribers, only one of which reaches high water mark. Partially this comes from implementation: when you do zmq_send() zeromq starts to push message to the pipe for each connected subscribers, if one of the pipes full, there is no way to rollback messages already put into pipes, if it would it's not clear whether single slow subscriber should stop the publisher. Also pgm sockets can't have backpressure AFAIU. You can try to implement the behavior as a socket option (it can't be default behavior), but you have to be aware of the problems above (And I don't know if core developers are willing to accept the patch). -- Paul From edwinamsler at thinkboxsoftware.com Tue Jul 10 17:31:08 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Tue, 10 Jul 2012 10:31:08 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: References: <4FFB3DF5.7010407@thinkboxsoftware.com> Message-ID: <4FFC4ABC.4070600@thinkboxsoftware.com> On 10/07/2012 1:59 AM, Paul Colomiets wrote: > Hi Edwin, > > On Mon, Jul 9, 2012 at 11:24 PM, Edwin Amsler > wrote: >> So here I am, publishing messages through ZeroMQ's send() function at about >> 300MB/s, and my network's set to only send at 10MB/s. >> >> This is kind of a big problem because, while I don't care if the clients >> loose data on their end, the server is either using its memory until it >> crashes, or I'm setting its high water mark and loosing about 29 of every >> thirty messages I produce because I don't know that ZeroMQ can't keep up. >> >> Ideally, when a HWM condition happened, send() would return false, then I'd >> test EAGAIN so I could decide for myself whether I should drop the message, >> or retry later. With that kind of functionality, I could throttle back my >> producer algorithm so that I exactly meet the demand of ZeroMQ instead of >> overwhelming/starving it out. >> >> I'm willing to do the work if this sort of addition makes sense to the rest >> of the project. I'd rather contribute here instead of forking it off in some >> forgotten repository. >> >> Can/should this be done? Is there someone out there willing to mentor me? >> > The behavior is intentional for pub/sub sockets. If you'd have only > one subscriber you could use push/pull. Push sockets block when reach > high water mark, so are Req sockets. > > The pub/sub sockets can't reliably block in general case because there > could be multiple subscribers, only one of which reaches high water > mark. Partially this comes from implementation: when you do zmq_send() I never want them to block. That'd kind of break my program's state machine. What I'd like, is to know when the high water mark was reached with a send() error, and and EAGAIN errno so that I can /choose/ whether or not I'd like to throw away the message. Right now, the message is just silently cast away further down the stack as far as I can tell. > zeromq starts to push message to the pipe for each connected > subscribers, if one of the pipes full, there is no way to rollback > messages already put into pipes, if it would it's not clear whether > single slow subscriber should stop the publisher. Also pgm sockets > can't have backpressure AFAIU. Is there a way to detect if a pipe is full, and return a send() error then? As I said, I feel that pub sockets should never block (that's why I changed from using OpenPGM alone to ZeroMQ actually, though I've found yet more reasons to stay). > You can try to implement the behavior as a socket option (it can't be > default behavior), but you have to be aware of the problems above (And > I don't know if core developers are willing to accept the patch). That's more what I'm worried about. I'm quite confident there's no way to handle this yet, and I feel that I'm not the only one who'd like to have some sense of how fast a pub socket is truthfully sending data. The implementation on the API side should be solid since the send() error, EAGAIN method is how all ZMQ_NOBLOCK sockets work already. It's just that send() doesn't error when a PUB socket starts throwing away data (I know that's the case for sure on Windows at least). -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/f8595faf/attachment.htm From XavierMillieret at Eaton.com Tue Jul 10 17:48:10 2012 From: XavierMillieret at Eaton.com (XavierMillieret at Eaton.com) Date: Tue, 10 Jul 2012 15:48:10 +0000 Subject: [zeromq-dev] Jzmq Message-ID: Hi, I try to use the java binding for zeromq on win seven 64: Configuration: I downloaded the following libraries: http://miru.hk/archive/ZeroMQ-3.1.1beta~miru1.1-win64.exe -> libzmq-v100-mt.dll and http://miru.hk/archive/JZMQ-2.1.10~miru1.2-win64.exe -> JZMQ 2.1.10\ jzmq.dll JZMQ 2.1.10\zmq.jar The problem is In my java code, when I try to implement a pub/sub sample, I am "wake up" on the good topic, but in my receive buffer (String), it's empty ! I uses the following virtual machine: java version "1.7.0_01" Java(TM) SE Runtime Environment (build 1.7.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode) Somebody could help me for my project, please. Thanks you by advance. Xavier Millieret ________________________________ ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/d51d6e2c/attachment.htm From gdiethelm at dcv.cl Tue Jul 10 17:52:19 2012 From: gdiethelm at dcv.cl (gonzalo diethelm) Date: Tue, 10 Jul 2012 15:52:19 +0000 Subject: [zeromq-dev] Jzmq In-Reply-To: References: Message-ID: <6D436FBF9A7B114392D84BF6832C5CA704978B@aowmail1.dcv.net> If you don?t subscribe to a specific pattern (which could be empty), you will not get any messages. HTH. -- Gonzalo Diethelm DCV Chile From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of XavierMillieret at Eaton.com Sent: Tuesday, July 10, 2012 11:48 AM To: zeromq-dev at lists.zeromq.org Subject: [zeromq-dev] Jzmq Hi, I try to use the java binding for zeromq on win seven 64: Configuration: I downloaded the following libraries: http://miru.hk/archive/ZeroMQ-3.1.1beta~miru1.1-win64.exe -> libzmq-v100-mt.dll and http://miru.hk/archive/JZMQ-2.1.10~miru1.2-win64.exe -> JZMQ 2.1.10\ jzmq.dll JZMQ 2.1.10\zmq.jar The problem is In my java code, when I try to implement a pub/sub sample, I am ?wake up? on the good topic, but in my receive buffer (String), it?s empty ! I uses the following virtual machine: java version "1.7.0_01" Java(TM) SE Runtime Environment (build 1.7.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode) Somebody could help me for my project, please. Thanks you by advance. Xavier Millieret ________________________________ ________________________________ ----------------------------------------- Declaraci?n de confidencialidad: Este Mensaje esta destinado para el uso de la o las personas o entidades a quien ha sido dirigido y puede contener informaci?n reservada y confidencial que no puede ser divulgada, difundida, ni aprovechada en forma alguna. El uso no autorizado de la informaci?n contenida en este correo podr? ser sancionado de conformidad con la ley chilena. Si usted ha recibido este correo electr?nico por error, le pedimos eliminarlo junto con los archivos adjuntos y avisar inmediatamente al remitente, respondiendo este mensaje. "Before printing this e-mail think if is really necesary". Disclosure: This Message is to be used by the individual, individuals or entities that it is addressed to and may include private and confidential information that may not be disclosed, made public nor used in any way at all. Unauthorized use of the information in this electronic mail message may be subject to the penalties set forth by Chilean law. If you have received this electronic mail message in error, we ask you to destroy the message and its attached file(s) and to immediately notify the sender by answering this message. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/1534a253/attachment.htm From lists at chuckremes.com Tue Jul 10 18:00:07 2012 From: lists at chuckremes.com (Chuck Remes) Date: Tue, 10 Jul 2012 11:00:07 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <4FFC4ABC.4070600@thinkboxsoftware.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> <4FFC4ABC.4070600@thinkboxsoftware.com> Message-ID: <0E1ED34A-B052-41E9-AB5C-260FDA31E6BF@chuckremes.com> On Jul 10, 2012, at 10:31 AM, Edwin Amsler wrote: > On 10/07/2012 1:59 AM, Paul Colomiets wrote: >> >> Hi Edwin, >> >> The behavior is intentional for pub/sub sockets. If you'd have only >> one subscriber you could use push/pull. Push sockets block when reach >> high water mark, so are Req sockets. >> >> The pub/sub sockets can't reliably block in general case because there >> could be multiple subscribers, only one of which reaches high water >> mark. Partially this comes from implementation: when you do zmq_send() > I never want them to block. That'd kind of break my program's state machine. What I'd like, is to know when the high water mark was reached with a send() error, and and EAGAIN errno so that I can choose whether or not I'd like to throw away the message. Right now, the message is just silently cast away further down the stack as far as I can tell. I need to stress a particular detail here. The socket has a separate HWM for *each* connected subscriber because each one has its own outgoing queue. If you were to receive EAGAIN (or an error return code) from zmq_send() when a subset of subscribers hit their HWM, your published message would still be received by subscribers that have not fallen behind. It does *not* drop the message for all subscribers, just those that have entered the HWM exceptional state. I don't think you can (even with a patch specific to your use case) rely on this behavior to achieve your goal. >> zeromq starts to push message to the pipe for each connected >> subscribers, if one of the pipes full, there is no way to rollback >> messages already put into pipes, if it would it's not clear whether >> single slow subscriber should stop the publisher. Also pgm sockets >> can't have backpressure AFAIU. > Is there a way to detect if a pipe is full, and return a send() error then? As I said, I feel that pub sockets should never block (that's why I changed from using OpenPGM alone to ZeroMQ actually, though I've found yet more reasons to stay). Not at this time. However, there has been some work done by others to let developers receive notification for specific internal library events. I'm certain it would be possible to add this type of event as a notification. Also, PUB sockets never block. >> You can try to implement the behavior as a socket option (it can't be >> default behavior), but you have to be aware of the problems above (And >> I don't know if core developers are willing to accept the patch). > That's more what I'm worried about. I'm quite confident there's no way to handle this yet, and I feel that I'm not the only one who'd like to have some sense of how fast a pub socket is truthfully sending data. The implementation on the API side should be solid since the send() error, EAGAIN method is how all ZMQ_NOBLOCK sockets work already. It's just that send() doesn't error when a PUB socket starts throwing away data (I know that's the case for sure on Windows at least). What we really need is a better mechanism for handling this type of situation than HWM. One particular thought is described here: http://unprotocols.org/blog:15 This can be implemented today using DEALER/ROUTER sockets. You may also be interested in the Suicidal Snail pattern described in the guide. http://zguide.zeromq.org/page:all#Slow-Subscriber-Detection-Suicidal-Snail-Pattern If you haven't read the guide yet, you should do so before getting too much deeper into your problem space. It will save you a lot of time. cr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/6baf8de1/attachment.htm From edwinamsler at thinkboxsoftware.com Tue Jul 10 18:18:35 2012 From: edwinamsler at thinkboxsoftware.com (Edwin Amsler) Date: Tue, 10 Jul 2012 11:18:35 -0500 Subject: [zeromq-dev] Notify send()er that they've hit the high water mark In-Reply-To: <0E1ED34A-B052-41E9-AB5C-260FDA31E6BF@chuckremes.com> References: <4FFB3DF5.7010407@thinkboxsoftware.com> <4FFC4ABC.4070600@thinkboxsoftware.com> <0E1ED34A-B052-41E9-AB5C-260FDA31E6BF@chuckremes.com> Message-ID: <4FFC55DB.7020403@thinkboxsoftware.com> On 10/07/2012 11:00 AM, Chuck Remes wrote: > > On Jul 10, 2012, at 10:31 AM, Edwin Amsler wrote: > >> On 10/07/2012 1:59 AM, Paul Colomiets wrote: >>> Hi Edwin, >>> >>> The behavior is intentional for pub/sub sockets. If you'd have only >>> one subscriber you could use push/pull. Push sockets block when reach >>> high water mark, so are Req sockets. >>> >>> The pub/sub sockets can't reliably block in general case because there >>> could be multiple subscribers, only one of which reaches high water >>> mark. Partially this comes from implementation: when you do zmq_send() >> I never want them to block. That'd kind of break my program's state >> machine. What I'd like, is to know when the high water mark was >> reached with a send() error, and and EAGAIN errno so that I can >> /choose/ whether or not I'd like to throw away the message. Right >> now, the message is just silently cast away further down the stack as >> far as I can tell. > > I need to stress a particular detail here. The socket has a separate > HWM for *each* connected subscriber because each one has its own > outgoing queue. If you were to receive EAGAIN (or an error return > code) from zmq_send() when a subset of subscribers hit their HWM, your > published message would still be received by subscribers that have not > fallen behind. It does *not* drop the message for all subscribers, > just those that have entered the HWM exceptional state. > > I don't think you can (even with a patch specific to your use case) > rely on this behavior to achieve your goal. Well, that's depressing. I'm using "epgm://" here, and I know that OpenPGM itself has no concept of connected clients. Are there still individual queues for clients in this case? > >>> zeromq starts to push message to the pipe for each connected >>> subscribers, if one of the pipes full, there is no way to rollback >>> messages already put into pipes, if it would it's not clear whether >>> single slow subscriber should stop the publisher. Also pgm sockets >>> can't have backpressure AFAIU. >> Is there a way to detect if a pipe is full, and return a send() error >> then? As I said, I feel that pub sockets should never block (that's >> why I changed from using OpenPGM alone to ZeroMQ actually, though >> I've found yet more reasons to stay). > > Not at this time. However, there has been some work done by others to > let developers receive notification for specific internal library > events. I'm certain it would be possible to add this type of event as > a notification. > > Also, PUB sockets never block. > >>> You can try to implement the behavior as a socket option (it can't be >>> default behavior), but you have to be aware of the problems above (And >>> I don't know if core developers are willing to accept the patch). >> That's more what I'm worried about. I'm quite confident there's no >> way to handle this yet, and I feel that I'm not the only one who'd >> like to have some sense of how fast a pub socket is truthfully >> sending data. The implementation on the API side should be solid >> since the send() error, EAGAIN method is how all ZMQ_NOBLOCK sockets >> work already. It's just that send() doesn't error when a PUB socket >> starts throwing away data (I know that's the case for sure on Windows >> at least). > > What we really need is a better mechanism for handling this type of > situation than HWM. One particular thought is described here: > > http://unprotocols.org/blog:15 > > This can be implemented today using DEALER/ROUTER sockets. > > You may also be interested in the Suicidal Snail pattern described in > the guide. > > http://zguide.zeromq.org/page:all#Slow-Subscriber-Detection-Suicidal-Snail-Pattern > > If you haven't read the guide yet, you should do so before getting too > much deeper into your problem space. It will save you a lot of time. Good advice. I made it about three chapters in. I really need to go digest it though. > > cr > > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/0f89fd7f/attachment.htm From jhawk28 at gmail.com Wed Jul 11 00:02:29 2012 From: jhawk28 at gmail.com (Joshua Foster) Date: Tue, 10 Jul 2012 18:02:29 -0400 Subject: [zeromq-dev] Jzmq In-Reply-To: References: Message-ID: <4FFCA675.4030602@gmail.com> If you don't do a socket.recv(0), then it will return null if there is nothing in the queue. Joshua > XavierMillieret at Eaton.com > July 10, 2012 11:48 AM > > Hi, > > I try to use the java binding for zeromq on win seven 64: > > Configuration: > > I downloaded the following libraries: > > /http://miru.hk/archive/ZeroMQ-3.1.1beta~miru1.1-win64.exe > // ->/ > > libzmq-v100-mt.dll > > and /http://miru.hk/archive/JZMQ-2.1.10~miru1.2-win64.exe > // ->/ > > JZMQ 2.1.10\ jzmq.dll > > JZMQ 2.1.10\zmq.jar > > The problem is In my java code, when I try to implement a pub/sub > sample, I am ?wake up? on the good topic, but in my receive buffer > (String), it?s empty ! > > I uses the following virtual machine: > > java version "1.7.0_01" > > Java(TM) SE Runtime Environment (build 1.7.0_01-b08) > > Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode) > > Somebody could help me for my project, please. > > Thanks you by advance. > > *Xavier Millieret* > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------ > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/e841623e/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/e841623e/attachment.jpg From Sharon.Ben-Asher at avg.com Wed Jul 11 12:32:49 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Wed, 11 Jul 2012 10:32:49 +0000 Subject: [zeromq-dev] Error: java.lang.UnsatisfiedLinkError Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FF437@ex10czdmb01> Hello again, I am now trying to build the server side (finished the build of the client on Android, thanks) I am testing my Java binding on RedHat i686. My command is as follows java -Djava.library.path=/root/zeromq-3.2.0/output/lib -classpath .:/root/zeromq-3.2.0/output/share/java:./local_lat Test Getting the following error: Exception in thread "Thread-2" java.lang.NoClassDefFoundError: Could not initialize class org.zeromq.ZMQ at org.zeromq.ZContext.createSocket(ZContext.java:89) at Test$Client.run(Test.java:79) at java.lang.Thread.run(Thread.java:662) Exception in thread "Thread-1" java.lang.NoClassDefFoundError: Could not initialize class org.zeromq.ZMQ at org.zeromq.ZContext.createSocket(ZContext.java:89) at Test$Worker.run(Test.java:59) at java.lang.Thread.run(Thread.java:662) Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: /root/zeromq-3.2.0/output/lib/libjzmq.so.0.0.0: libzmq.so.3: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at org.zeromq.ZMQ.(ZMQ.java:34) at org.zeromq.ZContext.createSocket(ZContext.java:89) at Test$Broker.run(Test.java:19) at java.lang.Thread.run(Thread.java:662) so I am guessing libjzmq.so.0.0.0 can't find libzmq.so.3 ? however the file is present at /usr/local/lib and I did ldconfig thanks, Sharon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120711/16e41399/attachment.htm From Sharon.Ben-Asher at avg.com Wed Jul 11 12:39:01 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Wed, 11 Jul 2012 10:39:01 +0000 Subject: [zeromq-dev] Error: java.lang.UnsatisfiedLinkError Message-ID: <671E27F33F2F25499F78A4AFA494E63B2E7FF449@ex10czdmb01> Ok, I got it fixed by following the advice here https://github.com/zeromq/jzmq/issues/43 (adding the required path to LD_LIBRARY_PATH thanks! Sharon From: Sharon Ben-Asher Sent: Wednesday, July 11, 2012 1:33 PM To: 'zeromq-dev at lists.zeromq.org' Subject: Error: java.lang.UnsatisfiedLinkError Hello again, I am now trying to build the server side (finished the build of the client on Android, thanks) I am testing my Java binding on RedHat i686. My command is as follows java -Djava.library.path=/root/zeromq-3.2.0/output/lib -classpath .:/root/zeromq-3.2.0/output/share/java:./local_lat Test Getting the following error: Exception in thread "Thread-2" java.lang.NoClassDefFoundError: Could not initialize class org.zeromq.ZMQ at org.zeromq.ZContext.createSocket(ZContext.java:89) at Test$Client.run(Test.java:79) at java.lang.Thread.run(Thread.java:662) Exception in thread "Thread-1" java.lang.NoClassDefFoundError: Could not initialize class org.zeromq.ZMQ at org.zeromq.ZContext.createSocket(ZContext.java:89) at Test$Worker.run(Test.java:59) at java.lang.Thread.run(Thread.java:662) Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: /root/zeromq-3.2.0/output/lib/libjzmq.so.0.0.0: libzmq.so.3: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at org.zeromq.ZMQ.(ZMQ.java:34) at org.zeromq.ZContext.createSocket(ZContext.java:89) at Test$Broker.run(Test.java:19) at java.lang.Thread.run(Thread.java:662) so I am guessing libjzmq.so.0.0.0 can't find libzmq.so.3 ? however the file is present at /usr/local/lib and I did ldconfig thanks, Sharon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120711/2f993527/attachment.htm From XavierMillieret at Eaton.com Tue Jul 10 17:41:14 2012 From: XavierMillieret at Eaton.com (XavierMillieret at Eaton.com) Date: Tue, 10 Jul 2012 15:41:14 +0000 Subject: [zeromq-dev] jzmq Message-ID: Hi, I try to use the java binding for zeromq on win seven 64: Configuration: I downloaded the following libraries: http://miru.hk/archive/ZeroMQ-3.1.1beta~miru1.1-win64.exe -> libzmq-v100-mt.dll and http://miru.hk/archive/JZMQ-2.1.10~miru1.2-win64.exe -> JZMQ 2.1.10\ jzmq.dll JZMQ 2.1.10\zmq.jar The problem is In my java code, when I try to implement a pub/sub sample, I am "wake up" on the good topic, but in my receive buffer (String), it's empty ! I uses the following virtual machine: java version "1.7.0_01" Java(TM) SE Runtime Environment (build 1.7.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode) Somebody could help me for my project, please. Thanks you by advance. Xavier Millieret ________________________________ ________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120710/b798ece1/attachment.htm From pelletier.michel at gmail.com Wed Jul 11 17:43:37 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Wed, 11 Jul 2012 08:43:37 -0700 Subject: [zeromq-dev] jzmq In-Reply-To: References: Message-ID: If you're not getting an error it's very likely a problem with your code. Please put a _minimal_ example of your code that exhibits your problem in a pastebin somewhere and send us the link. -Michel On Tue, Jul 10, 2012 at 8:41 AM, wrote: > Hi, > > > > I try to use the java binding for zeromq on win seven 64: > > > > Configuration: > > I downloaded the following libraries: > > http://miru.hk/archive/ZeroMQ-3.1.1beta~miru1.1-win64.exe -> > > libzmq-v100-mt.dll > > and http://miru.hk/archive/JZMQ-2.1.10~miru1.2-win64.exe -> > > JZMQ 2.1.10\ jzmq.dll > > JZMQ 2.1.10\zmq.jar > > The problem is In my java code, when I try to implement a pub/sub sample, I > am ?wake up? on the good topic, but in my receive buffer (String), it?s > empty ! > > I uses the following virtual machine: > > java version "1.7.0_01" > > Java(TM) SE Runtime Environment (build 1.7.0_01-b08) > > Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode) > > > > Somebody could help me for my project, please. > > > > Thanks you by advance. > > > > > > Xavier Millieret > > > > > > ________________________________ > > ________________________________ > > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From midekk at gmail.com Wed Jul 11 21:04:06 2012 From: midekk at gmail.com (Midek) Date: Wed, 11 Jul 2012 21:04:06 +0200 Subject: [zeromq-dev] web based client without flash Message-ID: Hello Everybody, we would like to use 0MQ for new projects. It should server client architecture for local and remote connection. The only problem is that one of the clients should be web based, implemented in javascript later maybe in HTML5. We don't like that javascript binding use flash. Is there some another possibility or workaround how to implement web based client using 0MQ without using flash? Thank you, Best regards, Miro From ian.barber at gmail.com Wed Jul 11 21:36:15 2012 From: ian.barber at gmail.com (Ian Barber) Date: Wed, 11 Jul 2012 20:36:15 +0100 Subject: [zeromq-dev] web based client without flash In-Reply-To: References: Message-ID: On Wed, Jul 11, 2012 at 8:04 PM, Midek wrote: > Hello Everybody, > > we would like to use 0MQ for new projects. It should server client > architecture for local and remote connection. > > The only problem is that one of the clients should be web based, > implemented in javascript later maybe in HTML5. We don't like that > javascript binding use flash. Your best bet is likely to use a bridge application - Mongrel2, ZeroGW, NullMQ, or similar. Without an extension or flash you're not going to be able to open arbitrary sockets from the browser, which limits your options somewhat. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120711/4203d6a2/attachment.htm From lists at chuckremes.com Thu Jul 12 00:28:32 2012 From: lists at chuckremes.com (Chuck Remes) Date: Wed, 11 Jul 2012 17:28:32 -0500 Subject: [zeromq-dev] daily build cluster question In-Reply-To: <96219A52-FDEA-4377-9ED4-6C17B00C0E6B@chuckremes.com> References: <96219A52-FDEA-4377-9ED4-6C17B00C0E6B@chuckremes.com> Message-ID: Who is in charge of the daily build cluster? I'd like a login to the debian linux image if that is at all possible. Thanks. cr On Jul 2, 2012, at 1:48 PM, Chuck Remes wrote: > I see on the #zeromq.build channel that the ffi-rzmq gem has failures on Debian linux. I'm the maintainer of that gem and would like to fix those failures. On my OSX box *and* my Archlinux box, the specs all pass. What version of Debian Linux (3, 4, 5 or 6) should I install to match the build cluster so I can reproduce this problem? > > cr > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From ian.barber at gmail.com Thu Jul 12 00:49:55 2012 From: ian.barber at gmail.com (Ian Barber) Date: Wed, 11 Jul 2012 23:49:55 +0100 Subject: [zeromq-dev] daily build cluster question In-Reply-To: References: <96219A52-FDEA-4377-9ED4-6C17B00C0E6B@chuckremes.com> Message-ID: On Wed, Jul 11, 2012 at 11:28 PM, Chuck Remes wrote: > Who is in charge of the daily build cluster? I'd like a login to the > debian linux image if that is at all possible. Thanks. > > cr Mikko. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120711/480dd7cc/attachment.htm From segg2 at videotron.ca Thu Jul 12 06:42:23 2012 From: segg2 at videotron.ca (Gilles J. Seguin) Date: Thu, 12 Jul 2012 00:42:23 -0400 Subject: [zeromq-dev] [czmq] src/zsocket.c, this looks like unused variable to me Message-ID: <1342068143.17421.6.camel@laure.segg2.videotron.ca> fedora gcc-4.7.0-5.fc17.x86_64 $ gcc -I../include -Werror -Wno-unused -Wall -c zsocket.c -o zsocket.o zsocket.c: In function ?zsocket_poll?: zsocket.c:152:9: error: unused variable ?rc? [-Werror=unused-variable] cc1: all warnings being treated as errors src/zsocket.c @@ -149,7 +149,7 @@ Bool zsocket_poll (void *socket, int msecs) { zmq_pollitem_t items [] = { { socket, 0, ZMQ_POLLIN, 0 } }; - int rc = zmq_poll (items, 1, msecs); + /*int rc =*/ zmq_poll (items, 1, msecs); return (items [0].revents & ZMQ_POLLIN) != 0; } curious thing, -Wall option just before the -c option From g.passault at gmail.com Thu Jul 12 15:43:30 2012 From: g.passault at gmail.com (=?ISO-8859-1?Q?Gr=E9goire_Passault?=) Date: Thu, 12 Jul 2012 15:43:30 +0200 Subject: [zeromq-dev] Broadcasting with a Router ? Message-ID: Hi, Since I'm new to ZeroMQ I really appologize if my question is stupid, but can we use a Router to broadcast messages to all clients ? I mean, I don't see any technical reason it couldn't, and I know I also could create Request/Req and Pub/Sub sockets for instance, but I don't want to create two of them if one can do the job. Best regards, Gr?goire Passaukt -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/ad790370/attachment.htm From diffuser78 at gmail.com Thu Jul 12 20:23:10 2012 From: diffuser78 at gmail.com (Diffuser78) Date: Thu, 12 Jul 2012 11:23:10 -0700 Subject: [zeromq-dev] Quick question on usage of patterns Message-ID: Hello All, I need some suggestion on my design and ways in which it can be done using ZMQ sockets. I have an app App1 on Box1. It sends a message M1 (128K) to an app App2 on Box2. App2 will do some processing on M1 before sending an ACK back. In my application, I also want to send an ACK back to App1 as soon as App2 receives M1, i.e. I want App2 to send two types of ACKs to App1: 1. An ACK that says that App2 received M1 2. An ACK after M1 is processed. Can I make App1 use Dealer socket and App2 Router ? How will the matching happen on App1's end ? If this pattern is not right, could you please point out the right pattern to use for this use case. I greatly appreciate your replies. Many thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/cd463ffd/attachment.htm From andrew at research.att.com Thu Jul 12 20:51:14 2012 From: andrew at research.att.com (Andrew Hume) Date: Thu, 12 Jul 2012 11:51:14 -0700 Subject: [zeromq-dev] Quick question on usage of patterns In-Reply-To: References: Message-ID: <35383EE6-5A62-4008-BF9E-E48163CD7E61@research.att.com> unless you're not telling us something, the simplest solution is two sockets: app1.PUSH => app2.PULL: for M1 app2.PUSH => app1.PULL: for various ACKs as for the matching, i would include an job id with M1 and the ACKs. or if you don't want to do that, use the system name (Box2) as the id. both these solutions generalise in different directions. andrew On Jul 12, 2012, at 11:23 AM, Diffuser78 wrote: > Hello All, > > I need some suggestion on my design and ways in which it can be done using ZMQ sockets. > > > I have an app App1 on Box1. It sends a message M1 (128K) to an app App2 on Box2. App2 will do some processing on M1 before sending an ACK back. In my application, I also want to send an ACK back to App1 as soon as App2 receives M1, i.e. I want App2 to send two types of ACKs to App1: > 1. An ACK that says that App2 received M1 > 2. An ACK after M1 is processed. > > Can I make App1 use Dealer socket and App2 Router ? How will the matching happen on App1's end ? If this pattern is not right, could you please point out the right pattern to use for this use case. > > > I greatly appreciate your replies. > > Many thanks. > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev ------------------ Andrew Hume (best -> Telework) +1 623-551-2845 andrew at research.att.com (Work) +1 973-236-2014 AT&T Labs - Research; member of USENIX and LOPSA -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/72c7895c/attachment.htm From lists at chuckremes.com Thu Jul 12 20:56:02 2012 From: lists at chuckremes.com (Chuck Remes) Date: Thu, 12 Jul 2012 13:56:02 -0500 Subject: [zeromq-dev] Quick question on usage of patterns In-Reply-To: References: Message-ID: <93506029-8A21-4DEA-8AD3-6B02A7AAB039@chuckremes.com> On Jul 12, 2012, at 1:23 PM, Diffuser78 wrote: > Hello All, > > I need some suggestion on my design and ways in which it can be done using ZMQ sockets. > > > I have an app App1 on Box1. It sends a message M1 (128K) to an app App2 on Box2. App2 will do some processing on M1 before sending an ACK back. In my application, I also want to send an ACK back to App1 as soon as App2 receives M1, i.e. I want App2 to send two types of ACKs to App1: > 1. An ACK that says that App2 received M1 > 2. An ACK after M1 is processed. > > Can I make App1 use Dealer socket and App2 Router ? How will the matching happen on App1's end ? If this pattern is not right, could you please point out the right pattern to use for this use case. If you want to generalize this so that App1 can talk to App2, App3, App4 and App5 and each one can respond back properly, I would suggest using Dealer (on App1) and Router sockets on the remaining Apps. See the write up on the wiki (http://www.zeromq.org/tutorials:xreq-and-xrep) regarding how to format messages for talking between Dealer/Router (renamed from XREQ/XREP). cr From jhawk28 at gmail.com Fri Jul 13 00:53:57 2012 From: jhawk28 at gmail.com (Joshua Foster) Date: Thu, 12 Jul 2012 18:53:57 -0400 Subject: [zeromq-dev] Broadcasting with a Router ? In-Reply-To: References: Message-ID: <4FFF5585.2090301@gmail.com> You technically could if you kept track of all the addresses that you received. The main downside is that you don't know when someone connects/disconnects. You only know what requests were received. Joshua > Gr?goire Passault > Thursday, July 12, 2012 9:43 AM > Hi, > > Since I'm new to ZeroMQ I really appologize if my question is stupid, > but can we use a Router to broadcast messages to all clients ? > > I mean, I don't see any technical reason it couldn't, and I know I > also could create Request/Req and Pub/Sub sockets for instance, but I > don't want to create two of them if one can do the job. > > Best regards, > Gr?goire Passaukt > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/3d7c5732/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: postbox-contact.jpg Type: image/jpeg Size: 1032 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/3d7c5732/attachment.jpg From g.passault at gmail.com Fri Jul 13 00:57:06 2012 From: g.passault at gmail.com (=?ISO-8859-1?Q?Gr=E9goire_Passault?=) Date: Fri, 13 Jul 2012 00:57:06 +0200 Subject: [zeromq-dev] Broadcasting with a Router ? In-Reply-To: References: <4FFF5585.2090301@gmail.com> Message-ID: Of course ... But think of an "hybrid" Router-and-Pub socket, users could subscribe to broadcast or exchange adressed data in the same socket. Why not? Greg Le 13 juil. 2012 00:54, "Joshua Foster" a ?crit : -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120713/613555c0/attachment.htm From jhawk28 at gmail.com Fri Jul 13 01:17:36 2012 From: jhawk28 at gmail.com (Joshua Foster) Date: Thu, 12 Jul 2012 19:17:36 -0400 Subject: [zeromq-dev] Broadcasting with a Router ? In-Reply-To: References: <4FFF5585.2090301@gmail.com> Message-ID: <4FFF5B10.2020307@gmail.com> Anything is possible :) There was some experimentation going on the 3.0 version that created a Generic socket. Your hybrid socket could be developed with it because you would get the Connect/Disconnect information. Joshua > Gr?goire Passault > Thursday, July 12, 2012 6:57 PM > > Of course ... > > But think of an "hybrid" Router-and-Pub socket, users could subscribe > to broadcast or exchange adressed data in the same socket. Why not? > > Greg > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > Gr?goire Passault > Thursday, July 12, 2012 9:43 AM > Hi, > > Since I'm new to ZeroMQ I really appologize if my question is stupid, > but can we use a Router to broadcast messages to all clients ? > > I mean, I don't see any technical reason it couldn't, and I know I > also could create Request/Req and Pub/Sub sockets for instance, but I > don't want to create two of them if one can do the job. > > Best regards, > Gr?goire Passaukt > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/ebe3601b/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: postbox-contact.jpg Type: image/jpeg Size: 1032 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/ebe3601b/attachment.jpg From thatch45 at gmail.com Fri Jul 13 01:37:41 2012 From: thatch45 at gmail.com (Thomas S Hatch) Date: Thu, 12 Jul 2012 17:37:41 -0600 Subject: [zeromq-dev] mailbox.cpp Assertion In-Reply-To: References: Message-ID: Thanks guys, Unfortunately there is no python stack trace, it looks like the error is coming from a zeromq thread and then sending the SIGABRT up. I don't know where the conflict is coming from though. I guess I need a better understanding of some of the threading that zeromq is doing underneath the python On Mon, Jul 9, 2012 at 2:34 PM, Ian Barber wrote: > > > On Mon, Jul 9, 2012 at 9:26 PM, Thomas S Hatch wrote: >> >> Actually, I should ask... >> >> The main issue we are seeing in here is that the SUB socket looses >> connection from the PUB socket when connecting over unreliable connections >> like the internet. Is there a way to detect if the SUB socket is still >> connected to the PUB socket? >> > > Sort of: Either layer a heartbeat on top, or use the ZMQ_MONITOR stuff in > ZMQ3.1+ to look for disconnect events. I suspect you'll get better accuracy > with the heartbeat (as it'll catch a multitude of sins), but monitor would > easier. > > Ian > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120712/5bfaa226/attachment.htm From ian.barber at gmail.com Fri Jul 13 03:14:50 2012 From: ian.barber at gmail.com (Ian Barber) Date: Fri, 13 Jul 2012 02:14:50 +0100 Subject: [zeromq-dev] Broadcasting with a Router ? In-Reply-To: References: <4FFF5585.2090301@gmail.com> Message-ID: On Thu, Jul 12, 2012 at 11:57 PM, Gr?goire Passault wrote: > Of course ... > > But think of an "hybrid" Router-and-Pub socket, users could subscribe to > broadcast or exchange adressed data in the same socket. Why not? > > Greg > You could build it with PUB pretty easily, have every subscriber subscribe to some string for their identity, and to an 'all' flag, then have the publisher send to whichever it preferred. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120713/7b8592f1/attachment.htm From g.passault at gmail.com Fri Jul 13 12:05:01 2012 From: g.passault at gmail.com (=?ISO-8859-1?Q?Gr=E9goire_Passault?=) Date: Fri, 13 Jul 2012 12:05:01 +0200 Subject: [zeromq-dev] Broadcasting with a Router ? In-Reply-To: References: <4FFF5585.2090301@gmail.com> Message-ID: Yes but a subscriber can't send any message, right? Greg Le 13 juil. 2012 03:15, "Ian Barber" a ?crit : > > > On Thu, Jul 12, 2012 at 11:57 PM, Gr?goire Passault wrote: > >> Of course ... >> >> But think of an "hybrid" Router-and-Pub socket, users could subscribe to >> broadcast or exchange adressed data in the same socket. Why not? >> >> Greg >> > > You could build it with PUB pretty easily, have every subscriber subscribe > to some string for their identity, and to an 'all' flag, then have the > publisher send to whichever it preferred. > > Ian > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120713/83d1847a/attachment.htm From mortenmoellerriis at gmail.com Fri Jul 13 14:04:41 2012 From: mortenmoellerriis at gmail.com (=?iso-8859-1?Q?Morten_M=F8ller_Riis?=) Date: Fri, 13 Jul 2012 14:04:41 +0200 Subject: [zeromq-dev] ruby: rbzmq.c:99: context_free: Assertion `rc == 0' failed. Message-ID: Hi! I am seeing this error sometimes with a daemon that I created which uses ZMQ. ruby: rbzmq.c:99: context_free: Assertion `rc == 0' failed. I am using the 'zmq' gem on Ruby 1.9.2p0 with zeromq-2.1.11. The program is working perfectly until this error seems to occur. It happens after the following error from a STDOUT#flush call. But I am not sure whether they would be related. /usr/local/minion/lib/kernel_ext.rb:24:in `flush': deadlock; recursive locking (ThreadError) Any pointers would be highly appreciated! Best regards Morten M?ller Riis From Zafar.Iqbal at lnties.com Fri Jul 13 15:00:42 2012 From: Zafar.Iqbal at lnties.com (Zafar Iqbal) Date: Fri, 13 Jul 2012 13:00:42 +0000 Subject: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX Message-ID: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com> Hi All, I am trying to compile Zeromq-2.1.9 in QNX self hosted system, I was getting the following errors. 1. Initially after running the configuration file, Makefile generated sucessfully. When I invoked make , the compilation started and when it reached to the linking stage it has given the error -lcrypto not found, just to chek it I removed -lcrypto from the makefile then it has shown the error -lsocket not found, When I looked into the libs path I found both the were available. After some analysis I found -rpath was not set, I set it to /usr/lib, after that programme compiled successfully. But after that I faced the Following problem: 2. When I tried to install it giving make install: I got the following error. Making install in src make[1]: Entering directory `/root/zeromq-2.1.9/src' make[2]: Entering directory `/root/zeromq-2.1.9/src' test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" /bin/sh ../libtool --mode=install ../config/install-sh -c libzmq.la '/usr/loca libtool: install: ../config/install-sh -c .libs/libzmq.lai /usr/local/lib/libzmq.la ../config/install-sh: .libs/libzmq.lai does not exist. make[2]: *** [install-libLTLIBRARIES] Error 1 make[2]: Leaving directory `/root/zeromq-2.1.9/src' make[1]: *** [install-am] Error 2 make[1]: Leaving directory `/root/zeromq-2.1.9/src' make: *** [install-recursive] Error 1 I am not able to find out what is the actual problem, How to solve the same. Please let me know if any of you have gone through the similar kind of problem. Thanking a lot. Larsen & Toubro Limited www.larsentoubro.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. From armin at steinhoff.de Fri Jul 13 15:28:19 2012 From: armin at steinhoff.de (Armin Steinhoff) Date: Fri, 13 Jul 2012 15:28:19 +0200 Subject: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX In-Reply-To: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com> References: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com> Message-ID: <50002273.2060402@steinhoff.de> Zafar Iqbal wrote: > Hi All, > > I am trying to compile Zeromq-2.1.9 in QNX self hosted system, I was getting the following errors. > > 1. Initially after running the configuration file, Makefile generated sucessfully. When I invoked make , the compilation started and when it reached to the linking stage it has given the error -lcrypto not found, just to chek it I removed -lcrypto from the makefile then it has shown the error -lsocket not found, When I looked into the libs path I found both the were available. .... and what is your LD_LIBRARY_PATH ? Does it include /usr/lib ? > > After some analysis I found -rpath was not set, I set it to /usr/lib, after that programme compiled successfully. ... not sure if the -rpath option works with QCC front end! Are you using QNX65 ? --Armin http://steinhoff-automation.com > > > But after that I faced the Following problem: > > 2. When I tried to install it giving make install: > I got the following error. > > > Making install in src > make[1]: Entering directory `/root/zeromq-2.1.9/src' > make[2]: Entering directory `/root/zeromq-2.1.9/src' > test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" > /bin/sh ../libtool --mode=install ../config/install-sh -c libzmq.la '/usr/loca > libtool: install: ../config/install-sh -c .libs/libzmq.lai /usr/local/lib/libzmq.la > ../config/install-sh: .libs/libzmq.lai does not exist. > make[2]: *** [install-libLTLIBRARIES] Error 1 > make[2]: Leaving directory `/root/zeromq-2.1.9/src' > make[1]: *** [install-am] Error 2 > make[1]: Leaving directory `/root/zeromq-2.1.9/src' > make: *** [install-recursive] Error 1 > > > I am not able to find out what is the actual problem, How to solve the same. > > Please let me know if any of you have gone through the similar kind of problem. > > > > Thanking a lot. > > Larsen & Toubro Limited > > www.larsentoubro.com > > This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From Zafar.Iqbal at lnties.com Fri Jul 13 19:16:04 2012 From: Zafar.Iqbal at lnties.com (Zafar Iqbal) Date: Fri, 13 Jul 2012 17:16:04 +0000 Subject: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX In-Reply-To: <50002273.2060402@steinhoff.de> References: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com>, <50002273.2060402@steinhoff.de> Message-ID: <7E56B0710035754D80A22F7BA63062C806DA777B@POCITMSEXMB01.LntUniverse.com> > Hi All, > > I am trying to compile Zeromq-2.1.9 in QNX self hosted system, I was getting the following errors. > > 1. Initially after running the configuration file, Makefile generated sucessfully. When I invoked make , the compilation started and when it reached to the linking stage it has given the error -lcrypto not found, just to chek it I removed -lcrypto from the makefile then it has shown the error -lsocket not found, When I looked into the libs path I found both the were available. .... and what is your LD_LIBRARY_PATH ? Does it include /usr/lib ? Yes my LD_LIBRARY_PATH includes /usr/lib > > After some analysis I found -rpath was not set, I set it to /usr/lib, after that programme compiled successfully. ... not sure if the -rpath option works with QCC front end! Are you using QNX65 ? Yes I am using QNX65. http://steinhoff-automation.com > > > But after that I faced the Following problem: > > 2. When I tried to install it giving make install: > I got the following error. > > > Making install in src > make[1]: Entering directory `/root/zeromq-2.1.9/src' > make[2]: Entering directory `/root/zeromq-2.1.9/src' > test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" > /bin/sh ../libtool --mode=install ../config/install-sh -c libzmq.la '/usr/loca > libtool: install: ../config/install-sh -c .libs/libzmq.lai /usr/local/lib/libzmq.la > ../config/install-sh: .libs/libzmq.lai does not exist. > make[2]: *** [install-libLTLIBRARIES] Error 1 > make[2]: Leaving directory `/root/zeromq-2.1.9/src' > make[1]: *** [install-am] Error 2 > make[1]: Leaving directory `/root/zeromq-2.1.9/src' > make: *** [install-recursive] Error 1 > > > I am not able to find out what is the actual problem, How to solve the same. > > Please let me know if any of you have gone through the similar kind of problem. > > > > Thanking a lot. > > Larsen & Toubro Limited > > www.larsentoubro.com > > This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > Larsen & Toubro Limited www.larsentoubro.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. From armin at steinhoff.de Fri Jul 13 20:36:25 2012 From: armin at steinhoff.de (Armin Steinhoff) Date: Fri, 13 Jul 2012 20:36:25 +0200 Subject: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX In-Reply-To: <7E56B0710035754D80A22F7BA63062C806DA777B@POCITMSEXMB01.LntUniverse.com> References: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com>, <50002273.2060402@steinhoff.de> <7E56B0710035754D80A22F7BA63062C806DA777B@POCITMSEXMB01.LntUniverse.com> Message-ID: <50006AA9.9010008@steinhoff.de> Hi, you should use "bash" as shell. Download the sources of bash ... it can be compiled without problem. The ksh or sh makes often problems with bash based scripts/commands. --Armin Zafar Iqbal wrote: > >> Hi All, >> >> I am trying to compile Zeromq-2.1.9 in QNX self hosted system, I was getting the following errors. >> >> 1. Initially after running the configuration file, Makefile generated sucessfully. When I invoked make , the compilation started and when it reached to the linking stage it has given the error -lcrypto not found, just to chek it I removed -lcrypto from the makefile then it has shown the error -lsocket not found, When I looked into the libs path I found both the were available. > .... and what is your LD_LIBRARY_PATH ? Does it include /usr/lib ? > > Yes my LD_LIBRARY_PATH includes /usr/lib > >> After some analysis I found -rpath was not set, I set it to /usr/lib, after that programme compiled successfully. > ... not sure if the -rpath option works with QCC front end! Are you > using QNX65 ? > > Yes I am using QNX65. > > > > http://steinhoff-automation.com > >> >> But after that I faced the Following problem: >> >> 2. When I tried to install it giving make install: >> I got the following error. >> >> >> Making install in src >> make[1]: Entering directory `/root/zeromq-2.1.9/src' >> make[2]: Entering directory `/root/zeromq-2.1.9/src' >> test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" >> /bin/sh ../libtool --mode=install ../config/install-sh -c libzmq.la '/usr/loca >> libtool: install: ../config/install-sh -c .libs/libzmq.lai /usr/local/lib/libzmq.la >> ../config/install-sh: .libs/libzmq.lai does not exist. >> make[2]: *** [install-libLTLIBRARIES] Error 1 >> make[2]: Leaving directory `/root/zeromq-2.1.9/src' >> make[1]: *** [install-am] Error 2 >> make[1]: Leaving directory `/root/zeromq-2.1.9/src' >> make: *** [install-recursive] Error 1 >> >> >> I am not able to find out what is the actual problem, How to solve the same. >> >> Please let me know if any of you have gone through the similar kind of problem. >> >> >> >> Thanking a lot. >> >> Larsen & Toubro Limited >> >> www.larsentoubro.com >> >> This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > Larsen & Toubro Limited > > www.larsentoubro.com > > This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. > From armin at steinhoff.de Fri Jul 13 22:04:25 2012 From: armin at steinhoff.de (Armin Steinhoff) Date: Fri, 13 Jul 2012 22:04:25 +0200 Subject: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX In-Reply-To: <7E56B0710035754D80A22F7BA63062C806DA777B@POCITMSEXMB01.LntUniverse.com> References: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com>, <50002273.2060402@steinhoff.de> <7E56B0710035754D80A22F7BA63062C806DA777B@POCITMSEXMB01.LntUniverse.com> Message-ID: <50007F49.8090502@steinhoff.de> Hi, I have recompiled zmq 2.2 and configured with CC=qcc CXX=QCC ./configure make make install without any problem for QNX 6.5 SP1 by using "bash". BR --Armin Zafar Iqbal wrote: > >> Hi All, >> >> I am trying to compile Zeromq-2.1.9 in QNX self hosted system, I was getting the following errors. >> >> 1. Initially after running the configuration file, Makefile generated sucessfully. When I invoked make , the compilation started and when it reached to the linking stage it has given the error -lcrypto not found, just to chek it I removed -lcrypto from the makefile then it has shown the error -lsocket not found, When I looked into the libs path I found both the were available. > .... and what is your LD_LIBRARY_PATH ? Does it include /usr/lib ? > > Yes my LD_LIBRARY_PATH includes /usr/lib > >> After some analysis I found -rpath was not set, I set it to /usr/lib, after that programme compiled successfully. > ... not sure if the -rpath option works with QCC front end! Are you > using QNX65 ? > > Yes I am using QNX65. > > > > http://steinhoff-automation.com > >> >> But after that I faced the Following problem: >> >> 2. When I tried to install it giving make install: >> I got the following error. >> >> >> Making install in src >> make[1]: Entering directory `/root/zeromq-2.1.9/src' >> make[2]: Entering directory `/root/zeromq-2.1.9/src' >> test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" >> /bin/sh ../libtool --mode=install ../config/install-sh -c libzmq.la '/usr/loca >> libtool: install: ../config/install-sh -c .libs/libzmq.lai /usr/local/lib/libzmq.la >> ../config/install-sh: .libs/libzmq.lai does not exist. >> make[2]: *** [install-libLTLIBRARIES] Error 1 >> make[2]: Leaving directory `/root/zeromq-2.1.9/src' >> make[1]: *** [install-am] Error 2 >> make[1]: Leaving directory `/root/zeromq-2.1.9/src' >> make: *** [install-recursive] Error 1 >> >> >> I am not able to find out what is the actual problem, How to solve the same. >> >> Please let me know if any of you have gone through the similar kind of problem. >> >> >> >> Thanking a lot. >> >> Larsen & Toubro Limited >> >> www.larsentoubro.com >> >> This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > Larsen & Toubro Limited > > www.larsentoubro.com > > This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. > From ian.barber at gmail.com Fri Jul 13 22:24:35 2012 From: ian.barber at gmail.com (Ian Barber) Date: Fri, 13 Jul 2012 21:24:35 +0100 Subject: [zeromq-dev] Broadcasting with a Router ? In-Reply-To: References: <4FFF5585.2090301@gmail.com> Message-ID: On Fri, Jul 13, 2012 at 11:05 AM, Gr?goire Passault wrote: > Yes but a subscriber can't send any message, right? > > Greg > Well, technically they can send subscribe messages on 3.1+, but that is probably pushing it too far :) Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120713/ae79dbd0/attachment.htm From rtummala at appdynamics.com Sat Jul 14 00:35:43 2012 From: rtummala at appdynamics.com (Rama Tummala) Date: Fri, 13 Jul 2012 15:35:43 -0700 Subject: [zeromq-dev] Question on client side message queueing Message-ID: I have a N-1 fan in model. I am using ROUTER-DEALER-REP. (I use ZMQ.Poll to pull the requests from the ROUTER socket and push to DEALER socket.) The ROUTER and DEALER sockets bind at the server and client simply connects to the ROUTER to push requests. In my case, around 200 clients connect to the ROUTER and send multiple requests. I am trying to make best use of the client side message queue feature provided by zeromq. In case of a REQ-REP its very clear. The message stays in the message queue (on the client end) until the REP socket is ready to process. How does this concept translate to a more complicated model like REQ-ROUTER-DEALER-REP. In the doc, it also says that the queueing happens closer to the receiver. I am trying to avoid the situation where all the messages are queued up on the server. (For example, 200 clients * 100 messages queued up). Any help is much appreciated. Regards Rama -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120713/e434f8fa/attachment.htm From ph at imatix.com Sat Jul 14 11:01:58 2012 From: ph at imatix.com (Pieter Hintjens) Date: Sat, 14 Jul 2012 18:01:58 +0900 Subject: [zeromq-dev] [czmq] src/zsocket.c, this looks like unused variable to me In-Reply-To: <1342068143.17421.6.camel@laure.segg2.videotron.ca> References: <1342068143.17421.6.camel@laure.segg2.videotron.ca> Message-ID: On Thu, Jul 12, 2012 at 1:42 PM, Gilles J. Seguin wrote: > fedora gcc-4.7.0-5.fc17.x86_64 > $ gcc -I../include -Werror -Wno-unused -Wall -c zsocket.c -o zsocket.o > zsocket.c: In function ?zsocket_poll?: > zsocket.c:152:9: error: unused variable ?rc? [-Werror=unused-variable] > cc1: all warnings being treated as errors Indeed, it's unused. Some other random compiler was complaining about "return value discarded". Feel free to send a pull request to fix this. -Pieter From aalok at ideadevice.com Sat Jul 14 20:52:03 2012 From: aalok at ideadevice.com (aalok sood) Date: Sun, 15 Jul 2012 00:22:03 +0530 Subject: [zeromq-dev] A query about implementing aborts in request reply broker Message-ID: 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? Or should I try to keep a mapping in my broker about which worker is running which request. Is this some awesomeness of zeromq that I am blind to? -- Aalok -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120715/664de341/attachment.htm From vickyqasim at gmail.com Sun Jul 15 04:13:38 2012 From: vickyqasim at gmail.com (Vicky Qasim) Date: Sun, 15 Jul 2012 07:43:38 +0530 Subject: [zeromq-dev] Problem About Installing BASH in QNX Message-ID: HI, I am using QNX 6.5.0, I am trying to Install BASH into it I have downloaded bash 4.0 and trying to install into the qnx system. I ran env CC=qcc ./configure after that make But I am getting the following error. fpurge.c:119:3: error: #error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib. cc: /usr/qnx650/host/qnx6/x86/usr/ lib/gcc/i486-pc-nto-qnx6.5.0/4.4.2/cc1 error 1 make[1]: *** [fpurge.o] Error 1 make[1]: Leaving directory `/root/bash-4.0-rc1/lib/sh' make: *** [lib/sh/libsh.a] Error 1 Please let me know if any one is having the solution of the same. Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120715/29f3b68f/attachment.htm From Sharon.Ben-Asher at avg.com Sun Jul 15 14:38:09 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Sun, 15 Jul 2012 12:38:09 +0000 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D505B@ex10czdmb01> Hello, I managed to compile the ZeroMQ + Java binding shared objects for ARM. Thias is what file gives me on the two so files libzmq.so.3.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped libjzmq.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped and of course, I also have zmq.jar now I created a new Android project in Eclipse. Following advice on the net: * I placed the two so files udner libs/armeabi (renamed libzmq.so.3.0.0 into libzmq.so) * I placed the jar file under libs, and added to the build path * Took the tripping sample and called it from main activity * Compile was successful. However, debugging the apk on a mobile device, I get the following error during System.loadLibrary in the ctor of ZMQ file name: /data/data/com.avgmobilation.zeromq/lib/libjzmq.so Cannot load library: reloc_library[1289]: 157 cannot locate '_ZNSs6assignEPKcj'... and later on this gets translated into an UnsatisfiedLinkError Even tried to build the apk on the linux machine where the so was compiled - same error. Any help is appreciated... Thanks, Sharon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120715/e8ea844d/attachment.htm From ian.barber at gmail.com Sun Jul 15 17:40:18 2012 From: ian.barber at gmail.com (Ian Barber) Date: Sun, 15 Jul 2012 16:40:18 +0100 Subject: [zeromq-dev] A query about implementing aborts in request reply broker In-Reply-To: References: Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120715/9c3c7b61/attachment.htm From stefan at konink.de Sun Jul 15 20:00:47 2012 From: stefan at konink.de (Stefan de Konink) Date: Sun, 15 Jul 2012 20:00:47 +0200 Subject: [zeromq-dev] High memory usage (memory leak?) Message-ID: <5003054F.8040202@konink.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi, We are using ZeroMQ 2.2 and are quite happy about it. We wish we could move to ZeroMQ 3 but some outstanding bugs regarding the PubSub implementation prevent this. One of our current mysteries is the enormous high amount of memory our pubsub uses. The clients on the other hand consume a very high virtual memory amount. (Think in order of 500MB+) It seems that once in a few weeks we end up with a: FATAL ERROR: OUT OF MEMORY (yqueue.hpp:54) Our source code is pretty simple - no mallocs from our side what so ever and every init is closed; Still if I look to the virtual memory and real memory of one of my clients I see: 146MB virtual 56256 real ...where is this memory spend? Stefan #include #include #include #include int main (int argc, char *argv[]) { if (argc != 3) { printf("%s [receiver] [pubsub]\n\nEx.\n%s tcp://127.0.0.1:7807 tcp://127.0.0.1:7817\n", argv[0], argv[0]); exit(-1); } void *context = zmq_init (1); void *pubsub = zmq_socket (context, ZMQ_PUB); void *receiver = zmq_socket (context, ZMQ_PULL); zmq_bind (pubsub, argv[2]); zmq_bind (receiver, argv[1]); while (1) { int64_t more; size_t more_size = sizeof more; do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recv (receiver, &part, 0); assert (rc == 0); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (receiver, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); if (more) { zmq_send (pubsub, &part, ZMQ_SNDMORE); } else { zmq_send (pubsub, &part, 0); } zmq_msg_close (&part); } while (more); } } -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREKAAYFAlADBU4ACgkQYH1+F2Rqwn3iVwCeLZGRgTRVVHXVAL9smKLYnEbC +LkAoIcWRhK1YylyLUlpkDEtoLgF0qiS =Hy+T -----END PGP SIGNATURE----- From hurtonm at gmail.com Sun Jul 15 20:03:55 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Sun, 15 Jul 2012 20:03:55 +0200 Subject: [zeromq-dev] Websockets as a Transport ? In-Reply-To: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> References: <024001cd5a13$16fa8e10$44efaa30$@petrolink.com> Message-ID: Hi Mark, I am working on adding websocket transport into 0MQ. Will post a message once its ready for testing. - Martin On Wed, Jul 4, 2012 at 8:30 PM, Mark Farnan wrote: > Howdy all, > > > > I?m evaluating zeroMQ, and one main criteria we have is to support > Websockets for client to server communications. > > > > Has there been any work on making a native Websocket transport for ZeroMQ in > the core C++ libraries ? > > > > > > Regards > > > > Mark Farnan > > Director, Product Development > > Petrolink Services Inc > > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From hurtonm at gmail.com Mon Jul 16 00:10:45 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Mon, 16 Jul 2012 00:10:45 +0200 Subject: [zeromq-dev] High memory usage (memory leak?) In-Reply-To: <5003054F.8040202@konink.de> References: <5003054F.8040202@konink.de> Message-ID: You suggest there are more issues. What are they? Thanks! - Martin On Sun, Jul 15, 2012 at 8:00 PM, Stefan de Konink wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi, > > We are using ZeroMQ 2.2 and are quite happy about it. We wish we could > move to ZeroMQ 3 but some outstanding bugs regarding the PubSub > implementation prevent this. > > One of our current mysteries is the enormous high amount of memory our > pubsub uses. The clients on the other hand consume a very high virtual > memory amount. (Think in order of 500MB+) > > It seems that once in a few weeks we end up with a: > > FATAL ERROR: OUT OF MEMORY (yqueue.hpp:54) > > > Our source code is pretty simple - no mallocs from our side what so > ever and every init is closed; Still if I look to the virtual memory > and real memory of one of my clients I see: > > 146MB virtual > 56256 real > > ...where is this memory spend? > > > Stefan > > > > > #include > #include > #include > #include > > int main (int argc, char *argv[]) { > if (argc != 3) { > printf("%s [receiver] [pubsub]\n\nEx.\n%s tcp://127.0.0.1:7807 > tcp://127.0.0.1:7817\n", argv[0], argv[0]); > exit(-1); > } > > void *context = zmq_init (1); > void *pubsub = zmq_socket (context, ZMQ_PUB); > void *receiver = zmq_socket (context, ZMQ_PULL); > > zmq_bind (pubsub, argv[2]); > zmq_bind (receiver, argv[1]); > > while (1) { > int64_t more; > size_t more_size = sizeof more; > do { > /* Create an empty 0MQ message to hold the > message part */ > zmq_msg_t part; > int rc = zmq_msg_init (&part); > assert (rc == 0); > /* Block until a message is available to be > received from socket */ > rc = zmq_recv (receiver, &part, 0); > assert (rc == 0); > /* Determine if more message parts are to > follow */ > rc = zmq_getsockopt (receiver, ZMQ_RCVMORE, > &more, &more_size); > assert (rc == 0); > if (more) { > zmq_send (pubsub, &part, ZMQ_SNDMORE); > } else { > zmq_send (pubsub, &part, 0); > } > zmq_msg_close (&part); > } while (more); > } > } > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.18 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEAREKAAYFAlADBU4ACgkQYH1+F2Rqwn3iVwCeLZGRgTRVVHXVAL9smKLYnEbC > +LkAoIcWRhK1YylyLUlpkDEtoLgF0qiS > =Hy+T > -----END PGP SIGNATURE----- > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From stefan at konink.de Mon Jul 16 00:28:21 2012 From: stefan at konink.de (Stefan de Konink) Date: Mon, 16 Jul 2012 00:28:21 +0200 Subject: [zeromq-dev] High memory usage (memory leak?) In-Reply-To: References: <5003054F.8040202@konink.de> Message-ID: <50034405.7010806@konink.de> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 16-07-12 00:10, Martin Hurton wrote: > You suggest there are more issues. What are they? Thanks! Our migration issue before moving to ZeroMQ3 is: It seems to impossible to receive *any* message for some reason by the client using the exact same programs (obviously the C code is modified). While we mainly use PyZMQ, the same issue seems to be with native C code. I suspect it has something to do with multipart messages. But the memory issue really gives a headache, so kinda have priority to get addressed. Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEAREKAAYFAlADRAUACgkQYH1+F2Rqwn0MMQCdFOos8wSfFCDfXrM/+9LSE7py 3AgAnAy1JPeZq41axVeGcTaEGmxCtwmI =ZG7q -----END PGP SIGNATURE----- From hurtonm at gmail.com Mon Jul 16 00:48:31 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Mon, 16 Jul 2012 00:48:31 +0200 Subject: [zeromq-dev] High memory usage (memory leak?) In-Reply-To: <50034405.7010806@konink.de> References: <5003054F.8040202@konink.de> <50034405.7010806@konink.de> Message-ID: Stefan, could you please create a Jira issue for this? - Martin On Mon, Jul 16, 2012 at 12:28 AM, Stefan de Konink wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 16-07-12 00:10, Martin Hurton wrote: >> You suggest there are more issues. What are they? Thanks! > > Our migration issue before moving to ZeroMQ3 is: > > > > It seems to impossible to receive *any* message for some reason by the > client using the exact same programs (obviously the C code is > modified). While we mainly use PyZMQ, the same issue seems to be with > native C code. I suspect it has something to do with multipart messages. > > > But the memory issue really gives a headache, so kinda have priority > to get addressed. > > > Stefan > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.18 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEAREKAAYFAlADRAUACgkQYH1+F2Rqwn0MMQCdFOos8wSfFCDfXrM/+9LSE7py > 3AgAnAy1JPeZq41axVeGcTaEGmxCtwmI > =ZG7q > -----END PGP SIGNATURE----- > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From Zafar.Iqbal at lnties.com Mon Jul 16 02:27:00 2012 From: Zafar.Iqbal at lnties.com (Zafar Iqbal) Date: Mon, 16 Jul 2012 00:27:00 +0000 Subject: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX In-Reply-To: <50007F49.8090502@steinhoff.de> References: <7E56B0710035754D80A22F7BA63062C806DA7748@POCITMSEXMB01.LntUniverse.com>, <50002273.2060402@steinhoff.de> <7E56B0710035754D80A22F7BA63062C806DA777B@POCITMSEXMB01.LntUniverse.com>, <50007F49.8090502@steinhoff.de> Message-ID: <7E56B0710035754D80A22F7BA63062C806DA77F2@POCITMSEXMB01.LntUniverse.com> Thanks a lot, This Has Solved my problem, Even zeroMQ-2.1.9 is also got compiled and now it is working fine in QNX. ________________________________________ From: Armin Steinhoff [armin at steinhoff.de] Sent: Saturday, July 14, 2012 1:34 AM To: Zafar Iqbal Cc: ZeroMQ development list Subject: Re: [zeromq-dev] Problem When Compiling Zeromq 2.1.9 in QNX Hi, I have recompiled zmq 2.2 and configured with CC=qcc CXX=QCC ./configure make make install without any problem for QNX 6.5 SP1 by using "bash". BR --Armin Zafar Iqbal wrote: > >> Hi All, >> >> I am trying to compile Zeromq-2.1.9 in QNX self hosted system, I was getting the following errors. >> >> 1. Initially after running the configuration file, Makefile generated sucessfully. When I invoked make , the compilation started and when it reached to the linking stage it has given the error -lcrypto not found, just to chek it I removed -lcrypto from the makefile then it has shown the error -lsocket not found, When I looked into the libs path I found both the were available. > .... and what is your LD_LIBRARY_PATH ? Does it include /usr/lib ? > > Yes my LD_LIBRARY_PATH includes /usr/lib > >> After some analysis I found -rpath was not set, I set it to /usr/lib, after that programme compiled successfully. > ... not sure if the -rpath option works with QCC front end! Are you > using QNX65 ? > > Yes I am using QNX65. > > > > http://steinhoff-automation.com > >> >> But after that I faced the Following problem: >> >> 2. When I tried to install it giving make install: >> I got the following error. >> >> >> Making install in src >> make[1]: Entering directory `/root/zeromq-2.1.9/src' >> make[2]: Entering directory `/root/zeromq-2.1.9/src' >> test -z "/usr/local/lib" || ../config/install-sh -c -d "/usr/local/lib" >> /bin/sh ../libtool --mode=install ../config/install-sh -c libzmq.la '/usr/loca >> libtool: install: ../config/install-sh -c .libs/libzmq.lai /usr/local/lib/libzmq.la >> ../config/install-sh: .libs/libzmq.lai does not exist. >> make[2]: *** [install-libLTLIBRARIES] Error 1 >> make[2]: Leaving directory `/root/zeromq-2.1.9/src' >> make[1]: *** [install-am] Error 2 >> make[1]: Leaving directory `/root/zeromq-2.1.9/src' >> make: *** [install-recursive] Error 1 >> >> >> I am not able to find out what is the actual problem, How to solve the same. >> >> Please let me know if any of you have gone through the similar kind of problem. >> >> >> >> Thanking a lot. >> >> Larsen & Toubro Limited >> >> www.larsentoubro.com >> >> This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > Larsen & Toubro Limited > > www.larsentoubro.com > > This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. > Larsen & Toubro Limited www.larsentoubro.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. From Zafar.Iqbal at lnties.com Mon Jul 16 02:39:21 2012 From: Zafar.Iqbal at lnties.com (Zafar Iqbal) Date: Mon, 16 Jul 2012 00:39:21 +0000 Subject: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 13 In-Reply-To: References: Message-ID: <7E56B0710035754D80A22F7BA63062C806DA7804@POCITMSEXMB01.LntUniverse.com> HI, Download third party ISO from the following link: http://www.qnx.com/download/feature.html?programid=9978 mount the iso image to your filesystem(if you are using Linux or QNX as self host ) extract src.zip from the image you will find bash folder in it. run the command CC=qcc ./configure followed by make and make install. Larsen & Toubro Limited www.larsentoubro.com This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system. From victor at iso3103.net Mon Jul 16 08:29:59 2012 From: victor at iso3103.net (Victor Perron) Date: Mon, 16 Jul 2012 08:29:59 +0200 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B384D505B@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B384D505B@ex10czdmb01> Message-ID: Hello, Did you properly follow the directions stated at http://www.zeromq.org/build:android ? According to those, you shouldn't even have generated two binaries in the first place. Renaming libzmq.so.3.0.0 into libzmq.so has also almost no chance to work the way you want it to work; it does not fix the actual soname which is hardcoded to "libzmq.so.3.0.0" in both libs at link time. I'd advise you to follow the steps at that url, and report any further issue you'd have ! Best regards, On Sun, Jul 15, 2012 at 2:38 PM, Sharon Ben-Asher wrote: > Hello,**** > > ** ** > > I managed to compile the ZeroMQ + Java binding shared objects for ARM.**** > > Thias is what file gives me on the two so files **** > > libzmq.so.3.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), > dynamically linked, not stripped**** > > libjzmq.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), > dynamically linked, not stripped**** > > and of course, I also have zmq.jar**** > > now I created a new Android project in Eclipse.**** > > Following advice on the net:**** > > **? **I placed the two so files udner libs/armeabi (renamed > libzmq.so.3.0.0 into libzmq.so)**** > > **? **I placed the jar file under libs, and added to the build path > **** > > **? **Took the tripping sample and called it from main activity**** > > **? **Compile was successful. However, debugging the apk on a > mobile device, I get the following error during System.loadLibrary in the > ctor of ZMQ > file name: /data/data/com.avgmobilation.zeromq/lib/libjzmq.so > Cannot load library: reloc_library[1289]: 157 cannot locate > '_ZNSs6assignEPKcj'... > and later on this gets translated into an UnsatisfiedLinkError**** > > ** ** > > Even tried to build the apk on the linux machine where the so was compiled > ? same error.**** > > Any help is appreciated?**** > > ** ** > > Thanks,**** > > ** ** > > Sharon**** > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/7f00e9dd/attachment.htm From aalok at ideadevice.com Mon Jul 16 12:17:41 2012 From: aalok at ideadevice.com (aalok sood) Date: Mon, 16 Jul 2012 15:47:41 +0530 Subject: [zeromq-dev] A query about implementing aborts in request reply broker In-Reply-To: References: Message-ID: 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 at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/6a91e94a/attachment.htm From markostrajkov at gmail.com Mon Jul 16 18:38:12 2012 From: markostrajkov at gmail.com (Marko Trajkov) Date: Mon, 16 Jul 2012 09:38:12 -0700 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/0f09fe8f/attachment.htm From pelletier.michel at gmail.com Mon Jul 16 19:02:21 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 16 Jul 2012 10:02:21 -0700 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up In-Reply-To: References: Message-ID: 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 at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From pelletier.michel at gmail.com Mon Jul 16 19:07:19 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 16 Jul 2012 10:07:19 -0700 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up In-Reply-To: References: Message-ID: 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 at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> From abc at alexsergeyev.com Tue Jul 17 03:55:51 2012 From: abc at alexsergeyev.com (Alex Sergeyev) Date: Mon, 16 Jul 2012 21:55:51 -0400 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up In-Reply-To: References: Message-ID: 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) From anti_tenzor at mail.ru Tue Jul 17 09:37:51 2012 From: anti_tenzor at mail.ru (anti_tenzor) Date: Tue, 17 Jul 2012 11:37:51 +0400 Subject: [zeromq-dev] what are the best practices to send complex objects? Message-ID: <5005164F.9030603@mail.ru> Hello, all, I'd like to use ZMQ to send complex objects between applications (using CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, I am forced to implement some serialization-deserialization mechanism. But the hole idea is to be as fast as possible! So it looks like this algo should be: 1. Extremely fast 2. Produce very compact byte arrays Could you please suggest some best practices or libraries (.net), that meets these requirements? How do you send complex ojects via ZMQ in real-life applications? Thank you in advance! From ronaldbelliott at gmail.com Tue Jul 17 09:40:01 2012 From: ronaldbelliott at gmail.com (Ron Elliott) Date: Tue, 17 Jul 2012 00:40:01 -0700 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: <5005164F.9030603@mail.ru> References: <5005164F.9030603@mail.ru> Message-ID: Not sure about .NET compatibility but check out Google's Protocol Buffers http://code.google.com/p/protobuf/ On Jul 17, 2012 12:38 AM, "anti_tenzor" wrote: > Hello, all, > > I'd like to use ZMQ to send complex objects between applications (using > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, > I am forced to implement some serialization-deserialization mechanism. > > But the hole idea is to be as fast as possible! So it looks like this > algo should be: > 1. Extremely fast > 2. Produce very compact byte arrays > > Could you please suggest some best practices or libraries (.net), that > meets these requirements? > > How do you send complex ojects via ZMQ in real-life applications? > > Thank you in advance! > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/c0af5b09/attachment.htm From aalok at ideadevice.com Tue Jul 17 09:40:21 2012 From: aalok at ideadevice.com (aalok sood) Date: Tue, 17 Jul 2012 13:10:21 +0530 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: <5005164F.9030603@mail.ru> References: <5005164F.9030603@mail.ru> Message-ID: You could look at json. I have been using it quite heavily for serialization-deserialization, and it does the job quite well. On Tue, Jul 17, 2012 at 1:07 PM, anti_tenzor wrote: > Hello, all, > > I'd like to use ZMQ to send complex objects between applications (using > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, > I am forced to implement some serialization-deserialization mechanism. > > But the hole idea is to be as fast as possible! So it looks like this > algo should be: > 1. Extremely fast > 2. Produce very compact byte arrays > > Could you please suggest some best practices or libraries (.net), that > meets these requirements? > > How do you send complex ojects via ZMQ in real-life applications? > > Thank you in advance! > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/8303ecdd/attachment.htm From Sharon.Ben-Asher at avg.com Tue Jul 17 10:09:39 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Tue, 17 Jul 2012 08:09:39 +0000 Subject: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14 In-Reply-To: References: Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D638A@ex10czdmb01> Hi Victor, I did follow the instructions in the Build Android wiki. I don't know what you mean by "you shouldn't even have generated two binaries in the first place " - I have the *exact* directory tree that is described in that page for ZeroMQ 3.x. The listed directory tree shows two shared object files: libzmq and libjzmq. The instructions stop after production of zmq.jar, there are no instructions on how to embed the product into an APK, which .so files to put there, etc. I tried to put only libjzmq.so in the apk (under libs/armeabi) with the same error. I even enlisted our expert APK developer, he tried several configurations and file placements, with no avail. I would like to know which steps you think I did not follow, or otherwise what am I missing (no sarcasm intended, I really am at a loss here) Thanks, Sharon. -----Original Message----- From: Victor Perron Subject: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK To: ZeroMQ development list Message-ID: Content-Type: text/plain; charset="windows-1252" Hello, Did you properly follow the directions stated at http://www.zeromq.org/build:android ? According to those, you shouldn't even have generated two binaries in the first place. Renaming libzmq.so.3.0.0 into libzmq.so has also almost no chance to work the way you want it to work; it does not fix the actual soname which is hardcoded to "libzmq.so.3.0.0" in both libs at link time. I'd advise you to follow the steps at that url, and report any further issue you'd have ! Best regards, On Sun, Jul 15, 2012 at 2:38 PM, Sharon Ben-Asher wrote: > Hello,**** > > ** ** > > I managed to compile the ZeroMQ + Java binding shared objects for > ARM.**** > > Thias is what file gives me on the two so files **** > > libzmq.so.3.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), > dynamically linked, not stripped**** > > libjzmq.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), > dynamically linked, not stripped**** > > and of course, I also have zmq.jar**** > > now I created a new Android project in Eclipse.**** > > Following advice on the net:**** > > **? **I placed the two so files udner libs/armeabi (renamed > libzmq.so.3.0.0 into libzmq.so)**** > > **? **I placed the jar file under libs, and added to the build path > **** > > **? **Took the tripping sample and called it from main activity**** > > **? **Compile was successful. However, debugging the apk on a > mobile device, I get the following error during System.loadLibrary in > the ctor of ZMQ file name: > /data/data/com.avgmobilation.zeromq/lib/libjzmq.so > Cannot load library: reloc_library[1289]: 157 cannot locate > '_ZNSs6assignEPKcj'... > and later on this gets translated into an UnsatisfiedLinkError**** > > ** ** > > Even tried to build the apk on the linux machine where the so was > compiled ? same error.**** > > Any help is appreciated?**** > > ** ** > > Thanks,**** > > ** ** > > Sharon**** > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/7f00e9dd/attachment-0001.htm ------------------------------ _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev End of zeromq-dev Digest, Vol 55, Issue 14 ****************************************** From victor at iso3103.net Tue Jul 17 10:38:09 2012 From: victor at iso3103.net (Victor Perron) Date: Tue, 17 Jul 2012 10:38:09 +0200 Subject: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14 In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B384D638A@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B384D638A@ex10czdmb01> Message-ID: Hi, In that case it seems that you discovered something serious. I took a look at it, and indeed the assign() symbol from std::string class seems undefined. That would mean, Android does _not_ define such a function in its SDK. Now, the proper way to get around this is a patch to Zeromq 3.x. You'll have to fix those lines (my guess): ./src/ipc_listener.cpp:151: filename.assign(addr_); ./src/socket_base.cpp:331: options.last_endpoint.assign (addr_); ./src/socket_base.cpp:480: options.last_endpoint.assign (addr_); ./src/tcp_address.cpp:503: addr_str.assign (name_, delimiter - name_); ./src/tcp_address.cpp:504: mask_str.assign (delimiter + 1); ./src/tcp_address.cpp:511: addr_str.assign (name_); ... and try to compile again. If there are no other undefined symbols, that should work. That issue did not exist in ZeroMQ 2.2 though, that one didn't make an extensive use of std::string. Keep me updated, we'll see for a pull request when I'll be less busy ;) Best regards, On Tue, Jul 17, 2012 at 10:09 AM, Sharon Ben-Asher wrote: > Hi Victor, > > I did follow the instructions in the Build Android wiki. > I don't know what you mean by "you shouldn't even have generated two > binaries in the first place " - I have the *exact* directory tree that is > described in that page for ZeroMQ 3.x. > The listed directory tree shows two shared object files: libzmq and > libjzmq. > The instructions stop after production of zmq.jar, there are no > instructions on how to embed the product into an APK, which .so files to > put there, etc. > I tried to put only libjzmq.so in the apk (under libs/armeabi) with the > same error. > I even enlisted our expert APK developer, he tried several configurations > and file placements, with no avail. > > I would like to know which steps you think I did not follow, or otherwise > what am I missing (no sarcasm intended, I really am at a loss here) > > Thanks, > > Sharon. > > > -----Original Message----- > From: Victor Perron > Subject: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the > Android APK > To: ZeroMQ development list > Message-ID: > bZ_EqtLm-QF5Mg at mail.gmail.com> > Content-Type: text/plain; charset="windows-1252" > > Hello, > > Did you properly follow the directions stated at > http://www.zeromq.org/build:android ? > According to those, you shouldn't even have generated two binaries in the > first place. > Renaming libzmq.so.3.0.0 into libzmq.so has also almost no chance to work > the way you want it to work; it does not fix the actual soname which is > hardcoded to "libzmq.so.3.0.0" in both libs at link time. > > I'd advise you to follow the steps at that url, and report any further > issue you'd have ! > > Best regards, > > On Sun, Jul 15, 2012 at 2:38 PM, Sharon Ben-Asher > wrote: > > > Hello,**** > > > > ** ** > > > > I managed to compile the ZeroMQ + Java binding shared objects for > > ARM.**** > > > > Thias is what file gives me on the two so files **** > > > > libzmq.so.3.0.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), > > dynamically linked, not stripped**** > > > > libjzmq.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), > > dynamically linked, not stripped**** > > > > and of course, I also have zmq.jar**** > > > > now I created a new Android project in Eclipse.**** > > > > Following advice on the net:**** > > > > **? **I placed the two so files udner libs/armeabi (renamed > > libzmq.so.3.0.0 into libzmq.so)**** > > > > **? **I placed the jar file under libs, and added to the build > path > > **** > > > > **? **Took the tripping sample and called it from main > activity**** > > > > **? **Compile was successful. However, debugging the apk on a > > mobile device, I get the following error during System.loadLibrary in > > the ctor of ZMQ file name: > > /data/data/com.avgmobilation.zeromq/lib/libjzmq.so > > Cannot load library: reloc_library[1289]: 157 cannot locate > > '_ZNSs6assignEPKcj'... > > and later on this gets translated into an UnsatisfiedLinkError**** > > > > ** ** > > > > Even tried to build the apk on the linux machine where the so was > > compiled ? same error.**** > > > > Any help is appreciated?**** > > > > ** ** > > > > Thanks,**** > > > > ** ** > > > > Sharon**** > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > > > -- > Victor > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120716/7f00e9dd/attachment-0001.htm > > ------------------------------ > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > End of zeromq-dev Digest, Vol 55, Issue 14 > ****************************************** > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/ce2dc6db/attachment.htm From lestrrat at gmail.com Tue Jul 17 10:57:29 2012 From: lestrrat at gmail.com (Daisuke Maki) Date: Tue, 17 Jul 2012 17:57:29 +0900 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up In-Reply-To: References: Message-ID: 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 : > 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 at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From cfkaran2 at gmail.com Tue Jul 17 11:57:06 2012 From: cfkaran2 at gmail.com (Cem Karan) Date: Tue, 17 Jul 2012 05:57:06 -0400 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: <5005164F.9030603@mail.ru> References: <5005164F.9030603@mail.ru> Message-ID: <94236CF4-F8CF-492A-AD4C-1A3653FC107B@gmail.com> I've been playing with MessagePack (http://msgpack.org/) for serialization and BLOSC (http://blosc.pytables.org/trac) for compression. They seem to work pretty well together. How fast is fast? BLOSC is designed to move data around in memory faster than memcpy() is able to do it, and I haven't had any complaints about how fast MessagePack works (OTOH, I'm I/O bound, so I tend not to hit any limits). Thanks, Cem Karan On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote: > Hello, all, > > I'd like to use ZMQ to send complex objects between applications (using > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, > I am forced to implement some serialization-deserialization mechanism. > > But the hole idea is to be as fast as possible! So it looks like this > algo should be: > 1. Extremely fast > 2. Produce very compact byte arrays > > Could you please suggest some best practices or libraries (.net), that > meets these requirements? > > How do you send complex ojects via ZMQ in real-life applications? > > Thank you in advance! > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1581 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/513e2126/attachment.bin From aalok at ideadevice.com Tue Jul 17 12:01:13 2012 From: aalok at ideadevice.com (aalok sood) Date: Tue, 17 Jul 2012 15:31:13 +0530 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: <94236CF4-F8CF-492A-AD4C-1A3653FC107B@gmail.com> References: <5005164F.9030603@mail.ru> <94236CF4-F8CF-492A-AD4C-1A3653FC107B@gmail.com> Message-ID: If you are **really** concerned about performance, I suggest you have your own protocol that both sides understand. This way you send data as it is, the remote side would know how to interpret it. On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan wrote: > I've been playing with MessagePack (http://msgpack.org/) for > serialization and BLOSC (http://blosc.pytables.org/trac) for compression. > They seem to work pretty well together. How fast is fast? BLOSC is > designed to move data around in memory faster than memcpy() is able to do > it, and I haven't had any complaints about how fast MessagePack works > (OTOH, I'm I/O bound, so I tend not to hit any limits). > > Thanks, > Cem Karan > > On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote: > > > Hello, all, > > > > I'd like to use ZMQ to send complex objects between applications (using > > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, > > I am forced to implement some serialization-deserialization mechanism. > > > > But the hole idea is to be as fast as possible! So it looks like this > > algo should be: > > 1. Extremely fast > > 2. Produce very compact byte arrays > > > > Could you please suggest some best practices or libraries (.net), that > > meets these requirements? > > > > How do you send complex ojects via ZMQ in real-life applications? > > > > Thank you in advance! > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/ef6cb1f2/attachment.htm From dophinehk at yahoo.com.hk Tue Jul 17 12:36:09 2012 From: dophinehk at yahoo.com.hk (Kira) Date: Tue, 17 Jul 2012 18:36:09 +0800 (SGT) Subject: [zeromq-dev] help Handling Multiple Sockets Message-ID: <1342521369.54808.YahooMailNeo@web190802.mail.sg3.yahoo.com> Hi, I try to write a program to handle multiple sockets. 1. typedef std::vector tPollItemList; tPollItemList m_oPollItemList; 2. add one entry to m_oPollItemList. 3. call ?zmq_poll (&m_oPollItemList[0], m_oPollItemList.size(), -1); I found revents is always zero i.e. tItr->revents & ZMQ_POLLIN is always false. Does anyone know the cause? Regards, Kira -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/5e688f5a/attachment.htm From mimir at newmail.ru Tue Jul 17 13:27:34 2012 From: mimir at newmail.ru (moteus) Date: Tue, 17 Jul 2012 11:27:34 +0000 (UTC) Subject: [zeromq-dev] Socket use from several threads Message-ID: Hi. I have some service. Service creates new thread for each request and call function from .dll to proceed this request. I write only .dll and can not change service. What best method to use REQ/REP sockets over inproc and tcp. If I understood correctly i have to create new context (tcp) and socket for each new thread? Or i can create some pool of sockets and use them at the same time only from one thread? From markostrajkov at gmail.com Tue Jul 17 14:17:56 2012 From: markostrajkov at gmail.com (Marko Trajkov) Date: Tue, 17 Jul 2012 14:17:56 +0200 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up Message-ID: 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 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 at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/03e1bc97/attachment.htm From lists at chuckremes.com Tue Jul 17 14:58:34 2012 From: lists at chuckremes.com (Chuck Remes) Date: Tue, 17 Jul 2012 07:58:34 -0500 Subject: [zeromq-dev] Socket use from several threads In-Reply-To: References: Message-ID: <75FBA2FE-975A-4949-A1A3-86251B2E8AB2@chuckremes.com> On Jul 17, 2012, at 6:27 AM, moteus wrote: > Hi. > > I have some service. > Service creates new thread for each request and call function from .dll to > proceed this request. > I write only .dll and can not change service. > What best method to use REQ/REP sockets over inproc and tcp. > If I understood correctly i have to create new context (tcp) and socket for each > new thread? Or i can create some pool of sockets and use them at the same time > only from one thread? You should create only ONE context. The context can be passed to each thread; any socket you create in a thread should only be used from that thread. I recommend that you read the guide and the FAQ. These ideas are discussed in both places. cr From lestrrat at gmail.com Tue Jul 17 15:18:20 2012 From: lestrrat at gmail.com (Daisuke Maki) Date: Tue, 17 Jul 2012 22:18:20 +0900 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up In-Reply-To: References: Message-ID: 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 : > 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 > 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 at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From mimir at newmail.ru Tue Jul 17 16:14:20 2012 From: mimir at newmail.ru (moteus) Date: Tue, 17 Jul 2012 14:14:20 +0000 (UTC) Subject: [zeromq-dev] Socket use from several threads References: <75FBA2FE-975A-4949-A1A3-86251B2E8AB2@chuckremes.com> Message-ID: Chuck Remes chuckremes.com> writes: > You should create only ONE context. The context can be passed to each thread; any socket you create in a > thread should only be used from that thread. > > I recommend that you read the guide and the FAQ. These ideas are discussed in both places. > > cr > I don't like to create a socket only for one request. (connect=>send/recv=>close) But as I understood there is no other way. About context - sorry for a silly question :) From lists at chuckremes.com Tue Jul 17 16:26:51 2012 From: lists at chuckremes.com (Chuck Remes) Date: Tue, 17 Jul 2012 09:26:51 -0500 Subject: [zeromq-dev] Socket use from several threads In-Reply-To: References: <75FBA2FE-975A-4949-A1A3-86251B2E8AB2@chuckremes.com> Message-ID: <22DB4BFF-7566-4C54-B0A3-E7F0DDC54AA8@chuckremes.com> On Jul 17, 2012, at 9:14 AM, moteus wrote: > Chuck Remes chuckremes.com> writes: > >> You should create only ONE context. The context can be passed to each thread; > any socket you create in a >> thread should only be used from that thread. >> >> I recommend that you read the guide and the FAQ. These ideas are discussed in > both places. >> >> cr >> > > I don't like to create a socket only for one request. > (connect=>send/recv=>close) > But as I understood there is no other way. > About context - sorry for a silly question :) Oh, so the threads are short-lived then. In that case, you should create a pool of them and have each thread "check out" the socket from the pool when it needs to use it and check it back in again when the thread exits. If the pool is protected by a mechanism (like a mutex) that employs a full memory barrier, then it will be safe. cr From markostrajkov at gmail.com Tue Jul 17 16:34:45 2012 From: markostrajkov at gmail.com (Marko Trajkov) Date: Tue, 17 Jul 2012 16:34:45 +0200 Subject: [zeromq-dev] ZeroMQ Hello World Perl Example Start Up In-Reply-To: References: Message-ID: Thanks you. Now is working fine. I didn't understand you at first time. Kind regards, Trajkov Marko On Tue, Jul 17, 2012 at 3:18 PM, Daisuke Maki wrote: > 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 : > > 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 > > 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 at lists.zeromq.org > >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/17bb6128/attachment.htm From bluerocketdelivery at gmail.com Tue Jul 17 08:22:04 2012 From: bluerocketdelivery at gmail.com (Ron Elliott) Date: Mon, 16 Jul 2012 23:22:04 -0700 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm Message-ID: Using the downloaded stable version 2.2 code I cannot get ZMQ to compile with the --with-pgm option. The project is too far along to make the switch to v3 so that's not an option atm. Any other solutions or is ZMQ dead for me? Error: Making all in build-staging/openpgm/pgm ... In file included from ./include/impl/sockaddr.h:38, from ./include/impl/notify.h:46, from ./include/impl/framework.h:66, from thread.c:23: ./include/pgm/in.h:34: error: redefinition of ?struct group_req? ./include/pgm/in.h:40: error: redefinition of ?struct group_source_req? make[2]: *** [libpgm_noinst_la-thread.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all-recursive] Error 1 Thanks in advance to anybody that may be able to provide me with some help! From steven.mccoy at miru.hk Tue Jul 17 21:27:17 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Tue, 17 Jul 2012 15:27:17 -0400 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: References: Message-ID: On 17 July 2012 02:22, Ron Elliott wrote: > Using the downloaded stable version 2.2 code I cannot get ZMQ to compile > with the --with-pgm option. The project is too far along to make the switch > to v3 so that's not an option atm. Any other solutions or is ZMQ dead for > me? > > It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to verify fixing the issue upstream in OpenPGM. -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/96c40fd0/attachment.htm From Andrzej.Dworak at cern.ch Tue Jul 17 23:18:04 2012 From: Andrzej.Dworak at cern.ch (Andrzej Dworak) Date: Tue, 17 Jul 2012 21:18:04 +0000 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: References: <5005164F.9030603@mail.ru> <94236CF4-F8CF-492A-AD4C-1A3653FC107B@gmail.com>, Message-ID: <7D80327D0646EC4794FBAE34D053E8667985866D@PLOXCHG03.cern.ch> Hi, I did some extensive testing of serialization libraries (tested C++ and Java implementations) more or less 3 months ago. Two products that I liked the most were MessagePack and Google Protocol Buffers. For my case, where I need to have self-describing serialization, I've chosen MessagePack. The requirements were quite high as this is going to be used by one of a core systems at CERN to operate LHC and other accelerators. So far no problems with MP, it's a great product, well, the same as ZeroMQ :) Cheers, Andrzej ________________________________ From: zeromq-dev-bounces at lists.zeromq.org [zeromq-dev-bounces at lists.zeromq.org] on behalf of aalok sood [aalok at ideadevice.com] Sent: 17 July 2012 12:01 To: ZeroMQ development list Subject: Re: [zeromq-dev] what are the best practices to send complex objects? If you are **really** concerned about performance, I suggest you have your own protocol that both sides understand. This way you send data as it is, the remote side would know how to interpret it. On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan > wrote: I've been playing with MessagePack (http://msgpack.org/) for serialization and BLOSC (http://blosc.pytables.org/trac) for compression. They seem to work pretty well together. How fast is fast? BLOSC is designed to move data around in memory faster than memcpy() is able to do it, and I haven't had any complaints about how fast MessagePack works (OTOH, I'm I/O bound, so I tend not to hit any limits). Thanks, Cem Karan On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote: > Hello, all, > > I'd like to use ZMQ to send complex objects between applications (using > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, > I am forced to implement some serialization-deserialization mechanism. > > But the hole idea is to be as fast as possible! So it looks like this > algo should be: > 1. Extremely fast > 2. Produce very compact byte arrays > > Could you please suggest some best practices or libraries (.net), that > meets these requirements? > > How do you send complex ojects via ZMQ in real-life applications? > > Thank you in advance! > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/f82a9c08/attachment.htm From ronaldbelliott at gmail.com Tue Jul 17 23:23:06 2012 From: ronaldbelliott at gmail.com (Ron Elliott) Date: Tue, 17 Jul 2012 14:23:06 -0700 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: <7D80327D0646EC4794FBAE34D053E8667985866D@PLOXCHG03.cern.ch> References: <5005164F.9030603@mail.ru> <94236CF4-F8CF-492A-AD4C-1A3653FC107B@gmail.com> <7D80327D0646EC4794FBAE34D053E8667985866D@PLOXCHG03.cern.ch> Message-ID: I'm not the OP however would it be possible for you to explain why you chose MessagePack over ProtoBufs? I currently use ProtoBufs myself and don't have any issues with it however I think this would be interesting to know On Jul 17, 2012 2:18 PM, "Andrzej Dworak" wrote: > Hi, > I did some extensive testing of serialization libraries (tested C++ and > Java implementations) more or less 3 months ago. Two products that I liked > the most were MessagePack and Google Protocol Buffers. For my case, where I > need to have self-describing serialization, I've chosen MessagePack. The > requirements were quite high as this is going to be used by one of a core > systems at CERN to operate LHC and other accelerators. So far no problems > with MP, it's a great product, well, the same as ZeroMQ :) > Cheers, > Andrzej > > > ------------------------------ > *From:* zeromq-dev-bounces at lists.zeromq.org [ > zeromq-dev-bounces at lists.zeromq.org] on behalf of aalok sood [ > aalok at ideadevice.com] > *Sent:* 17 July 2012 12:01 > *To:* ZeroMQ development list > *Subject:* Re: [zeromq-dev] what are the best practices to send complex > objects? > > If you are **really** concerned about performance, I suggest you have > your own protocol that both sides understand. > This way you send data as it is, the remote side would know how to > interpret it. > > > > On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan wrote: > >> I've been playing with MessagePack (http://msgpack.org/) for >> serialization and BLOSC (http://blosc.pytables.org/trac) for >> compression. They seem to work pretty well together. How fast is fast? >> BLOSC is designed to move data around in memory faster than memcpy() is >> able to do it, and I haven't had any complaints about how fast MessagePack >> works (OTOH, I'm I/O bound, so I tend not to hit any limits). >> >> Thanks, >> Cem Karan >> >> On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote: >> >> > Hello, all, >> > >> > I'd like to use ZMQ to send complex objects between applications (using >> > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, >> > I am forced to implement some serialization-deserialization mechanism. >> > >> > But the hole idea is to be as fast as possible! So it looks like this >> > algo should be: >> > 1. Extremely fast >> > 2. Produce very compact byte arrays >> > >> > Could you please suggest some best practices or libraries (.net), that >> > meets these requirements? >> > >> > How do you send complex ojects via ZMQ in real-life applications? >> > >> > Thank you in advance! >> > >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/0796f455/attachment.htm From n1555 at yahoo.fr Wed Jul 18 00:35:49 2012 From: n1555 at yahoo.fr (Eric) Date: Tue, 17 Jul 2012 23:35:49 +0100 (BST) Subject: [zeromq-dev] (no subject) Message-ID: <1342564549.52542.YahooMailClassic@web29503.mail.ird.yahoo.com> Trying to use jzmq under android.I generated using zmq3.x procedure, having to change config.sub and config.guess files but generation is OK and match the scheme on?http://www.zeromq.org/build:android. But I always get unsatisfiedlink error when loading library libjzmq (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. I've seen other people asking the same question without answer. Searching for hours over the net, no idea, any help would be appreciated! Best regards.Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/2c623e94/attachment.htm From victor at iso3103.net Wed Jul 18 00:48:13 2012 From: victor at iso3103.net (Victor Perron) Date: Wed, 18 Jul 2012 00:48:13 +0200 Subject: [zeromq-dev] (no subject) In-Reply-To: <1342564549.52542.YahooMailClassic@web29503.mail.ird.yahoo.com> References: <1342564549.52542.YahooMailClassic@web29503.mail.ird.yahoo.com> Message-ID: Same answer as before. I paste it down there. *Hi, In that case it seems that you discovered something serious. I took a look at it, and indeed the assign() symbol from std::string class seems undefined. That would mean, Android does _not_ define such a function in its SDK. Now, the proper way to get around this is a patch to Zeromq 3.x.* * You'll have to fix those lines (my guess): ./src/ipc_listener.cpp:151: filename.assign(addr_); ./src/socket_base.cpp:331: * * options.last_endpoint.assign (addr_); ./src/socket_base.cpp:480: ** options.last_endpoint.assign (addr_); ./src/tcp_address.cpp:503: ** addr_str.assign (name_, delimiter - name_); ./src/tcp_address.cpp:504: ** mask_str.assign (delimiter + 1); ./src/tcp_address.cpp:511: ** addr_str.assign (name_); ... and try to compile again. If there are no other undefined symbols, that should work. That issue did not exist in ZeroMQ 2.2 though, that one didn't make an extensive use of std::string. Keep me updated, we'll see for a pull request when I'll be less busy ;)* * Best regards,* * *I'll take a look for an acceptable patch tomorrow, if nobody shows up with a better suspect/solution of course ! On Wed, Jul 18, 2012 at 12:35 AM, Eric wrote: > Trying to use jzmq under android. > I generated using zmq3.x procedure, having to change config.sub and > config.guess files but generation is OK and match the scheme on > http://www.zeromq.org/build:android. > > But I always get unsatisfiedlink error when loading library libjzmq > (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. > I've seen other people asking the same question without answer. Searching > for hours over the net, no idea, any help would be appreciated! > > Best regards. > Eric > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/abeaefd2/attachment.htm From ronaldbelliott at gmail.com Wed Jul 18 00:53:52 2012 From: ronaldbelliott at gmail.com (Ron Elliott) Date: Tue, 17 Jul 2012 15:53:52 -0700 Subject: [zeromq-dev] (no subject) In-Reply-To: References: <1342564549.52542.YahooMailClassic@web29503.mail.ird.yahoo.com> Message-ID: perhaps this is an option: http://www.crystax.net/en/android/ndk/7 On Jul 17, 2012 3:48 PM, "Victor Perron" wrote: > Same answer as before. I paste it down there. > > *Hi, > > In that case it seems that you discovered something serious. > I took a look at it, and indeed the assign() symbol from std::string class > seems undefined. > That would mean, Android does _not_ define such a function in its SDK. > > Now, the proper way to get around this is a patch to Zeromq 3.x.* * > You'll have to fix those lines (my guess): > > ./src/ipc_listener.cpp:151: filename.assign(addr_); > ./src/socket_base.cpp:331: * > * options.last_endpoint.assign (addr_); > ./src/socket_base.cpp:480: ** options.last_endpoint.assign (addr_); > ./src/tcp_address.cpp:503: ** addr_str.assign (name_, delimiter - > name_); > ./src/tcp_address.cpp:504: ** mask_str.assign (delimiter + 1); > ./src/tcp_address.cpp:511: ** addr_str.assign (name_); > > ... and try to compile again. If there are no other undefined symbols, > that should work. > That issue did not exist in ZeroMQ 2.2 though, that one didn't make an > extensive use of std::string. > > Keep me updated, we'll see for a pull request when I'll be less busy ;)* * > > Best regards,* > * > > *I'll take a look for an acceptable patch tomorrow, if nobody shows up > with a better suspect/solution of course ! > On Wed, Jul 18, 2012 at 12:35 AM, Eric wrote: > >> Trying to use jzmq under android. >> I generated using zmq3.x procedure, having to change config.sub and >> config.guess files but generation is OK and match the scheme on >> http://www.zeromq.org/build:android. >> >> But I always get unsatisfiedlink error when loading library libjzmq >> (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. >> I've seen other people asking the same question without answer. Searching >> for hours over the net, no idea, any help would be appreciated! >> >> Best regards. >> Eric >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > > -- > Victor > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120717/e7e2f972/attachment.htm From akeahan at gbtradingllc.com Wed Jul 18 01:23:32 2012 From: akeahan at gbtradingllc.com (Alex Keahan) Date: Tue, 17 Jul 2012 19:23:32 -0400 Subject: [zeromq-dev] syncpub/syncsub example losing messages (ZMQ 3.2.0-rc1, Solaris 11) Message-ID: ZMQ 3.2.0-rc1 was built with the latest Sun Studio C/C++ compilers, with CFLAGS and CXXFLAGS=-fast -library=stlport4. $ uname -a SunOS xxxxxx 5.11 11.0 i86pc i386 i86pc $ CC -V CC: Sun C++ 5.12 SunOS_i386 2011/11/16 $ cc -V cc: Sun C 5.12 SunOS_i386 2011/11/16 The syncpub/syncsub example from the guide was adapted to 3.2.0 (see the code below). The original version of syncsub would simply get stuck in zmq_recv(). I added extra code to detect sequence gaps and break out of the loop whenever there's a discrepancy; now all syncsubs print "received N updates" where N is somewhat random. Slowing down the producer fixes the problem. Zmq reports no errors at any point. As a side note, whenever there is a sequence gap, the next sequence number received by syncsub appears to come from the start of the next send() buffer sent by syncpub (confirmed by 'truss syncpub') Any suggestions? Alex Keahan Run as follows: $ ./syncpub & $ ./syncsub A & $ ./syncsub B & You should see something similar to this: $ ./syncpub & [1] 6611 $ Waiting for subscribers $ ./syncsub A & [2] 6612 $ ./syncsub B & [3] 6613 $ Broadcasting messages Message mismatch: received 'Msg #1266' expected 'Msg #1001' A: received 1000 updates Message mismatch: received 'Msg #1266' expected 'Msg #1001' B: received 1000 updates [2]- Done ./syncsub A [3]+ Done ./syncsub B syncpub.c: #include #include #include #include // Wait for 2 subscribers #define SUBSCRIBERS_EXPECTED 2 int main(int argc, char *argv[]) { void *context = zmq_ctx_new(); if (context == 0) { fprintf(stderr, "Error: zmq_ctx_new failed: %s\n", zmq_strerror(errno)); return 1; } int rc = zmq_ctx_set(context, ZMQ_IO_THREADS, 1); if (rc != 0) { fprintf(stderr, "Error: zmq_ctx_set failed: %s\n", zmq_strerror(errno)); return 2; } // Socket to talk to clients void *publisher = zmq_socket(context, ZMQ_PUB); if (publisher == 0) { fprintf(stderr, "Error: zmq_socket(ZMQ_PUB) failed: %s\n", zmq_strerror(errno)); return 4; } rc = zmq_bind (publisher, "tcp://*:5561"); if (rc != 0) { fprintf(stderr, "Error: zmq_bind failed: %s\n", zmq_strerror(errno)); return 5; } // Socket to receive signals void *syncservice = zmq_socket (context, ZMQ_REP); if (syncservice == 0) { fprintf(stderr, "Error: zmq_socket(ZMQ_REP) failed: %s\n", zmq_strerror(errno)); return 6; } rc = zmq_bind (syncservice, "tcp://*:5562"); if (rc != 0) { fprintf(stderr, "Error: zmq_bind failed: %s\n", zmq_strerror(errno)); return 7; } // Get synchronization from subscribers printf ("Waiting for subscribers\n"); int subscribers = 0; while (subscribers < SUBSCRIBERS_EXPECTED) { char tmp[24]; // - wait for synchronization request int size = zmq_recv(syncservice, tmp, sizeof(tmp), 0); if (size < 0) { fprintf(stderr, "Error: zmq_recv failed: %s\n", zmq_strerror(errno)); return 8; } // - send synchronization reply rc = zmq_send(syncservice, "", 0, 0); if (rc < 0) { fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno)); return 9; } subscribers++; } // Now broadcast exactly 100,000 updates followed by END printf ("Broadcasting messages\n"); int update_nbr; for (update_nbr = 0; update_nbr < 100000; update_nbr++) { char buf[24]; int len; sprintf(buf, "Msg #%d", update_nbr+1); len = strlen(buf); int size = zmq_send(publisher, buf, len, 0); if (size != len) { if (errno == EAGAIN) { update_nbr--; continue; } fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno)); return 10; } } int size = zmq_send(publisher, "END", 3, 0); if (size != 3) { fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno)); return 11; } sleep(10); zmq_close(publisher); zmq_close(syncservice); zmq_term (context); return 0; } syncsub.c: #include #include #include #include int main(int argc, char *argv[]) { const char *prefix = (argc > 1 ? argv[1] : ""); void *context = zmq_ctx_new(); if (context == 0) { fprintf(stderr, "Error: zmq_ctx_new failed: %s\n", zmq_strerror(errno)); return 1; } int rc = zmq_ctx_set(context, ZMQ_IO_THREADS, 1); if (rc != 0) { fprintf(stderr, "Error: zmq_ctx_set failed: %s\n", zmq_strerror(errno)); return 2; } // First, connect our subscriber socket void *subscriber = zmq_socket(context, ZMQ_SUB); if (subscriber == 0) { fprintf(stderr, "Error: zmq_socket(ZMQ_SUB) failed: %s\n", zmq_strerror(errno)); return 4; } rc = zmq_connect(subscriber, "tcp://localhost:5561"); if (rc != 0) { fprintf(stderr, "Error: zmq_connect failed: %s\n", zmq_strerror(errno)); return 5; } rc = zmq_setsockopt (subscriber, ZMQ_SUBSCRIBE, "", 0); if (rc != 0) { fprintf(stderr, "Error: zmq_setsockopt failed: %s\n", zmq_strerror(errno)); return 6; } // 0MQ is so fast, we need to wait a while?? sleep (1); // Second, synchronize with publisher void *syncclient = zmq_socket (context, ZMQ_REQ); if (syncclient == 0) { fprintf(stderr, "Error: zmq_socket(ZMQ_REQ) failed: %s\n", zmq_strerror(errno)); return 7; } rc = zmq_connect (syncclient, "tcp://localhost:5562"); if (rc != 0) { fprintf(stderr, "Error: zmq_connect failed: %s\n", zmq_strerror(errno)); return 8; } // - send a synchronization request rc = zmq_send(syncclient, "", 0, 0); if (rc < 0) { fprintf(stderr, "Error: zmq_send failed: %s\n", zmq_strerror(errno)); return 9; } // - wait for synchronization reply char buf[24]; int size = zmq_recv(syncclient, buf, sizeof(buf), 0); if (size < 0) { fprintf(stderr, "Error: zmq_recv failed: %s\n", zmq_strerror(errno)); return 10; } // Third, get our updates and report how many we got int update_nbr = 0; while (1) { size = zmq_recv(subscriber, buf, sizeof(buf), 0); if (size < 0) { fprintf(stderr, "Error: zmq_recv failed: %s\n", zmq_strerror(errno)); return 11; } // Make sure the message numbers match char refbuf[24]; sprintf(refbuf, "Msg #%d", update_nbr+1); if (memcmp(buf, refbuf, strlen(refbuf)) != 0) { printf("Message mismatch: received '%*.*s' expected '%s'\n", size, size, buf, refbuf); break; } if (memcmp(buf, "END", 3) == 0) { break; } update_nbr++; } printf ("%s: received %d updates\n", prefix, update_nbr); zmq_close (subscriber); zmq_close (syncclient); zmq_term (context); return 0; } From n1555 at yahoo.fr Wed Jul 18 01:31:19 2012 From: n1555 at yahoo.fr (Eric) Date: Wed, 18 Jul 2012 00:31:19 +0100 (BST) Subject: [zeromq-dev] (no subject) In-Reply-To: Message-ID: <1342567879.22044.YahooMailClassic@web29502.mail.ird.yahoo.com> Thanks, I replaced assign by clear/append. But it still not works...something make me feel that I don't have any STD lib available :making a call to?arm-linux-androideabi-ld libjzmq.so give me this : /home/xxx/libjzmq.so: undefined reference to `std::basic_ios >::init(std::basic_streambuf >*)'/home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::string const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::compare(char const*) const'/home/xxx/libjzmq.so: undefined reference to `std::locale::locale()'/home/xxx/libjzmq.so: undefined reference to `__aeabi_uldivmod'/home/xxx/libjzmq.so: undefined reference to `std::string::find(char const*, unsigned int, unsigned int) const'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char const*)'/home/xxx/libjzmq.so: undefined reference to `std::__throw_bad_alloc()'/home/xxx/libjzmq.so: undefined reference to `std::string::assign(std::string const&)'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_stringstream, std::allocator >'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::~basic_string()'/home/xxx/libjzmq.so: undefined reference to `std::basic_stringstream, std::allocator >::~basic_stringstream()'/home/xxx/libjzmq.so: undefined reference to `std::__throw_length_error(char const*)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'/home/xxx/libjzmq.so: undefined reference to `VTT for std::basic_stringstream, std::allocator >'/home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__atomic_add(int volatile*, int)'/home/xxx/libjzmq.so: undefined reference to `std::string::_Rep::_S_empty_rep_storage'/home/xxx/libjzmq.so: undefined reference to `std::ostream& std::ostream::_M_insert(unsigned long)'/home/xxx/libjzmq.so: undefined reference to `std::ostream::operator<<(int)'/home/xxx/libjzmq.so: undefined reference to `std::ios_base::ios_base()'/home/xxx/libjzmq.so: undefined reference to `std::string::_M_leak()'/home/xxx/libjzmq.so: undefined reference to `std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, int)'/home/xxx/libjzmq.so: undefined reference to `std::string::_M_mutate(unsigned int, unsigned int, unsigned int)'/home/xxx/libjzmq.so: undefined reference to `std::locale::~locale()'/home/xxx/libjzmq.so: undefined reference to `std::string::clear()'/home/xxx/libjzmq.so: undefined reference to `std::__throw_logic_error(char const*)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to `std::string::_M_leak_hard()'/home/xxx/libjzmq.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::string const&, unsigned int, unsigned int)'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_stringbuf, std::allocator >'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_streambuf >'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, unsigned int, std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::ios_base::~ios_base()'/home/xxx/libjzmq.so: undefined reference to `__aeabi_uidivmod'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_ios >'/home/xxx/libjzmq.so: undefined reference to `std::basic_istream >::~basic_istream()'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: undefined reference to `operator delete(void*, std::nothrow_t const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::__throw_out_of_range(char const*)'/home/xxx/libjzmq.so: undefined reference to `operator new(unsigned int, std::nothrow_t const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::_Rep::_M_destroy(std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char const*, unsigned int)' I'll have a look to what is going on with my configuration. Best regards. Eric --- En date de?: Mer 18.7.12, Ron Elliott a ?crit?: De: Ron Elliott Objet: Re: [zeromq-dev] (no subject) ?: "ZeroMQ development list" , victor at iso3103.net Date: Mercredi 18 juillet 2012, 0h53 perhaps this is an option: http://www.crystax.net/en/android/ndk/7 On Jul 17, 2012 3:48 PM, "Victor Perron" wrote: Same answer as before. I paste it down there. Hi, In that case it seems that you discovered something serious. I took a look at it, and indeed the assign() symbol from std::string class seems undefined. That would mean, Android does _not_ define such a function in its SDK. Now, the proper way to get around this is a patch to Zeromq 3.x. You'll have to fix those lines (my guess): ./src/ipc_listener.cpp:151:??? filename.assign(addr_); ./src/socket_base.cpp:331:??????????? options.last_endpoint.assign (addr_); ./src/socket_base.cpp:480:??????? options.last_endpoint.assign (addr_); ./src/tcp_address.cpp:503:??????? addr_str.assign (name_, delimiter - name_); ./src/tcp_address.cpp:504:??????? mask_str.assign (delimiter + 1); ./src/tcp_address.cpp:511:??????? addr_str.assign (name_); ... and try to compile again. If there are no other undefined symbols, that should work. That issue did not exist in ZeroMQ 2.2 though, that one didn't make an extensive use of std::string. Keep me updated, we'll see for a pull request when I'll be less busy ;) Best regards, I'll take a look for an acceptable patch tomorrow, if nobody shows up with a better suspect/solution of course ! On Wed, Jul 18, 2012 at 12:35 AM, Eric wrote: Trying to use jzmq under android. I generated using zmq3.x procedure, having to change config.sub and config.guess files but generation is OK and match the scheme on?http://www.zeromq.org/build:android. But I always get unsatisfiedlink error when loading library libjzmq (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. I've seen other people asking the same question without answer. Searching for hours over the net, no idea, any help would be appreciated! Best regards. Eric _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Victor _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -----La pi?ce jointe associ?e suit----- _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/b4f6321e/attachment.htm From n1555 at yahoo.fr Wed Jul 18 02:08:23 2012 From: n1555 at yahoo.fr (Eric) Date: Wed, 18 Jul 2012 01:08:23 +0100 (BST) Subject: [zeromq-dev] (no subject) Message-ID: <1342570103.77764.YahooMailClassic@web29504.mail.ird.yahoo.com> I regenerated with?http://www.crystax.net/en/android/ndk/7, now,?arm-linux-androideabi-ld libjzmq.so?doesn't return any link problem (anymore) with Lib STD : Great! But still same problem in the android application : loadlibrary works with zmq and still fails (unsatisfies link error) with jzmq. Don't understand! Best regards. --- En date de?: Mer 18.7.12, Eric a ?crit?: De: Eric Objet: Re: [zeromq-dev] (no subject) ?: "ZeroMQ development list" , victor at iso3103.net Date: Mercredi 18 juillet 2012, 1h31 Thanks, I replaced assign by clear/append. But it still not works...something make me feel that I don't have any STD lib available :making a call to?arm-linux-androideabi-ld libjzmq.so give me this : /home/xxx/libjzmq.so: undefined reference to `std::basic_ios >::init(std::basic_streambuf >*)'/home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::string const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::compare(char const*) const'/home/xxx/libjzmq.so: undefined reference to `std::locale::locale()'/home/xxx/libjzmq.so: undefined reference to `__aeabi_uldivmod'/home/xxx/libjzmq.so: undefined reference to `std::string::find(char const*, unsigned int, unsigned int) const'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char const*)'/home/xxx/libjzmq.so: undefined reference to `std::__throw_bad_alloc()'/home/xxx/libjzmq.so: undefined reference to `std::string::assign(std::string const&)'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_stringstream, std::allocator >'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::~basic_string()'/home/xxx/libjzmq.so: undefined reference to `std::basic_stringstream, std::allocator >::~basic_stringstream()'/home/xxx/libjzmq.so: undefined reference to `std::__throw_length_error(char const*)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'/home/xxx/libjzmq.so: undefined reference to `VTT for std::basic_stringstream, std::allocator >'/home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__atomic_add(int volatile*, int)'/home/xxx/libjzmq.so: undefined reference to `std::string::_Rep::_S_empty_rep_storage'/home/xxx/libjzmq.so: undefined reference to `std::ostream& std::ostream::_M_insert(unsigned long)'/home/xxx/libjzmq.so: undefined reference to `std::ostream::operator<<(int)'/home/xxx/libjzmq.so: undefined reference to `std::ios_base::ios_base()'/home/xxx/libjzmq.so: undefined reference to `std::string::_M_leak()'/home/xxx/libjzmq.so: undefined reference to `std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, int)'/home/xxx/libjzmq.so: undefined reference to `std::string::_M_mutate(unsigned int, unsigned int, unsigned int)'/home/xxx/libjzmq.so: undefined reference to `std::locale::~locale()'/home/xxx/libjzmq.so: undefined reference to `std::string::clear()'/home/xxx/libjzmq.so: undefined reference to `std::__throw_logic_error(char const*)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'/home/xxx/libjzmq.so: undefined reference to `std::string::_M_leak_hard()'/home/xxx/libjzmq.so: undefined reference to `vtable for __cxxabiv1::__vmi_class_type_info'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(std::string const&, unsigned int, unsigned int)'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_stringbuf, std::allocator >'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_streambuf >'/home/xxx/libjzmq.so: undefined reference to `std::basic_string, std::allocator >::basic_string(char const*, unsigned int, std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::ios_base::~ios_base()'/home/xxx/libjzmq.so: undefined reference to `__aeabi_uidivmod'/home/xxx/libjzmq.so: undefined reference to `vtable for std::basic_ios >'/home/xxx/libjzmq.so: undefined reference to `std::basic_istream >::~basic_istream()'/home/xxx/libjzmq.so: undefined reference to `std::_Rb_tree_increment(std::_Rb_tree_node_base*)'/home/xxx/libjzmq.so: undefined reference to `operator delete(void*, std::nothrow_t const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::_Rep::_S_create(unsigned int, unsigned int, std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::__throw_out_of_range(char const*)'/home/xxx/libjzmq.so: undefined reference to `operator new(unsigned int, std::nothrow_t const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::_Rep::_M_destroy(std::allocator const&)'/home/xxx/libjzmq.so: undefined reference to `std::string::append(char const*, unsigned int)' I'll have a look to what is going on with my configuration. Best regards. Eric --- En date de?: Mer 18.7.12, Ron Elliott a ?crit?: De: Ron Elliott Objet: Re: [zeromq-dev] (no subject) ?: "ZeroMQ development list" , victor at iso3103.net Date: Mercredi 18 juillet 2012, 0h53 perhaps this is an option: http://www.crystax.net/en/android/ndk/7 On Jul 17, 2012 3:48 PM, "Victor Perron" wrote: Same answer as before. I paste it down there. Hi, In that case it seems that you discovered something serious. I took a look at it, and indeed the assign() symbol from std::string class seems undefined. That would mean, Android does _not_ define such a function in its SDK. Now, the proper way to get around this is a patch to Zeromq 3.x. You'll have to fix those lines (my guess): ./src/ipc_listener.cpp:151:??? filename.assign(addr_); ./src/socket_base.cpp:331:??????????? options.last_endpoint.assign (addr_); ./src/socket_base.cpp:480:??????? options.last_endpoint.assign (addr_); ./src/tcp_address.cpp:503:??????? addr_str.assign (name_, delimiter - name_); ./src/tcp_address.cpp:504:??????? mask_str.assign (delimiter + 1); ./src/tcp_address.cpp:511:??????? addr_str.assign (name_); ... and try to compile again. If there are no other undefined symbols, that should work. That issue did not exist in ZeroMQ 2.2 though, that one didn't make an extensive use of std::string. Keep me updated, we'll see for a pull request when I'll be less busy ;) Best regards, I'll take a look for an acceptable patch tomorrow, if nobody shows up with a better suspect/solution of course ! On Wed, Jul 18, 2012 at 12:35 AM, Eric wrote: Trying to use jzmq under android. I generated using zmq3.x procedure, having to change config.sub and config.guess files but generation is OK and match the scheme on?http://www.zeromq.org/build:android. But I always get unsatisfiedlink error when loading library libjzmq (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. I've seen other people asking the same question without answer. Searching for hours over the net, no idea, any help would be appreciated! Best regards. Eric _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -- Victor _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -----La pi?ce jointe associ?e suit----- _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -----La pi?ce jointe associ?e suit----- _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/9e4a2648/attachment.htm From susantharakan83 at gmail.com Wed Jul 18 09:10:09 2012 From: susantharakan83 at gmail.com (Susan Tharakan) Date: Wed, 18 Jul 2012 12:40:09 +0530 Subject: [zeromq-dev] Zeromq 3.2 pub sub in a large production environment Message-ID: Hi, I am planning to use zeromq 3.2 pub sub in our production systems and wanted to check with the community. How stable is zeromq 3.2 for production use? Has anybody used it in production systems for pub sub model. For our application the following two requirements are critical 1. Minimize latency 2. Avoid data loss Currently I'm using a slightly modified version of zeromq 2.0.8 in production for a 400 machine cluster with reasonable success. The major issue we've had with zeromq 2.x are 1. High bandwidth utilization during high traffic scenarios because of the lack of subscriber filtering, possibly resulting in buffer over runs at producer and drops[data loss]. 2. Loosing messages when the subscribers cant keep pace with the producers. Using the SWAP option in zeromq 2.0 has saved the day in some specific scenarios as it provided some cushion with spurty traffic. With zeromq 3.x the SWAP option seems to be discontinued, which is a big concern for our usecase, but I'm guessing the buffered queue lengths will also go down as only required msgs are kept in queue now. Any work arounds for this problem? The other important requirement we have is to be able to monitor what's happening inside of zeromq. We'd done it by writing one of our custom apis for 2.0 which provided some insight into how much data was buffered at each end. How easy is it to do this for zeromq 3.x / any plans for it in the zmq roadmap? Thanks for your time Susan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/d805d621/attachment.htm From mimir at newmail.ru Wed Jul 18 09:49:08 2012 From: mimir at newmail.ru (moteus) Date: Wed, 18 Jul 2012 07:49:08 +0000 (UTC) Subject: [zeromq-dev] Socket use from several threads References: <75FBA2FE-975A-4949-A1A3-86251B2E8AB2@chuckremes.com> <22DB4BFF-7566-4C54-B0A3-E7F0DDC54AA8@chuckremes.com> Message-ID: Chuck Remes chuckremes.com> writes: > Oh, so the threads are short-lived then. In that case, you should create a pool of them and have each thread > "check out" the socket from the pool when it needs to use it and check it back in again when the thread exits. > If the pool is protected by a mechanism (like a mutex) that employs a full memory barrier, then it will be safe. Thanks. And one more question. Can I start recv in one thread but get result in other? For example. I use DEALER socket instead REQ and get timeout on recive. I put socket back to pool. Another thread get this socket from pool and send it's own request. This thread can recognize its response and ignore other responses. Or better just to recreate socket like described in guide? From victor at iso3103.net Wed Jul 18 09:55:42 2012 From: victor at iso3103.net (Victor Perron) Date: Wed, 18 Jul 2012 09:55:42 +0200 Subject: [zeromq-dev] (no subject) In-Reply-To: <1342567879.22044.YahooMailClassic@web29502.mail.ird.yahoo.com> References: <1342567879.22044.YahooMailClassic@web29502.mail.ird.yahoo.com> Message-ID: OK. The libstdc++ shared object from the NDK defines very few symbols, around twenty, mostly for what google claims to support: exceptions and such. In order to use the STL, one must use their "stlport" beta library which I believe is included since NDKr5. The shared object is present on my SGSIII, but I think that maybe it's better to statically include the needed symbols in libzmq to prevent future issues (and as long as it's in beta and that older devices mat use it) The other way to go would be to remove all those STL calls from libzmq (as 2.2 was doing) but... ;) Thing is, I'm afraid that those functions you reported not found are not even in Android's stlport. And I'm not happy yo use another, third-party C library. I'll update the wiki about this issue, and I think you should stick to zeromq2.2 before that; that one has been properly tested as working on Android. Regards, On Wed, Jul 18, 2012 at 1:31 AM, Eric wrote: > Thanks, > > I replaced assign by clear/append. But it still not works...something make > me feel that I don't have any STD lib available : > making a call to arm-linux-androideabi-ld libjzmq.so give me this : > > /home/xxx/libjzmq.so: undefined reference to `std::basic_ios std::char_traits >::init(std::basic_streambuf std::char_traits >*)' > /home/xxx/libjzmq.so: undefined reference to > `__gnu_cxx::__exchange_and_add(int volatile*, int)' > /home/xxx/libjzmq.so: undefined reference to > `std::_Rb_tree_decrement(std::_Rb_tree_node_base*)' > /home/xxx/libjzmq.so: undefined reference to `std::basic_string std::char_traits, std::allocator >::basic_string(std::string > const&)' > /home/xxx/libjzmq.so: undefined reference to `std::string::compare(char > const*) const' > /home/xxx/libjzmq.so: undefined reference to `std::locale::locale()' > /home/xxx/libjzmq.so: undefined reference to `__aeabi_uldivmod' > /home/xxx/libjzmq.so: undefined reference to `std::string::find(char > const*, unsigned int, unsigned int) const' > /home/xxx/libjzmq.so: undefined reference to `std::string::append(char > const*)' > /home/xxx/libjzmq.so: undefined reference to `std::__throw_bad_alloc()' > /home/xxx/libjzmq.so: undefined reference to > `std::string::assign(std::string const&)' > /home/xxx/libjzmq.so: undefined reference to `vtable for > std::basic_stringstream, std::allocator > >' > /home/xxx/libjzmq.so: undefined reference to `std::basic_string std::char_traits, std::allocator >::~basic_string()' > /home/xxx/libjzmq.so: undefined reference to > `std::basic_stringstream, std::allocator > >::~basic_stringstream()' > /home/xxx/libjzmq.so: undefined reference to > `std::__throw_length_error(char const*)' > /home/xxx/libjzmq.so: undefined reference to > `std::_Rb_tree_increment(std::_Rb_tree_node_base const*)' > /home/xxx/libjzmq.so: undefined reference to `VTT for > std::basic_stringstream, std::allocator > >' > /home/xxx/libjzmq.so: undefined reference to `__gnu_cxx::__atomic_add(int > volatile*, int)' > /home/xxx/libjzmq.so: undefined reference to > `std::string::_Rep::_S_empty_rep_storage' > /home/xxx/libjzmq.so: undefined reference to `std::ostream& > std::ostream::_M_insert(unsigned long)' > /home/xxx/libjzmq.so: undefined reference to > `std::ostream::operator<<(int)' > /home/xxx/libjzmq.so: undefined reference to `std::ios_base::ios_base()' > /home/xxx/libjzmq.so: undefined reference to `std::string::_M_leak()' > /home/xxx/libjzmq.so: undefined reference to `std::basic_ostream std::char_traits >& std::__ostream_insert std::char_traits >(std::basic_ostream > >&, char const*, int)' > /home/xxx/libjzmq.so: undefined reference to > `std::string::_M_mutate(unsigned int, unsigned int, unsigned int)' > /home/xxx/libjzmq.so: undefined reference to `std::locale::~locale()' > /home/xxx/libjzmq.so: undefined reference to `std::string::clear()' > /home/xxx/libjzmq.so: undefined reference to > `std::__throw_logic_error(char const*)' > /home/xxx/libjzmq.so: undefined reference to > `std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, > std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)' > /home/xxx/libjzmq.so: undefined reference to `std::basic_string std::char_traits, std::allocator >::basic_string(char const*, > std::allocator const&)' > /home/xxx/libjzmq.so: undefined reference to > `std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, > std::_Rb_tree_node_base&)' > /home/xxx/libjzmq.so: undefined reference to `std::string::_M_leak_hard()' > /home/xxx/libjzmq.so: undefined reference to `vtable for > __cxxabiv1::__vmi_class_type_info' > /home/xxx/libjzmq.so: undefined reference to `std::basic_string std::char_traits, std::allocator >::basic_string(std::string > const&, unsigned int, unsigned int)' > /home/xxx/libjzmq.so: undefined reference to `vtable for > std::basic_stringbuf, std::allocator >' > /home/xxx/libjzmq.so: undefined reference to `vtable for > std::basic_streambuf >' > /home/xxx/libjzmq.so: undefined reference to `std::basic_string std::char_traits, std::allocator >::basic_string(char const*, > unsigned int, std::allocator const&)' > /home/xxx/libjzmq.so: undefined reference to `std::ios_base::~ios_base()' > /home/xxx/libjzmq.so: undefined reference to `__aeabi_uidivmod' > /home/xxx/libjzmq.so: undefined reference to `vtable for > std::basic_ios >' > /home/xxx/libjzmq.so: undefined reference to `std::basic_istream std::char_traits >::~basic_istream()' > /home/xxx/libjzmq.so: undefined reference to > `std::_Rb_tree_increment(std::_Rb_tree_node_base*)' > /home/xxx/libjzmq.so: undefined reference to `operator delete(void*, > std::nothrow_t const&)' > /home/xxx/libjzmq.so: undefined reference to > `std::string::_Rep::_S_create(unsigned int, unsigned int, > std::allocator const&)' > /home/xxx/libjzmq.so: undefined reference to > `std::__throw_out_of_range(char const*)' > /home/xxx/libjzmq.so: undefined reference to `operator new(unsigned int, > std::nothrow_t const&)' > /home/xxx/libjzmq.so: undefined reference to > `std::string::_Rep::_M_destroy(std::allocator const&)' > /home/xxx/libjzmq.so: undefined reference to `std::string::append(char > const*, unsigned int)' > > I'll have a look to what is going on with my configuration. > > Best regards. > > Eric > > > --- En date de : *Mer 18.7.12, Ron Elliott * a > ?crit : > > > De: Ron Elliott > Objet: Re: [zeromq-dev] (no subject) > ?: "ZeroMQ development list" , > victor at iso3103.net > Date: Mercredi 18 juillet 2012, 0h53 > > > perhaps this is an option: http://www.crystax.net/en/android/ndk/7 > On Jul 17, 2012 3:48 PM, "Victor Perron" > > wrote: > > Same answer as before. I paste it down there. > > *Hi, > > In that case it seems that you discovered something serious. > I took a look at it, and indeed the assign() symbol from std::string class > seems undefined. > That would mean, Android does _not_ define such a function in its SDK. > > Now, the proper way to get around this is a patch to Zeromq 3.x.* * > You'll have to fix those lines (my guess): > > ./src/ipc_listener.cpp:151: filename.assign(addr_); > ./src/socket_base.cpp:331: * > * options.last_endpoint.assign (addr_); > ./src/socket_base.cpp:480: ** options.last_endpoint.assign (addr_); > ./src/tcp_address.cpp:503: ** addr_str.assign (name_, delimiter - > name_); > ./src/tcp_address.cpp:504: ** mask_str.assign (delimiter + 1); > ./src/tcp_address.cpp:511: ** addr_str.assign (name_); > > ... and try to compile again. If there are no other undefined symbols, > that should work. > That issue did not exist in ZeroMQ 2.2 though, that one didn't make an > extensive use of std::string. > > Keep me updated, we'll see for a pull request when I'll be less busy ;)* * > > Best regards,* > * > > *I'll take a look for an acceptable patch tomorrow, if nobody shows up > with a better suspect/solution of course ! > On Wed, Jul 18, 2012 at 12:35 AM, Eric > > wrote: > > Trying to use jzmq under android. > I generated using zmq3.x procedure, having to change config.sub and > config.guess files but generation is OK and match the scheme on > http://www.zeromq.org/build:android. > > But I always get unsatisfiedlink error when loading library libjzmq > (loadlibrary(jzmq)), whereas i'm able to load libzmq without any problem. > I've seen other people asking the same question without answer. Searching > for hours over the net, no idea, any help would be appreciated! > > Best regards. > Eric > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > -- > Victor > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > -----La pi?ce jointe associ?e suit----- > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/b271ab87/attachment.htm From lists at chuckremes.com Wed Jul 18 13:33:58 2012 From: lists at chuckremes.com (Chuck Remes) Date: Wed, 18 Jul 2012 06:33:58 -0500 Subject: [zeromq-dev] Socket use from several threads In-Reply-To: References: <75FBA2FE-975A-4949-A1A3-86251B2E8AB2@chuckremes.com> <22DB4BFF-7566-4C54-B0A3-E7F0DDC54AA8@chuckremes.com> Message-ID: <78BD0133-7EB5-4ACD-A6C4-CDAD1A4CB0B9@chuckremes.com> On Jul 18, 2012, at 2:49 AM, moteus wrote: > Chuck Remes chuckremes.com> writes: > > >> Oh, so the threads are short-lived then. In that case, you should create a > pool of them and have each thread >> "check out" the socket from the pool when it needs to use it and check it back > in again when the thread exits. >> If the pool is protected by a mechanism (like a mutex) that employs a full > memory barrier, then it will be safe. > > Thanks. > And one more question. > Can I start recv in one thread but get result in other? > For example. I use DEALER socket instead REQ and get timeout on recive. > I put socket back to pool. Another thread get this socket from pool and send > it's own request. This thread can recognize its response and ignore other > responses. > Or better just to recreate socket like described in guide? I don't know. Try it out and let us know how it works. cr From Sharon.Ben-Asher at avg.com Wed Jul 18 14:53:34 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Wed, 18 Jul 2012 12:53:34 +0000 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D64F1@ex10czdmb01> Hi, Well, after realizing its an issue with STL, I spent half the day on the net researching Android NDK and C++ STL. Indeed, the default implementation is "minimal" according to the docs. The issue is really an issue since we are using the Android NDK as standalone compiler. As a full build env, you can specify in the Application.mk (their version of makefile) that you want to use STL. They even support several versions of the library. So perhaps someone needs to repackage the whole directory tree into an Android project. I think I lack the knowledge of how to do it. However, I did find that the standalone toolchain does come with gunstl_shared lib. And I even managed to specify the proper argument to configure and to build new shared object files. However, now when I try to run the APK, I get an error about not finding libgnustl_shared.so. tried to put it together with libjzmq.so, but to no avail. I am running out of time with this experiment, they want to move to an all-java solution. So if time permits, I will try to build the 2.2 version. Sharon. -----Original Message----- From: Victor Perron Subject: Re: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14 To: ZeroMQ development list Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, In that case it seems that you discovered something serious. I took a look at it, and indeed the assign() symbol from std::string class seems undefined. That would mean, Android does _not_ define such a function in its SDK. Now, the proper way to get around this is a patch to Zeromq 3.x. You'll have to fix those lines (my guess): ./src/ipc_listener.cpp:151: filename.assign(addr_); ./src/socket_base.cpp:331: options.last_endpoint.assign (addr_); ./src/socket_base.cpp:480: options.last_endpoint.assign (addr_); ./src/tcp_address.cpp:503: addr_str.assign (name_, delimiter - name_); ./src/tcp_address.cpp:504: mask_str.assign (delimiter + 1); ./src/tcp_address.cpp:511: addr_str.assign (name_); ... and try to compile again. If there are no other undefined symbols, that should work. That issue did not exist in ZeroMQ 2.2 though, that one didn't make an extensive use of std::string. Keep me updated, we'll see for a pull request when I'll be less busy ;) Best regards, From Sharon.Ben-Asher at avg.com Wed Jul 18 14:55:00 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Wed, 18 Jul 2012 12:55:00 +0000 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D6502@ex10czdmb01> Forget to mention that I didn't know what you meant by "fix those lines" How do I fix them? -----Original Message----- From: Victor Perron Subject: Re: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14 To: ZeroMQ development list Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi, In that case it seems that you discovered something serious. I took a look at it, and indeed the assign() symbol from std::string class seems undefined. That would mean, Android does _not_ define such a function in its SDK. Now, the proper way to get around this is a patch to Zeromq 3.x. You'll have to fix those lines (my guess): ./src/ipc_listener.cpp:151: filename.assign(addr_); ./src/socket_base.cpp:331: options.last_endpoint.assign (addr_); ./src/socket_base.cpp:480: options.last_endpoint.assign (addr_); ./src/tcp_address.cpp:503: addr_str.assign (name_, delimiter - name_); ./src/tcp_address.cpp:504: mask_str.assign (delimiter + 1); ./src/tcp_address.cpp:511: addr_str.assign (name_); ... and try to compile again. If there are no other undefined symbols, that should work. That issue did not exist in ZeroMQ 2.2 though, that one didn't make an extensive use of std::string. Keep me updated, we'll see for a pull request when I'll be less busy ;) Best regards, From victor at iso3103.net Wed Jul 18 15:12:43 2012 From: victor at iso3103.net (Victor Perron) Date: Wed, 18 Jul 2012 15:12:43 +0200 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B384D6502@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B384D6502@ex10czdmb01> Message-ID: I thought, not use 'assign'. But the issue has been reported and discussed in the Zeromq dev list. I changed the Wiki today; you should stick to 2.2 for now, because a proper fix is out of quick reach with 3.x . It's either a lot of changes in the instructions in order to make zeromq use stlport library, or get rid of the STL functions almost entirely. Even using the STL has very little chances to succeed and will need heavy patches to zeromq, would it only be for the headers inclusion; but I'm also unsure that everything zeromq uses is defined by stlport. Moreover, stlport is beta, so it's quite dangerous to rely on it. I'd appreciate if somebody really involved into libzmq 3.x core could comment about this... On Wed, Jul 18, 2012 at 2:55 PM, Sharon Ben-Asher wrote: > Forget to mention that I didn't know what you meant by "fix those lines" > How do I fix them? > > -----Original Message----- > From: Victor Perron > Subject: Re: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 14 > To: ZeroMQ development list > Message-ID: > < > CAF9FejHK-9LOrwhHMrinkeaiq5AkwAcxijVV9K6X45j5d__EaQ at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > In that case it seems that you discovered something serious. > I took a look at it, and indeed the assign() symbol from std::string class > seems undefined. > That would mean, Android does _not_ define such a function in its SDK. > > Now, the proper way to get around this is a patch to Zeromq 3.x. > You'll have to fix those lines (my guess): > > ./src/ipc_listener.cpp:151: filename.assign(addr_); > ./src/socket_base.cpp:331: options.last_endpoint.assign (addr_); > ./src/socket_base.cpp:480: options.last_endpoint.assign (addr_); > ./src/tcp_address.cpp:503: addr_str.assign (name_, delimiter - > name_); > ./src/tcp_address.cpp:504: mask_str.assign (delimiter + 1); > ./src/tcp_address.cpp:511: addr_str.assign (name_); > > ... and try to compile again. If there are no other undefined symbols, > that should work. > That issue did not exist in ZeroMQ 2.2 though, that one didn't make an > extensive use of std::string. > > Keep me updated, we'll see for a pull request when I'll be less busy ;) > > Best regards, > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/c89d1cf3/attachment.htm From Andrzej.Dworak at cern.ch Wed Jul 18 16:12:20 2012 From: Andrzej.Dworak at cern.ch (Andrzej Dworak) Date: Wed, 18 Jul 2012 14:12:20 +0000 Subject: [zeromq-dev] what are the best practices to send complex objects? In-Reply-To: References: <5005164F.9030603@mail.ru> <94236CF4-F8CF-492A-AD4C-1A3653FC107B@gmail.com> <7D80327D0646EC4794FBAE34D053E8667985866D@PLOXCHG03.cern.ch> Message-ID: <7D80327D0646EC4794FBAE34D053E866798587C9@PLOXCHG03.cern.ch> Hi Ron, Sure, but, as I said before - I liked both, and both are great. I liked them far more than anything else. So, I don't claim one is better than another. What, in my case, made me chose MP over PB in the end is: 1. I need to send bool, int8,16,32,64, float, double, string, and arrays of these (various lengths from 10 up to even a few millions) 2. I need to encode types of the data sent in each message. 3. I've prototyped simple tests for ser/deser in the way it will be used using both libs 4. Running the tests on supported platforms, on average, MP was 2x faster than PB Probably, in a normal situation (without extra encoding of the types) PB would do closer to MP. MP is pretty stable and it gains in popularity but AFAIK there are no big players behind. PB is supported and used by Google, so not much worries about stability there :) Cheers, Andrzej From: zeromq-dev-bounces at lists.zeromq.org [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Ron Elliott Sent: 17 July 2012 23:23 To: ZeroMQ development list Subject: Re: [zeromq-dev] what are the best practices to send complex objects? I'm not the OP however would it be possible for you to explain why you chose MessagePack over ProtoBufs? I currently use ProtoBufs myself and don't have any issues with it however I think this would be interesting to know On Jul 17, 2012 2:18 PM, "Andrzej Dworak" > wrote: Hi, I did some extensive testing of serialization libraries (tested C++ and Java implementations) more or less 3 months ago. Two products that I liked the most were MessagePack and Google Protocol Buffers. For my case, where I need to have self-describing serialization, I've chosen MessagePack. The requirements were quite high as this is going to be used by one of a core systems at CERN to operate LHC and other accelerators. So far no problems with MP, it's a great product, well, the same as ZeroMQ :) Cheers, Andrzej ________________________________ From: zeromq-dev-bounces at lists.zeromq.org [zeromq-dev-bounces at lists.zeromq.org] on behalf of aalok sood [aalok at ideadevice.com] Sent: 17 July 2012 12:01 To: ZeroMQ development list Subject: Re: [zeromq-dev] what are the best practices to send complex objects? If you are **really** concerned about performance, I suggest you have your own protocol that both sides understand. This way you send data as it is, the remote side would know how to interpret it. On Tue, Jul 17, 2012 at 3:27 PM, Cem Karan > wrote: I've been playing with MessagePack (http://msgpack.org/) for serialization and BLOSC (http://blosc.pytables.org/trac) for compression. They seem to work pretty well together. How fast is fast? BLOSC is designed to move data around in memory faster than memcpy() is able to do it, and I haven't had any complaints about how fast MessagePack works (OTOH, I'm I/O bound, so I tend not to hit any limits). Thanks, Cem Karan On Jul 17, 2012, at 3:37 AM, anti_tenzor wrote: > Hello, all, > > I'd like to use ZMQ to send complex objects between applications (using > CLRZMQ c# wrapper). Since it is possible to send byte[] arrays only, > I am forced to implement some serialization-deserialization mechanism. > > But the hole idea is to be as fast as possible! So it looks like this > algo should be: > 1. Extremely fast > 2. Produce very compact byte arrays > > Could you please suggest some best practices or libraries (.net), that > meets these requirements? > > How do you send complex ojects via ZMQ in real-life applications? > > Thank you in advance! > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/e3cb5141/attachment.htm From ian.barber at gmail.com Wed Jul 18 21:00:12 2012 From: ian.barber at gmail.com (Ian Barber) Date: Wed, 18 Jul 2012 20:00:12 +0100 Subject: [zeromq-dev] A query about implementing aborts in request reply broker In-Reply-To: References: Message-ID: On Mon, Jul 16, 2012 at 11:17 AM, aalok sood wrote: > 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. > > There is no easy way to do that - the idea with pub sub is that you generally want to send a message to everyone and no worry precisely about who the subscribers are. In your case, it might be better to have a REQ-REP model - clients make a REQ when they're ready to do some work, your server has a ROUTER and you track the ids, and you send out a message to each one when you have something to do, then you can track the state internally. If you wanted to keep the pub/pull model, you could have a worker send a message to the pull saying that they are starting some work, and use that to track the number you expect. Of course, you have to consider the possibility of worker failure - so if a worker starts a job then dies, what is you action going to be around that, both in the regular and cancellation cases. Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/78d690c1/attachment.htm From bh at udev.org Wed Jul 18 22:44:57 2012 From: bh at udev.org (Benjamin Henrion) Date: Wed, 18 Jul 2012 22:44:57 +0200 Subject: [zeromq-dev] 0mq at TheStangeLoop, 23-25 Sept 2012 Message-ID: 0mq at TheStangeLoop, 23-25 Sept 2012: https://thestrangeloop.com/sessions/software-architecture-using-zeromq -- Benjamin Henrion FFII Brussels - +32-484-566109 - +32-2-3500762 "In July 2005, after several failed attempts to legalise software patents in Europe, the patent establishment changed its strategy. Instead of explicitly seeking to sanction the patentability of software, they are now seeking to create a central European patent court, which would establish and enforce patentability rules in their favor, without any possibility of correction by competing courts or democratically elected legislators." From akeahan at gbtradingllc.com Wed Jul 18 22:49:32 2012 From: akeahan at gbtradingllc.com (Alex Keahan) Date: Wed, 18 Jul 2012 20:49:32 +0000 (UTC) Subject: [zeromq-dev] =?utf-8?q?syncpub/syncsub_example_losing_messages_?= =?utf-8?b?KFpNUSAzLjIuMC1yYzEsCVNvbGFyaXMgMTEp?= References: Message-ID: Alex Keahan gbtradingllc.com> writes: > $ ./syncpub & > [1] 6611 > $ Waiting for subscribers > > $ ./syncsub A & > [2] 6612 > $ ./syncsub B & > [3] 6613 > $ Broadcasting messages > Message mismatch: received 'Msg #1266' expected 'Msg #1001' > A: received 1000 updates > Message mismatch: received 'Msg #1266' expected 'Msg #1001' > B: received 1000 updates > Whoops. The high water mark for outbound messages was changed from 0 (no limit) in 2.2 to 1000 in 3.2. Not a bug, please disregard. From Sharon.Ben-Asher at avg.com Thu Jul 19 08:53:17 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Thu, 19 Jul 2012 06:53:17 +0000 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D6585@ex10czdmb01> Hi, Today, I tried to work with v2.2.0: followed the instructions as close as I can, the build was successful, as far as I could see. However, when running in the device, encountered this problem: Cannot load library: reloc_library[1289]: 157 cannot locate '_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E'... Thanks, Sharon. From bluerocketdelivery at gmail.com Wed Jul 18 23:31:29 2012 From: bluerocketdelivery at gmail.com (Ron Elliott) Date: Wed, 18 Jul 2012 14:31:29 -0700 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: References: Message-ID: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> Does version 3.x use the same version of openpgm that compiles on mac? Looks like it's now just easier to upgrade if this issue doesn't exist in v3. Thanks for your response On Jul 17, 2012, at 12:27 PM, Steven McCoy wrote: > On 17 July 2012 02:22, Ron Elliott wrote: > Using the downloaded stable version 2.2 code I cannot get ZMQ to compile with the --with-pgm option. The project is too far along to make the switch to v3 so that's not an option atm. Any other solutions or is ZMQ dead for me? > > > It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to verify fixing the issue upstream in OpenPGM. > > -- > Steve-o > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120718/d25ef56c/attachment.htm From victor at iso3103.net Thu Jul 19 10:03:55 2012 From: victor at iso3103.net (Victor Perron) Date: Thu, 19 Jul 2012 10:03:55 +0200 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK In-Reply-To: <671E27F33F2F25499F78A4AFA494E63B384D6585@ex10czdmb01> References: <671E27F33F2F25499F78A4AFA494E63B384D6585@ex10czdmb01> Message-ID: This is awkward. O have been able to run it successfully on mine. I'll definitely take a look. On Thu, Jul 19, 2012 at 8:53 AM, Sharon Ben-Asher wrote: > Hi, > > Today, I tried to work with v2.2.0: > followed the instructions as close as I can, the build was successful, as > far as I could see. > However, when running in the device, encountered this problem: > Cannot load library: reloc_library[1289]: 157 cannot locate > '_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E'... > > Thanks, > Sharon. > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120719/5dbb5b2d/attachment.htm From victor at iso3103.net Thu Jul 19 12:31:33 2012 From: victor at iso3103.net (Victor Perron) Date: Thu, 19 Jul 2012 12:31:33 +0200 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK In-Reply-To: References: <671E27F33F2F25499F78A4AFA494E63B384D6585@ex10czdmb01> Message-ID: Hello, I found the issue. I mismatched a few command line switches when writing the wiki page; I suspect I got confused with all the configuration tweaks ! I'll update the wiki properly in the day, as soon as I tested a few more things. It may also help for libzmq 3.x, though that's not for sure. I uploaded a compiled version of the library (zeromq2.2 + jzmq master) on a file hosting service, could you report if it works ? Link : http://www9.zippyshare.com/v/83273893/file.html Just has been tested on a SGSIII, communicates with a PC via TCP transport (with proper android.permission.INTERNET) On Thu, Jul 19, 2012 at 10:03 AM, Victor Perron wrote: > This is awkward. O have been able to run it successfully on mine. I'll > definitely take a look. > > > On Thu, Jul 19, 2012 at 8:53 AM, Sharon Ben-Asher < > Sharon.Ben-Asher at avg.com> wrote: > >> Hi, >> >> Today, I tried to work with v2.2.0: >> followed the instructions as close as I can, the build was successful, as >> far as I could see. >> However, when running in the device, encountered this problem: >> Cannot load library: reloc_library[1289]: 157 cannot locate >> '_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E'... >> >> Thanks, >> Sharon. >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > > > -- > Victor > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120719/64e54a8c/attachment.htm From steven.mccoy at miru.hk Thu Jul 19 15:12:14 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Thu, 19 Jul 2012 09:12:14 -0400 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> References: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> Message-ID: Both are on the latest version, 5.1.118. The fixes for OS X are in trunk which is currently wearing the version number 5.2.119. -- Steve-o On 18 July 2012 17:31, Ron Elliott wrote: > Does version 3.x use the same version of openpgm that compiles on mac? > Looks like it's now just easier to upgrade if this issue doesn't exist in > v3. > > Thanks for your response > > On Jul 17, 2012, at 12:27 PM, Steven McCoy wrote: > > On 17 July 2012 02:22, Ron Elliott wrote: > >> Using the downloaded stable version 2.2 code I cannot get ZMQ to compile >> with the --with-pgm option. The project is too far along to make the switch >> to v3 so that's not an option atm. Any other solutions or is ZMQ dead for >> me? >> >> > It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to > verify fixing the issue upstream in OpenPGM. > > -- > Steve-o > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120719/52c41d7f/attachment.htm From victor at iso3103.net Thu Jul 19 17:32:30 2012 From: victor at iso3103.net (Victor Perron) Date: Thu, 19 Jul 2012 17:32:30 +0200 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK In-Reply-To: References: <671E27F33F2F25499F78A4AFA494E63B384D6585@ex10czdmb01> Message-ID: Hello there, I updated the wiki about this. It should work fine with ZeroMQ both 2.2 and 3.x now; I have tested them on my SGSIII, and everything seems OK. The new method (that was actually used in my build scripts) statically embeds the missing definitions from, in particular, libstdc++ into libjzmq.so. That inflates the binary size a lot (2.4 or 2.7 MBs unstripped for 2.2 and 3.x) but this can be adressed by specifying -s or running arm-linux-androideabi-strip --strip-all on the binary. The resulting library still works and has < 650 Kb footprint. Please report any further issue. Regards, On Thu, Jul 19, 2012 at 12:31 PM, Victor Perron wrote: > Hello, > > I found the issue. I mismatched a few command line switches when writing > the wiki page; I suspect I got confused with all the configuration tweaks ! > I'll update the wiki properly in the day, as soon as I tested a few more > things. It may also help for libzmq 3.x, though that's not for sure. > > I uploaded a compiled version of the library (zeromq2.2 + jzmq master) on > a file hosting service, could you report if it works ? > Link : http://www9.zippyshare.com/v/83273893/file.html > > Just has been tested on a SGSIII, communicates with a PC via TCP transport > (with proper android.permission.INTERNET) > > > On Thu, Jul 19, 2012 at 10:03 AM, Victor Perron wrote: > >> This is awkward. O have been able to run it successfully on mine. I'll >> definitely take a look. >> >> >> On Thu, Jul 19, 2012 at 8:53 AM, Sharon Ben-Asher < >> Sharon.Ben-Asher at avg.com> wrote: >> >>> Hi, >>> >>> Today, I tried to work with v2.2.0: >>> followed the instructions as close as I can, the build was successful, >>> as far as I could see. >>> However, when running in the device, encountered this problem: >>> Cannot load library: reloc_library[1289]: 157 cannot locate >>> '_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E'... >>> >>> Thanks, >>> Sharon. >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> >> >> >> -- >> Victor >> >> > > > -- > Victor > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120719/49be8ce5/attachment.htm From Aaron.Viviano at quadTechWorld.com Fri Jul 20 00:31:52 2012 From: Aaron.Viviano at quadTechWorld.com (Viviano, Aaron) Date: Thu, 19 Jul 2012 17:31:52 -0500 Subject: [zeromq-dev] Bad Pointer Exception with ZMQ 2.2.X Message-ID: Hello ZeroMQ Devs, I'm currently running into an issue with ZMQ, using CLRZMQ (Win7, VS2010), where it is crashing in the encoder::get_data function at this line: memcpy (buffer + pos, write_pos, to_copy); The variable write_pos would equal 0xfeeefeee, which according to what I've researched, means that the pointer was last touched by Window's HeapFree function [1]. Looking into the code I've found that this variable is set with the address from the msg_content_t::*data variable. This is then cleaned up in zmq_msg_close: if (content->ffn) content->ffn (content->data, content->hint); free (content); I've attempted to add a function call in zmq::encoder_t::message_ready to a function called zmq_CheckForFreedData to try and fix the problem. bool zmq_CheckForFreedData(zmq_msg_t *msg_) { if (msg_->content == (zmq::msg_content_t*) ZMQ_VSM) return false; if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER) return false; if(((zmq::msg_content_t*) msg_->content)->data == (void *)0xfeeefeee) { return true; } return false; } ... if (!source || !source->read (&in_progress)) { zmq_msg_init (&in_progress); return false; } else if(zmq_CheckForFreedData(&in_progress)) { zmq_msg_init (&in_progress); return false; } ... While this prevents the crash I'm now seeing my program lock up. At the moment I don't have a simple test program for you, however, until I have the chance to put one together, what would be the best place to start looking for why this error is happening in the code? Thank you, Aaron 1. http://stackoverflow.com/questions/127386/in-visual-studio-c-what-are-the-memory-allocation-representations -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120719/3e0cac1f/attachment.htm From fungust at tintedshadow.com Fri Jul 20 01:07:21 2012 From: fungust at tintedshadow.com (Feng Yi Chan) Date: Fri, 20 Jul 2012 07:07:21 +0800 Subject: [zeromq-dev] zeroMQ with SDP and Python on Infiniband Message-ID: <50089329.3060606@tintedshadow.com> Hi, I have been trying to get libsdp.so to wrap a simple ZMQ REQ-REP socket in python with the following commands on two separate boxes connected via Infiniband. All attempts thus far at pre-loading libsdp.so have not resulted in a successful connection via SDP sockets. Instead, the ZeroMQ messages are passed via tcp, which results in poorer throughput on the fabric than possible with SDP. Is there something I am doing wrong? The code and run commands are below. The environment and libsdp.so have been tested and shown to function via SDP using the iperf benchmark program. 192.168.11.11 corresponds to the host infiniband IPoIB address. Thank you. LD_PRELOAD=/usr/lib64/libsdp.so LIBSDP_CONFIG_FILE=/etc/libsdp.conf python2.7 server.py LD_PRELOAD=/usr/lib64/libsdp.so LIBSDP_CONFIG_FILE=/etc/libsdp.conf python2.7 client.py Server code: import zmq context = zmq.Context() reply = context.socket(zmq.REP) reply.bind('tcp://192.168.11.11:5001') while True: msg=reply.recv() reply.send(msg) Client Code: import zmq context = zmq.Context() request = context.socket(zmq.REQ) request.connect('tcp://192.168.11.11:5001') while True: request.send('hello') z = request.recv() From hurtonm at gmail.com Fri Jul 20 12:36:43 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Fri, 20 Jul 2012 12:36:43 +0200 Subject: [zeromq-dev] Bad Pointer Exception with ZMQ 2.2.X In-Reply-To: References: Message-ID: Is this reproducible? - Martin On Fri, Jul 20, 2012 at 12:31 AM, Viviano, Aaron wrote: > Hello ZeroMQ Devs, > > I?m currently running into an issue with ZMQ, using CLRZMQ (Win7, VS2010), > where it is crashing in the encoder::get_data function at this line: > > > > memcpy (buffer + pos, write_pos, to_copy); > > > > The variable write_pos would equal 0xfeeefeee, which according to what I?ve > researched, means that the pointer was last touched by Window?s HeapFree > function [1]. Looking into the code I?ve found that this variable is set > with the address from the msg_content_t::*data variable. This is then > cleaned up in zmq_msg_close: > > > > if (content->ffn) > > content->ffn (content->data, content->hint); > > free (content); > > > > I?ve attempted to add a function call in zmq::encoder_t::message_ready to a > function called zmq_CheckForFreedData to try and fix the problem. > > > > bool zmq_CheckForFreedData(zmq_msg_t *msg_) > > { > > if (msg_->content == (zmq::msg_content_t*) ZMQ_VSM) > > return false; > > if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER) > > return false; > > > > if(((zmq::msg_content_t*) msg_->content)->data == (void *)0xfeeefeee) > > { > > return true; > > } > > return false; > > } > > > > ? > > if (!source || !source->read (&in_progress)) > > { > > zmq_msg_init (&in_progress); > > return false; > > } > > else if(zmq_CheckForFreedData(&in_progress)) > > { > > zmq_msg_init (&in_progress); > > return false; > > } > > ? > > > > While this prevents the crash I?m now seeing my program lock up. At the > moment I don?t have a simple test program for you, however, until I have the > chance to put one together, what would be the best place to start looking > for why this error is happening in the code? > > > > Thank you, > > Aaron > > > > 1. > http://stackoverflow.com/questions/127386/in-visual-studio-c-what-are-the-memory-allocation-representations > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From Aaron.Viviano at quadTechWorld.com Fri Jul 20 18:28:40 2012 From: Aaron.Viviano at quadTechWorld.com (Viviano, Aaron) Date: Fri, 20 Jul 2012 11:28:40 -0500 Subject: [zeromq-dev] Bad Pointer Exception with ZMQ 2.2.X In-Reply-To: References: Message-ID: Hello ZMQ Devs, I found the issue and it is with CLRZMQ and not LIBZMQ. Turns out that CLRZMQ was using the same object for both sending and receiving. When sending messages at a high enough rate of speed CLRZMQ was deleting the message at the same time that LIBZMQ was using it. For those curious the issue is with "private IntPtr _msg;" in Socket.cs. Remove that variable and put unique instances in the send, forward, and receive functions that previously used the _msg variable. My apologies for not finding that the flaw was outside LIBZMQ earlier. I will contact the CLRZMQ Devs about this. Thank you, Aaron Viviano -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120720/8effc151/attachment.htm From tw at dtex.org Sat Jul 21 17:03:49 2012 From: tw at dtex.org (Toralf Wittner) Date: Sat, 21 Jul 2012 17:03:49 +0200 Subject: [zeromq-dev] zmq_term can not safely be re-entered with pgm transport Message-ID: According to the man page of zmq_term, it should be safe to re-enter zmq_term if it previously returned with EINTR. This is actually not true if used with OpenPGM. zmq_term invokes pgm_shutdown which is reading and modifying the static variable pgm_ref_count and will return FALSE on second invocation which makes zmq_term abort with "Assertion failed: false (zmq.cpp:185)". This affects version 2.2 as well as 3.2. -- Toralf From steven.mccoy at miru.hk Sun Jul 22 05:50:38 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Sat, 21 Jul 2012 23:50:38 -0400 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: References: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> Message-ID: I have OS X 10.7 up and see the error whilst building with gcc. sockaddr.c: In function 'pgm_sockaddr_pktinfo': sockaddr.c:485: error: 'IPV6_PKTINFO' undeclared (first use in this function) sockaddr.c:485: error: (Each undeclared identifier is reported only once sockaddr.c:485: error: for each function it appears in.) make: *** [libpgm_noinst_la-sockaddr.lo] Error 1 -- Steve-o On 19 July 2012 09:12, Steven McCoy wrote: > Both are on the latest version, 5.1.118. The fixes for OS X are in trunk > which is currently wearing the version number 5.2.119. > > -- > Steve-o > > > On 18 July 2012 17:31, Ron Elliott wrote: > >> Does version 3.x use the same version of openpgm that compiles on mac? >> Looks like it's now just easier to upgrade if this issue doesn't exist in >> v3. >> >> Thanks for your response >> >> On Jul 17, 2012, at 12:27 PM, Steven McCoy wrote: >> >> On 17 July 2012 02:22, Ron Elliott wrote: >> >>> Using the downloaded stable version 2.2 code I cannot get ZMQ to compile >>> with the --with-pgm option. The project is too far along to make the switch >>> to v3 so that's not an option atm. Any other solutions or is ZMQ dead for >>> me? >>> >>> >> It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to >> verify fixing the issue upstream in OpenPGM. >> >> -- >> Steve-o >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120721/e86de707/attachment.htm From steven.mccoy at miru.hk Sun Jul 22 07:37:52 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Sun, 22 Jul 2012 01:37:52 -0400 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: References: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> Message-ID: Try this build: http://openpgm.googlecode.com/files/libpgm-5.2.119~dfsg.tar.gz -- Steve-o On 21 July 2012 23:50, Steven McCoy wrote: > I have OS X 10.7 up and see the error whilst building with gcc. > > sockaddr.c: In function 'pgm_sockaddr_pktinfo': > sockaddr.c:485: error: 'IPV6_PKTINFO' undeclared (first use in this > function) > sockaddr.c:485: error: (Each undeclared identifier is reported only once > sockaddr.c:485: error: for each function it appears in.) > make: *** [libpgm_noinst_la-sockaddr.lo] Error 1 > > -- > Steve-o > > > On 19 July 2012 09:12, Steven McCoy wrote: > >> Both are on the latest version, 5.1.118. The fixes for OS X are in trunk >> which is currently wearing the version number 5.2.119. >> >> -- >> Steve-o >> >> >> On 18 July 2012 17:31, Ron Elliott wrote: >> >>> Does version 3.x use the same version of openpgm that compiles on mac? >>> Looks like it's now just easier to upgrade if this issue doesn't exist in >>> v3. >>> >>> Thanks for your response >>> >>> On Jul 17, 2012, at 12:27 PM, Steven McCoy wrote: >>> >>> On 17 July 2012 02:22, Ron Elliott wrote: >>> >>>> Using the downloaded stable version 2.2 code I cannot get ZMQ to >>>> compile with the --with-pgm option. The project is too far along to make >>>> the switch to v3 so that's not an option atm. Any other solutions or is ZMQ >>>> dead for me? >>>> >>>> >>> It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to >>> verify fixing the issue upstream in OpenPGM. >>> >>> -- >>> Steve-o >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120722/52299f37/attachment.htm From varokan at movingsatellites.com Fri Jul 20 19:36:57 2012 From: varokan at movingsatellites.com (varokan at movingsatellites.com) Date: Fri, 20 Jul 2012 10:36:57 -0700 Subject: [zeromq-dev] ZMQ and TLS ( again ) Message-ID: Just a quick question regarding encryption. I read that there are considerations to leverage tcpcrypt or similar for opportunistci encryption but I also found Wes Youngs GnuTLS implementation in ZeroMQ itself. https://github.com/wesyoung/libzmq I rather prefer the integrated approach Wes Yuong used through "zmq_setsockopt ( socket, ZMQ_TLS, "true", 5 )" as it is easier to use, better integrated into the ZeroMQ API, and overall much cleaner from a users point of view. What are the chances to integrate this into the latest ZeroMQ code base ? It seems to me that the impact would be minimal and the benefits would be outstanding. If the documentation points out exactly when and how to use TLS, then I think the concerns about unsupported communication types can be mitigated. Also if this can be enabled during compile time through a switch to the configure script it would not interfere with the other core features. My last point is that the changes which I saw on git seem minimal, which should be good news to any one concerned about code-bloat. Encryption is or should be an inherent capability of sockets and socket libraries in this day and age. Please consider adding TLS encryption to ZeroMQ, if only as alpha for now. Thanks, Varol From bluerocketdelivery at gmail.com Sun Jul 22 06:43:35 2012 From: bluerocketdelivery at gmail.com (Ron Elliott) Date: Sat, 21 Jul 2012 21:43:35 -0700 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: References: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> Message-ID: <361CE0FF-66F8-4BA6-B406-0434B9EADF65@gmail.com> That should be remedied by adding -D__APPLE_USE_RFC_2292 to the compile flags, see this bug report: http://code.google.com/p/openpgm/issues/detail?id=22 I have 3-x compiling now, but progress getting my code back to a testable state is slow so I'm still not 100% sure that it is working correctly but at least the compiler isn't complaining. Worth noting, if you are trying to build openpgm and keep getting a "waiting for lock release on file ?." error and you happen to have the source on an exFAT partition, move it off of there to get it to compile successfully. On Jul 21, 2012, at 8:50 PM, Steven McCoy wrote: > I have OS X 10.7 up and see the error whilst building with gcc. > > sockaddr.c: In function 'pgm_sockaddr_pktinfo': > sockaddr.c:485: error: 'IPV6_PKTINFO' undeclared (first use in this function) > sockaddr.c:485: error: (Each undeclared identifier is reported only once > sockaddr.c:485: error: for each function it appears in.) > make: *** [libpgm_noinst_la-sockaddr.lo] Error 1 > > -- > Steve-o > > On 19 July 2012 09:12, Steven McCoy wrote: > Both are on the latest version, 5.1.118. The fixes for OS X are in trunk which is currently wearing the version number 5.2.119. > > -- > Steve-o > > > On 18 July 2012 17:31, Ron Elliott wrote: > Does version 3.x use the same version of openpgm that compiles on mac? Looks like it's now just easier to upgrade if this issue doesn't exist in v3. > > Thanks for your response > > On Jul 17, 2012, at 12:27 PM, Steven McCoy wrote: > >> On 17 July 2012 02:22, Ron Elliott wrote: >> Using the downloaded stable version 2.2 code I cannot get ZMQ to compile with the --with-pgm option. The project is too far along to make the switch to v3 so that's not an option atm. Any other solutions or is ZMQ dead for me? >> >> >> It's a known issue, I have to upgrade my Mac mini from 10.6 to 10.7 to verify fixing the issue upstream in OpenPGM. >> >> -- >> Steve-o >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120721/02871458/attachment.htm From ph at imatix.com Sun Jul 22 13:39:10 2012 From: ph at imatix.com (Pieter Hintjens) Date: Sun, 22 Jul 2012 13:39:10 +0200 Subject: [zeromq-dev] zmq_term can not safely be re-entered with pgm transport In-Reply-To: References: Message-ID: Hi Toralf, Thanks for spotting this. Would you like to create an issue for this in our issue tracker? And, if you have time, fix this and send us pull requests? Cheers Pieter On Sat, Jul 21, 2012 at 5:03 PM, Toralf Wittner wrote: > According to the man page of zmq_term, it should be safe to re-enter > zmq_term if it previously returned with EINTR. This is actually not > true if used with OpenPGM. zmq_term invokes pgm_shutdown which is > reading and modifying the static variable pgm_ref_count and will > return FALSE on second invocation which makes zmq_term abort with > "Assertion failed: false (zmq.cpp:185)". This affects version 2.2 as > well as 3.2. > > -- Toralf > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From steven.mccoy at miru.hk Sun Jul 22 16:35:48 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Sun, 22 Jul 2012 10:35:48 -0400 Subject: [zeromq-dev] OS 10.7 Cannot Build with --with-pgm In-Reply-To: <361CE0FF-66F8-4BA6-B406-0434B9EADF65@gmail.com> References: <513250A7-472F-4FB1-AC41-13883E1AEA13@gmail.com> <361CE0FF-66F8-4BA6-B406-0434B9EADF65@gmail.com> Message-ID: On 22 July 2012 00:43, Ron Elliott wrote: > That should be remedied by adding -D__APPLE_USE_RFC_2292 to the compile > flags, see this bug report: > > I actually read the headers this time: */usr/include/netinet6/in6.h*: /* RFC 3542 define the following socket options in a manner incompatible * with RFC 2292: * IPV6_PKTINFO * IPV6_HOPLIMIT * IPV6_NEXTHOP * IPV6_HOPOPTS * IPV6_DSTOPTS * IPV6_RTHDR * * To use the new IPv6 Sockets options introduced by RFC 3542 * the constant __APPLE_USE_RFC_3542 must be defined before * including * * To use the old IPv6 Sockets options from RFC 2292 * the constant __APPLE_USE_RFC_2292 must be defined before * including * * Note that eventually RFC 3542 is going to be the * default and RFC 2292 will be obsolete. */ The RFC 2292 version of IPV6_PKTINFO: #define IPV6_2292PKTINFO 19 /* bool; send/recv if, src/dst addr */ The RFC 3542 version: #define IPV6_RECVPKTINFO 61 /* bool; recv if, dst addr * APPLE: Value purposely different than FreeBSD (36) to avoid * collision with definition of IPV6_TCLASS in previous * darwin implementations */ -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120722/97ffd4d1/attachment.htm From steven.mccoy at miru.hk Sun Jul 22 16:46:31 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Sun, 22 Jul 2012 10:46:31 -0400 Subject: [zeromq-dev] zmq_term can not safely be re-entered with pgm transport In-Reply-To: References: Message-ID: Plus its a similar problem with Windows. Pre-emptive patch attached. -- Steve-o On 22 July 2012 07:39, Pieter Hintjens wrote: > Hi Toralf, > > Thanks for spotting this. Would you like to create an issue for this > in our issue tracker? > > And, if you have time, fix this and send us pull requests? > > Cheers > Pieter > > On Sat, Jul 21, 2012 at 5:03 PM, Toralf Wittner wrote: > > According to the man page of zmq_term, it should be safe to re-enter > > zmq_term if it previously returned with EINTR. This is actually not > > true if used with OpenPGM. zmq_term invokes pgm_shutdown which is > > reading and modifying the static variable pgm_ref_count and will > > return FALSE on second invocation which makes zmq_term abort with > > "Assertion failed: false (zmq.cpp:185)". This affects version 2.2 as > > well as 3.2. > > > > -- Toralf > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120722/5747e254/attachment.htm -------------- next part -------------- --- zmq.cpp.orig 2012-07-22 10:42:24.000000000 -0400 +++ zmq.cpp 2012-07-22 10:44:36.000000000 -0400 @@ -292,17 +292,20 @@ int rc = ((zmq::ctx_t*) ctx_)->terminate (); int en = errno; + // Shut down only if termination was not interrupted by a signal. + if (!rc && en == EINTR) { #ifdef ZMQ_HAVE_WINDOWS - // On Windows, uninitialise socket layer. - rc = WSACleanup (); - wsa_assert (rc != SOCKET_ERROR); + // On Windows, uninitialise socket layer. + rc = WSACleanup (); + wsa_assert (rc != SOCKET_ERROR); #endif #if defined ZMQ_HAVE_OPENPGM - // Shut down the OpenPGM library. - if (pgm_shutdown () != TRUE) - zmq_assert (false); + // Shut down the OpenPGM library. + if (pgm_shutdown () != TRUE) + zmq_assert (false); #endif + } errno = en; return rc; From steven.mccoy at miru.hk Sun Jul 22 17:24:18 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Sun, 22 Jul 2012 11:24:18 -0400 Subject: [zeromq-dev] zmq_term can not safely be re-entered with pgm transport In-Reply-To: References: Message-ID: Almost right, Toralf waiting on the Jira case to fix. https://zeromq.jira.com -if (!rc && en == EINTR) { +if (!rc || en != EINTR) { -- Steve-o On 22 July 2012 10:46, Steven McCoy wrote: > Plus its a similar problem with Windows. Pre-emptive patch attached. > > -- > Steve-o > > > On 22 July 2012 07:39, Pieter Hintjens wrote: > >> Hi Toralf, >> >> Thanks for spotting this. Would you like to create an issue for this >> in our issue tracker? >> >> And, if you have time, fix this and send us pull requests? >> >> Cheers >> Pieter >> >> On Sat, Jul 21, 2012 at 5:03 PM, Toralf Wittner wrote: >> > According to the man page of zmq_term, it should be safe to re-enter >> > zmq_term if it previously returned with EINTR. This is actually not >> > true if used with OpenPGM. zmq_term invokes pgm_shutdown which is >> > reading and modifying the static variable pgm_ref_count and will >> > return FALSE on second invocation which makes zmq_term abort with >> > "Assertion failed: false (zmq.cpp:185)". This affects version 2.2 as >> > well as 3.2. >> > >> > -- Toralf >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120722/e9069491/attachment.htm From wes at barely3am.com Mon Jul 23 03:34:46 2012 From: wes at barely3am.com (Wes Young) Date: Sun, 22 Jul 2012 21:34:46 -0400 Subject: [zeromq-dev] ZMQ and TLS ( again ) In-Reply-To: References: Message-ID: > I rather prefer the integrated approach Wes Yuong used through > "zmq_setsockopt ( socket, ZMQ_TLS, "true", 5 )" as it is easier to use, > better integrated into the ZeroMQ API, and overall much cleaner from a > users point of view. :) > What are the chances to integrate this into the latest ZeroMQ code base ? > It seems to me that the impact would be minimal and the benefits would be > outstanding. fwiw: [at the time] i was waiting for 3.x to settle down a bit before diving back into this. > If the documentation points out exactly when and how to use TLS, then I > think the concerns about unsupported communication types can be mitigated. > Also if this can be enabled during compile time through a switch to the > configure script it would not interfere with the other core features. > > My last point is that the changes which I saw on git seem minimal, which > should be good news to any one concerned about code-bloat. we were trying to do it as a compile time argument for starters, and what we started figuring out (to be tested) after reading through [just about all of] libgnutls is that we might even be able to get away with "anonymous" TLS at the zmq level and leave the "Identity / auth" up to the higher levels of the protocol itself (being implemented in our testing as protobuf atm). > Encryption is or should be an inherent capability of sockets and socket > libraries in this day and age. while i don't disagree, and i think the solution will be a rather elegant one (i hope :x); it's a tough problem to solve correctly. some of which is determined on how the low-level stack was/is implemented (the way libzmq works and the way gnutls works)? > Please consider adding TLS encryption to ZeroMQ, if only as alpha for now. the original branch i wrote should be considered alpha in and of itself. i hadn't gotten much feedback other than "that's a neat idea" yet. this kind of crypto (at this level) could prove to make zmq unstable, which is why even in the branch you have to add it at compile time as a ./configure flag. crypto is hard; gnutls is worse; and if you do it wrong you're going to screw a *lot* of people in the process. which is why i'm guessing i haven't gotten a lot of other eyeballs on it just yet either :) either way, we should have more traction on our end for this come early fall or so. we'll be getting to a point in our project where we'll start testing these kinda links at scale? one way or the other it's on our list of things where it's a requirement to be solved. cheers, -- Wes wesyoung.me collectiveintel.net -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 203 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120722/c2664297/attachment.pgp From vitaliy at toroki.com Mon Jul 23 15:15:40 2012 From: vitaliy at toroki.com (Vitaliy Ivanov) Date: Mon, 23 Jul 2012 16:15:40 +0300 Subject: [zeromq-dev] [PATCH] tests: getting rid of warnings when build with NDEBUG. Message-ID: <1343049340.16350.16.camel@vivanov> Hi, ZMQ tree 2-x. I didn't use ZMQ_ASSERT as tests are not using this macro. Vitaliy ---------------------------------------------------------------------- >From 12e7514e9c076f35cd525fee5f2c68a1228e53f2 Mon Sep 17 00:00:00 2001 From: Vitaliy Ivanov Date: Mon, 23 Jul 2012 16:06:13 +0300 Subject: [PATCH] tests: getting rid of warnings when build with NDEBUG. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Correcting the following warnings when build in non asserts mode: a. testutil.hpp: In function ?void zmqtestutil::basic_tests(const char*, int, int)?: testutil.hpp:114: error: unused variable ?rc? b. test_hwm.cpp: In function ?int main(int, char**)?: test_hwm.cpp:47: error: unused variable ?sent? test_hwm.cpp:60: error: unused variable ?received? test_hwm.cpp:64: error: unused variable ?sent? Signed-off-by: Vitaliy Ivanov --- tests/test_hwm.cpp | 17 +++++++++-------- tests/test_timeo.cpp | 4 ++-- tests/testutil.hpp | 17 +++++++++-------- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp index d73c25f..e1fcec2 100644 --- a/tests/test_hwm.cpp +++ b/tests/test_hwm.cpp @@ -28,6 +28,7 @@ int main (int argc, char *argv []) { uint64_t hwm = 5; int linger = 0; + bool rc; zmq::context_t context (1); zmq::socket_t s1 (context, ZMQ_PULL); @@ -44,25 +45,25 @@ int main (int argc, char *argv []) zmq::message_t msg (sizeof ("test") - 1); memcpy (msg.data (), "test", sizeof ("test") - 1); - bool sent = s2.send (msg, ZMQ_NOBLOCK); + rc = s2.send (msg, ZMQ_NOBLOCK); // Anything below HWM should be sent if (i < 5) { - assert (sent); + assert (rc); } else { - assert (!sent && errno == EAGAIN); + assert (!rc && errno == EAGAIN); } } // There should be now 5 messages pending, consume one zmq::message_t msg; - bool received = s1.recv (&msg, 0); - assert (received); + rc = s1.recv (&msg, 0); + assert (rc); // Now it should be possible to send one more - bool sent = s2.send (msg, 0); - assert (sent); + rc = s2.send (msg, 0); + assert (rc); - return 0; + return 0; } diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp index b9cd512..251972e 100644 --- a/tests/test_timeo.cpp +++ b/tests/test_timeo.cpp @@ -107,7 +107,7 @@ int main (int argc, char *argv []) memcpy (zmq_msg_data (&msg), "12345678ABCDEFGH12345678abcdefgh", 32); rc = zmq_send (sc, &msg, 0); assert (rc == 0); - + rc = zmq_recv (sb, &msg, 0); assert (rc == 0); assert (32 == zmq_msg_size(&msg)); @@ -120,6 +120,6 @@ int main (int argc, char *argv []) rc = zmq_term (ctx); assert (rc == 0); - return 0 ; + return 0; } diff --git a/tests/testutil.hpp b/tests/testutil.hpp index 7f182c1..550ecf0 100644 --- a/tests/testutil.hpp +++ b/tests/testutil.hpp @@ -30,8 +30,7 @@ namespace zmqtestutil { - - using namespace std ; + using namespace std; typedef std::pair socket_pair; @@ -68,7 +67,7 @@ namespace zmqtestutil s2.send (pong, 0); // Return received data as std::string. - return ret ; + return ret; } /* Run basic tests for the given transport. @@ -79,6 +78,8 @@ namespace zmqtestutil */ void basic_tests (const char *transport_, int t1_, int t2_) { + int rc = 0; + string returned; zmq::context_t context (1); zmq::pollitem_t items [2]; @@ -88,7 +89,7 @@ namespace zmqtestutil const string expect ("XXX"); { - const string returned = zmqtestutil::ping_pong (p, expect); + returned = zmqtestutil::ping_pong (p, expect); assert (expect == returned); // Adjust socket state so that poll shows only 1 pending message. @@ -97,7 +98,7 @@ namespace zmqtestutil } { - // Now poll is used to singal that a message is ready to read. + // Now poll is used to signal that a message is ready to read. zmq::message_t m1 (expect.size ()); memcpy (m1.data (), expect.c_str (), expect.size ()); items [0].socket = *p.first; @@ -111,14 +112,14 @@ namespace zmqtestutil p.first->send (m1, 0); - int rc = zmq::poll (&items [0], 2, -1); + rc = zmq::poll (&items [0], 2, -1); assert (rc == 1); assert ((items [1].revents & ZMQ_POLLIN) != 0); zmq::message_t m2; p.second->recv (&m2, 0); - const string ret ((char*) m2.data (), m2.size ()); - assert (expect == ret); + returned = string((char*) m2.data (), m2.size ()); + assert (expect == returned); } // Delete sockets. -- 1.7.0.4 From Sharon.Ben-Asher at avg.com Mon Jul 23 15:25:31 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Mon, 23 Jul 2012 13:25:31 +0000 Subject: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D7893@ex10czdmb01> Victor, I can confirm that the precompiled shared object works fine. I will try to re-compile the source with the updated instructions. Sharon. -----Original Message----- From: Victor Perron Subject: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK To: ZeroMQ development list Message-ID: <1343069637.8613.YahooMailClassic@web29503.mail.ird.yahoo.com> Hi all, I confirm that the precompiled library works too for my Acer Liquid with Android 2.2. Thanks! I have compiled the library but have not tested it. --- En date de?: Lun 23.7.12, Sharon Ben-Asher a ?crit?: De: Sharon Ben-Asher Objet: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the Android APK ?: "zeromq-dev at lists.zeromq.org" Date: Lundi 23 juillet 2012, 15h25 Victor, I can confirm that the precompiled shared object works fine.? I will try to re-compile the source with the updated instructions. Sharon. -----Original Message----- From: Victor Perron Subject: Re: [zeromq-dev] ZeroMQ for Android: Problem in building the??? Android APK To: ZeroMQ development list Hi all, I am new to ZeroMQ. I am actually not quite comfortable about the constness in the API. For example, size_t zmq_msg_size(zmq_msg_t* msg); In my opinion, it is better to do it this way: size_t zmq_msg_size(const zmq_msg_t* msg); because this function by definition only returns the size of the message. It should not change the message itself. By adding the const there, developers can pass addresses of const messages into this function. Any comments? From paolo.denti at gmail.com Tue Jul 24 12:22:11 2012 From: paolo.denti at gmail.com (Paolo Denti) Date: Tue, 24 Jul 2012 12:22:11 +0200 Subject: [zeromq-dev] compiling zeromq on ios Message-ID: <35885C68-9C2A-4276-B8F7-99BE61AD634C@gmail.com> Hi all, i am trying to compile zeromq for ios5 and i had to change a little bit the instructions found on the wiki at page http://www.zeromq.org/build:iphone SDK_ROOT="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer" export CXX="${SDK_ROOT}/usr/bin/g++" export CC="${SDK_ROOT}/usr/bin/gcc" ./configure --disable-dependency-tracking --enable-static --disable-shared --host=arm-apple-darwin10 --with-poller=kqueue --prefix=${BUILD_DIR} changing the xcode location and adding --with-poller=kqueue because a polling system was not found (and kqueue is included in ios) However while configuring i get the following warnings (autoconf version is 2.61) checking errno.h usability... no checking errno.h presence... yes configure: WARNING: errno.h: present but cannot be compiled configure: WARNING: errno.h: check for missing prerequisite headers? configure: WARNING: errno.h: see the Autoconf documentation configure: WARNING: errno.h: section "Present But Cannot Be Compiled" configure: WARNING: errno.h: proceeding with the compiler's result configure: WARNING: ## ------------------------------------------ ## configure: WARNING: ## Report this to zeromq-dev at lists.zeromq.org ## configure: WARNING: ## ------------------------------------------ ## checking for errno.h... no checking arpa/inet.h usability... no checking arpa/inet.h presence... yes configure: WARNING: arpa/inet.h: present but cannot be compiled configure: WARNING: arpa/inet.h: check for missing prerequisite headers? configure: WARNING: arpa/inet.h: see the Autoconf documentation configure: WARNING: arpa/inet.h: section "Present But Cannot Be Compiled" configure: WARNING: arpa/inet.h: proceeding with the compiler's result configure: WARNING: ## ------------------------------------------ ## configure: WARNING: ## Report this to zeromq-dev at lists.zeromq.org ## configure: WARNING: ## ------------------------------------------ ## checking for arpa/inet.h... no .... and several others -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120724/7d3148af/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3642 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120724/7d3148af/attachment.bin From sebastian.lauwers at gmail.com Tue Jul 24 15:23:34 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Tue, 24 Jul 2012 15:23:34 +0200 Subject: [zeromq-dev] Question about constness In-Reply-To: <500E28F6.1040608@gmail.com> References: <500E28F6.1040608@gmail.com> Message-ID: On 24 July 2012 06:47, Ming Ji wrote: > Hi all, Hi there, > I am new to ZeroMQ. I am actually not quite comfortable about the > constness in the API. You are not the only one. This has been discussed a few times already: http://lists.zeromq.org/pipermail/zeromq-dev/2010-October/007392.html http://lists.zeromq.org/pipermail/zeromq-dev/2011-May/011668.html http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004435.html > For example, > size_t zmq_msg_size(const zmq_msg_t* msg); Indeed, but it also requires all the underlying calls to be const-compatible. This, in and of itself, is not really an issue, but as noted in the threads cited above, is prone to breakage unless done in major revisions. Checking the zeromq 3.2 RC [1], I see this still hasn't been applied---I don't know what the project's policy would be regarding "breaking" the 3.2 API after the first RC has been released. Constness is used a handful of times in zmq.h. > Any comments? Personally, I've wrapped the zmq.hpp API with my own interface (the project that contains this is LGPL and will be released around September), and which adds a number of objects to the standard CPP API (ZMQSendingSocket, ZMQReceivingSocket, ZMQPublisherSocket, etc), and full const-correctness. I didn't feel the need to change the zeromq API per se, but it certainly might make things easier/safer for others. If there is a demand for it, I could probably provide a patch for the CPP API, or even share my interface, if asked. Lastly, on a purely stylistic note, I prefer adding the const modifier after the symbol it applies to. I would thus re-write your provided example as: size_t zmq_msg_size(zmq_msg_t const * msg); [1]: https://github.com/zeromq/zeromq3-x/blob/master/include/zmq.h PS: First post on mailing lists. Hip hip. PPS: Moderators, I tried sending from my @googlemail address, which obviously wasn't accepted by mailman. Apologies. From aleemb at gmail.com Tue Jul 24 12:25:17 2012 From: aleemb at gmail.com (Aleem B) Date: Tue, 24 Jul 2012 15:25:17 +0500 Subject: [zeromq-dev] 64 bit PHP extension Message-ID: The snapshot page does not offer a 64 bit PHP extension. Has anyone managed to compile and generate an x64 PHP DLL? Would really appreciate a copy of the file. -- Aleem -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120724/419fb6fb/attachment.htm From jonas.adler at epiq.se Tue Jul 24 16:03:33 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Tue, 24 Jul 2012 16:03:33 +0200 (CEST) Subject: [zeromq-dev] Massive problems running ZMQ on android Message-ID: Hello, I'm new to ZMQ, and trying to get it to run on android. I am however, facing issue, after issue, after issue. I try to follow the official guide, (http://www.zeromq.org/build:android), and have gotten to the following call on my ubuntu machine: ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version I get this error: "configure: error: cannot link with -lzmq" I have tried google for a few days now, but i cannot find any solution to this that works for me. Some comments on other solutions i have found, that did not work for me: I have installed pretty much every compiler known to man, but if you have any specific suggestions, please tell me. I have made no alterations to the source at all, simply following the instructions to the letter. Has someone else had this error? Is there something that is "understood" in the guide, that i could be missing? Any help would be greatly appreciated! //Jonas Adler From victor at iso3103.net Tue Jul 24 19:25:28 2012 From: victor at iso3103.net (Victor Perron) Date: Tue, 24 Jul 2012 19:25:28 +0200 Subject: [zeromq-dev] Massive problems running ZMQ on android In-Reply-To: References: Message-ID: Seems that you were compiling jzmq without having previously ran a 'make install' of zeromq itself, is it ? Check if that is the issue, best regards Le 24 juil. 2012 16:40, a ?crit : > Hello, > > I'm new to ZMQ, and trying to get it to run on android. I am however, > facing issue, after issue, after issue. > > I try to follow the official guide, (http://www.zeromq.org/build:android), > and have gotten to the following call on my ubuntu machine: > > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version > > I get this error: > > "configure: error: cannot link with -lzmq" > > I have tried google for a few days now, but i cannot find any solution to > this that works for me. > > Some comments on other solutions i have found, that did not work for me: > > I have installed pretty much every compiler known to man, but if you have > any specific suggestions, please tell me. > I have made no alterations to the source at all, simply following the > instructions to the letter. > > Has someone else had this error? Is there something that is "understood" > in the guide, that i could be missing? > > Any help would be greatly appreciated! > > //Jonas Adler > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120724/7e60f001/attachment.htm From n1555 at yahoo.fr Tue Jul 24 19:26:04 2012 From: n1555 at yahoo.fr (Eric) Date: Tue, 24 Jul 2012 18:26:04 +0100 (BST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: Message-ID: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> Did you try to configure zmq or jzmq?The configure command you described is command line for jzmq. You need first to have set the env variable?OUTPUT_DIR=/tmp/zeromq-android?and then have generated zmq. Then you should be able to launch configure for jzmq. Regards. --- En date de?: Mar 24.7.12, jonas.adler at epiq.se a ?crit?: De: jonas.adler at epiq.se Objet: [zeromq-dev] Massive problems running ZMQ on android ?: zeromq-dev at lists.zeromq.org Date: Mardi 24 juillet 2012, 16h03 Hello, I'm new to ZMQ, and trying to get it to run on android. I am however, facing issue, after issue, after issue. I try to follow the official guide, (http://www.zeromq.org/build:android), and have gotten to the following call on my ubuntu machine: ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version I get this error: "configure: error: cannot link with -lzmq" I have tried google for a few days now, but i cannot find any solution to this that works for me. Some comments on other solutions i have found, that did not work for me: I have installed pretty much every compiler known to man, but if you have any specific suggestions, please tell me. I have made no alterations to the source at all, simply following the instructions to the letter. Has someone else had this error? Is there something that is "understood" in the guide, that i could be missing? Any help would be greatly appreciated! //Jonas Adler _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120724/9594150d/attachment.htm From finalguy at gmail.com Wed Jul 25 03:26:56 2012 From: finalguy at gmail.com (Ming Ji) Date: Tue, 24 Jul 2012 20:26:56 -0500 Subject: [zeromq-dev] Question about constness References: 500E28F6.1040608@gmail.com Message-ID: <500F4B60.9030200@gmail.com> Hi Sebastian, Thanks for pointing out the previous threads about this issue. I went through all three of them. I saw someone mentioned const_cast. I would say that is a good way for people who knows the implementation details. For general users, it is still not safe. For example, zmq_msg_copy will destroy the original message. It is probably not a good idea to cast the const message and pass it to this function. We don't know if other functions will change the original messages, so it is in general not a good idea to blindly do the const_cast. Could you share your interface, or C++ API patch? I can probably do a test run before you release it. Thanks From sebastian.lauwers at gmail.com Wed Jul 25 11:58:11 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Wed, 25 Jul 2012 11:58:11 +0200 Subject: [zeromq-dev] Question about constness In-Reply-To: <500F4B60.9030200@gmail.com> References: 500E28F6.1040608@gmail.com <500F4B60.9030200@gmail.com> Message-ID: <500FC333.1040307@gmail.com> Hi again, On 25/07/12 03:26, Ming Ji wrote: > Could you share your interface, or C++ API patch? I can probably do a > test run before you release it. I haven't written the C++ API patch yet, so that'll have to wait for the weekend or so, when I have a minute. I've attached two files that contain my so called "interface". Please note that this is a first try / prototype, so it will need to be modified quite a bit (very few socket options are supported) in order to respect everything ZeroQ has to offer, and to actually be usable in a generic way. I'm only using the minimum needed for my project, and will add to it when I reach the need for more features. This interface also assumes the use of Google's protobufs; but it would be easy to adapt to any other kind of serialisation library. The way I use this in my project is as follows, components that "offer" a service, implement their "own socket": class InstanceManagerSocket { private: firestarter::sockets::ZMQPublisherSocket publisher; firestarter::sockets::ZMQResponseSocket responder; public: InstanceManagerSocket(zmq::context_t & context) : publisher(context, MODULE_ORDERS_SOCKET_URI), responder(context, MANAGER_SOCKET_URI) { }; inline bool send(google::protobuf::Message const & pb_message) { return this->publisher.send(pb_message); }; inline bool reply(google::protobuf::Message const & pb_message) { return this->responder.send(pb_message); }; inline bool receive(google::protobuf::Message & pb_message, bool blocking = false) { if (this->responder.receive(pb_message, blocking)) return this->ack(); return false; }; inline bool ack() { return this->responder.send(); }; }; Clients who then want to use this service use a client class, for example (usually provided by the service): class InstanceManagerClientSocket { private: firestarter::sockets::ZMQSubscriberSocket subscriber; firestarter::sockets::ZMQRequestSocket requester; public: InstanceManagerClientSocket(zmq::context_t & context) : subscriber(context, MODULE_ORDERS_SOCKET_URI), requester(context, MANAGER_SOCKET_URI) { }; inline bool send(google::protobuf::Message const & pb_message) { if (this->requester.send(pb_message)) return this->receive_ack(); return false; }; inline bool receive(google::protobuf::Message & pb_message, bool blocking = false) { return this->subscriber.receive(pb_message, blocking); }; inline bool receive_ack() { return this->requester.receive(true); }; }; Again, please do take into account that this is in the very early stages of prototyping, and will probably be modified a lot before getting my own stamp of approval. What I'm aiming for, in the end, is to fully abstract the use of Protobufs for serialisation from the perspective of any one using the, for example, "InstanceManager sockets". Regarding the actual ZeroMQ part, I'll probably change the design of the classes, most probably through the use of templates, in order to remove the small artifacts that exist today (connect() or bind() end up in the wrong sockets, due to the use of virtual multiple inheritance, which I'm not happy with). @Everyone: I welcome any comments regarding my current use of ZeroMQ---my understanding of it is basic to say the least, which is why I haven't attacked more consuming bits like devices and such. -S. -------------- next part -------------- A non-text attachment was scrubbed... Name: zmqhelper.h Type: text/x-chdr Size: 196 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/bc2dbe13/attachment.h -------------- next part -------------- A non-text attachment was scrubbed... Name: zmqsocket.cpp Type: text/x-c++src Size: 2269 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/bc2dbe13/attachment.cpp From Sharon.Ben-Asher at avg.com Wed Jul 25 12:14:03 2012 From: Sharon.Ben-Asher at avg.com (Sharon Ben-Asher) Date: Wed, 25 Jul 2012 10:14:03 +0000 Subject: [zeromq-dev] zeromq-dev Digest, Vol 55, Issue 23 In-Reply-To: References: Message-ID: <671E27F33F2F25499F78A4AFA494E63B384D8010@ex10czdmb01> Jonas, I have another idea (in case you did make zmq before jzmq) Notice that the configure of both zmq and jzmq rely on correct setting of $OUTPUT_DIR env variable. Specifically, you can see this in the configure of jzmq LDFLAGS="-L$OUTPUT_DIR/lib" This tells the linker of jzmq where to find libzmq.so So make sure the env variable is set correctly. Good luck, Sharon. -----Original Message----- From: jonas.adler at epiq.se Subject: [zeromq-dev] Massive problems running ZMQ on android To: zeromq-dev at lists.zeromq.org Message-ID: Content-Type: text/plain;charset=iso-8859-1 Hello, I'm new to ZMQ, and trying to get it to run on android. I am however, facing issue, after issue, after issue. I try to follow the official guide, (http://www.zeromq.org/build:android), and have gotten to the following call on my ubuntu machine: ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version I get this error: "configure: error: cannot link with -lzmq" I have tried google for a few days now, but i cannot find any solution to this that works for me. Some comments on other solutions i have found, that did not work for me: I have installed pretty much every compiler known to man, but if you have any specific suggestions, please tell me. I have made no alterations to the source at all, simply following the instructions to the letter. Has someone else had this error? Is there something that is "understood" in the guide, that i could be missing? Any help would be greatly appreciated! //Jonas Adler From jonas.adler at epiq.se Wed Jul 25 13:30:40 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Wed, 25 Jul 2012 13:30:40 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> Message-ID: Yes, I configured zmq before I tried to configure jzmq. My OUTPUT_DIR was set to /tmp/zeromq-android before I configured zmq. Here's a link to the script I made (from the instructions on build:android) after redoing the instructions approximate 15 times. Worth noting is that I installed the NDK and added the /opt/android-toolchain/bin to my PATH by hand, the steps i followed are at the top of this pastebin post. http://pastebin.com/iXQWCxNV Everything seems to go smooth untill the jzmq config. That is where i get the "configure: error: cannot link with -lzmq" error. Everything I did tried I did with sudo or root access. > Did you try to configure zmq or jzmq?The configure command you described > is command line for jzmq. You need first to have set the env > variable?OUTPUT_DIR=/tmp/zeromq-android?and then have generated zmq. > Then you should be able to launch configure for jzmq. > Regards. > > --- En date de?: Mar 24.7.12, jonas.adler at epiq.se a > ?crit?: > > De: jonas.adler at epiq.se > Objet: [zeromq-dev] Massive problems running ZMQ on android > ?: zeromq-dev at lists.zeromq.org > Date: Mardi 24 juillet 2012, 16h03 > > Hello, > > I'm new to ZMQ, and trying to get it to run on android. I am however, > facing issue, after issue, after issue. > > I try to follow the official guide, (http://www.zeromq.org/build:android), > and have gotten to the following call on my ubuntu machine: > > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version > > I get this error: > > "configure: error: cannot link with -lzmq" > > I have tried google for a few days now, but i cannot find any solution to > this that works for me. > > Some comments on other solutions i have found, that did not work for me: > > I have installed pretty much every compiler known to man, but if you have > any specific suggestions, please tell me. > I have made no alterations to the source at all, simply following the > instructions to the letter. > > Has someone else had this error? Is there something that is "understood" > in the guide, that i could be missing? > > Any help would be greatly appreciated! > > //Jonas Adler > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From victor at iso3103.net Wed Jul 25 14:05:08 2012 From: victor at iso3103.net (Victor Perron) Date: Wed, 25 Jul 2012 14:05:08 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> Message-ID: OK, I ran the exact same sequence. Seems you are right, I have forgotten a little word on the last configure line. When it fails, the config.log says: 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function `uuid_t': 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to `uuid_generate' 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to `uuid_unparse' 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to `uuid_generate' 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to `uuid_unparse' Well if you recompile jzmq with the line: ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version and everything seems fine. Can you confirm it works ? Best regards, On Wed, Jul 25, 2012 at 1:30 PM, wrote: > Yes, I configured zmq before I tried to configure jzmq. > My OUTPUT_DIR was set to /tmp/zeromq-android before I configured zmq. > > Here's a link to the script I made (from the instructions on > build:android) after redoing the instructions approximate 15 times. > > Worth noting is that I installed the NDK and added the > /opt/android-toolchain/bin to my PATH by hand, the steps i followed are at > the top of this pastebin post. > > http://pastebin.com/iXQWCxNV > > Everything seems to go smooth untill the jzmq config. That is where i get > the "configure: error: cannot link with -lzmq" error. > > Everything I did tried I did with sudo or root access. > > > Did you try to configure zmq or jzmq?The configure command you described > > is command line for jzmq. You need first to have set the env > > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated zmq. > > Then you should be able to launch configure for jzmq. > > Regards. > > > > --- En date de : Mar 24.7.12, jonas.adler at epiq.se > a > > ?crit : > > > > De: jonas.adler at epiq.se > > Objet: [zeromq-dev] Massive problems running ZMQ on android > > ?: zeromq-dev at lists.zeromq.org > > Date: Mardi 24 juillet 2012, 16h03 > > > > Hello, > > > > I'm new to ZMQ, and trying to get it to run on android. I am however, > > facing issue, after issue, after issue. > > > > I try to follow the official guide, (http://www.zeromq.org/build:android > ), > > and have gotten to the following call on my ubuntu machine: > > > > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version > > > > I get this error: > > > > "configure: error: cannot link with -lzmq" > > > > I have tried google for a few days now, but i cannot find any solution to > > this that works for me. > > > > Some comments on other solutions i have found, that did not work for me: > > > > I have installed pretty much every compiler known to man, but if you have > > any specific suggestions, please tell me. > > I have made no alterations to the source at all, simply following the > > instructions to the letter. > > > > Has someone else had this error? Is there something that is "understood" > > in the guide, that i could be missing? > > > > Any help would be greatly appreciated! > > > > //Jonas Adler > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/6d99ac46/attachment.htm From jonas.adler at epiq.se Wed Jul 25 15:17:04 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Wed, 25 Jul 2012 15:17:04 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> Message-ID: <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> I still get the same problem with zmq_init not in -lzmq. some enviroment variables that might be useful: PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games OUTPUT_DIR=/tmp/zeromq-android packages I installed (running ubuntu x86_64 clean install before i tried) was: * libtool, autogen, automake * gcc, gpp, gcc-multilib * libc6-dev * git something I'm missing? The tarball for zmq I downloaded was http://download.zeromq.org/zeromq-2.2.0.tar.gz (with wget into /tmp/. Since the wiki doesn't state where to get it i just took it from the download page) Also here is the config.log file the JZMQ ./config generated (with that LIBS"-luuid" added to the flags, as you can see on line 7) Thanks in advance. > OK, I ran the exact same sequence. Seems you are right, I have forgotten a > little word on the last configure line. > When it fails, the config.log says: > > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function `uuid_t': > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > `uuid_generate' > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > `uuid_unparse' > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > `uuid_generate' > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > `uuid_unparse' > > Well if you recompile jzmq with the line: > > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version > > and everything seems fine. Can you confirm it works ? > > Best regards, > > On Wed, Jul 25, 2012 at 1:30 PM, wrote: > >> Yes, I configured zmq before I tried to configure jzmq. >> My OUTPUT_DIR was set to /tmp/zeromq-android before I configured zmq. >> >> Here's a link to the script I made (from the instructions on >> build:android) after redoing the instructions approximate 15 times. >> >> Worth noting is that I installed the NDK and added the >> /opt/android-toolchain/bin to my PATH by hand, the steps i followed are >> at >> the top of this pastebin post. >> >> http://pastebin.com/iXQWCxNV >> >> Everything seems to go smooth untill the jzmq config. That is where i >> get >> the "configure: error: cannot link with -lzmq" error. >> >> Everything I did tried I did with sudo or root access. >> >> > Did you try to configure zmq or jzmq?The configure command you >> described >> > is command line for jzmq. You need first to have set the env >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated zmq. >> > Then you should be able to launch configure for jzmq. >> > Regards. >> > >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se >> >> a >> > ?crit : >> > >> > De: jonas.adler at epiq.se >> > Objet: [zeromq-dev] Massive problems running ZMQ on android >> > ?: zeromq-dev at lists.zeromq.org >> > Date: Mardi 24 juillet 2012, 16h03 >> > >> > Hello, >> > >> > I'm new to ZMQ, and trying to get it to run on android. I am however, >> > facing issue, after issue, after issue. >> > >> > I try to follow the official guide, >> (http://www.zeromq.org/build:android >> ), >> > and have gotten to the following call on my ubuntu machine: >> > >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version >> > >> > I get this error: >> > >> > "configure: error: cannot link with -lzmq" >> > >> > I have tried google for a few days now, but i cannot find any solution >> to >> > this that works for me. >> > >> > Some comments on other solutions i have found, that did not work for >> me: >> > >> > I have installed pretty much every compiler known to man, but if you >> have >> > any specific suggestions, please tell me. >> > I have made no alterations to the source at all, simply following the >> > instructions to the letter. >> > >> > Has someone else had this error? Is there something that is >> "understood" >> > in the guide, that i could be missing? >> > >> > Any help would be greatly appreciated! >> > >> > //Jonas Adler >> > >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> >> > > > -- > Victor > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From victor at iso3103.net Wed Jul 25 16:13:28 2012 From: victor at iso3103.net (Victor Perron) Date: Wed, 25 Jul 2012 16:13:28 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> Message-ID: Cqn you please send me your config.log ? BR, On Wed, Jul 25, 2012 at 3:17 PM, wrote: > I still get the same problem with zmq_init not in -lzmq. > > some enviroment variables that might be useful: > > > PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games > > OUTPUT_DIR=/tmp/zeromq-android > > packages I installed (running ubuntu x86_64 clean install before i tried) > was: > * libtool, autogen, automake > * gcc, gpp, gcc-multilib > * libc6-dev > * git > > something I'm missing? > > The tarball for zmq I downloaded was > http://download.zeromq.org/zeromq-2.2.0.tar.gz > (with wget into /tmp/. Since the wiki doesn't state where to get it i just > took it from the download page) > > Also here is the config.log file the JZMQ ./config generated (with that > LIBS"-luuid" added to the flags, as you can see on line 7) > > Thanks in advance. > > > OK, I ran the exact same sequence. Seems you are right, I have forgotten > a > > little word on the last configure line. > > When it fails, the config.log says: > > > > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function `uuid_t': > > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > > `uuid_generate' > > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > > `uuid_unparse' > > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > > `uuid_generate' > > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > > `uuid_unparse' > > > > Well if you recompile jzmq with the line: > > > > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version > > > > and everything seems fine. Can you confirm it works ? > > > > Best regards, > > > > On Wed, Jul 25, 2012 at 1:30 PM, wrote: > > > >> Yes, I configured zmq before I tried to configure jzmq. > >> My OUTPUT_DIR was set to /tmp/zeromq-android before I configured zmq. > >> > >> Here's a link to the script I made (from the instructions on > >> build:android) after redoing the instructions approximate 15 times. > >> > >> Worth noting is that I installed the NDK and added the > >> /opt/android-toolchain/bin to my PATH by hand, the steps i followed are > >> at > >> the top of this pastebin post. > >> > >> http://pastebin.com/iXQWCxNV > >> > >> Everything seems to go smooth untill the jzmq config. That is where i > >> get > >> the "configure: error: cannot link with -lzmq" error. > >> > >> Everything I did tried I did with sudo or root access. > >> > >> > Did you try to configure zmq or jzmq?The configure command you > >> described > >> > is command line for jzmq. You need first to have set the env > >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated zmq. > >> > Then you should be able to launch configure for jzmq. > >> > Regards. > >> > > >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se > >> > >> a > >> > ?crit : > >> > > >> > De: jonas.adler at epiq.se > >> > Objet: [zeromq-dev] Massive problems running ZMQ on android > >> > ?: zeromq-dev at lists.zeromq.org > >> > Date: Mardi 24 juillet 2012, 16h03 > >> > > >> > Hello, > >> > > >> > I'm new to ZMQ, and trying to get it to run on android. I am however, > >> > facing issue, after issue, after issue. > >> > > >> > I try to follow the official guide, > >> (http://www.zeromq.org/build:android > >> ), > >> > and have gotten to the following call on my ubuntu machine: > >> > > >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version > >> > > >> > I get this error: > >> > > >> > "configure: error: cannot link with -lzmq" > >> > > >> > I have tried google for a few days now, but i cannot find any solution > >> to > >> > this that works for me. > >> > > >> > Some comments on other solutions i have found, that did not work for > >> me: > >> > > >> > I have installed pretty much every compiler known to man, but if you > >> have > >> > any specific suggestions, please tell me. > >> > I have made no alterations to the source at all, simply following the > >> > instructions to the letter. > >> > > >> > Has someone else had this error? Is there something that is > >> "understood" > >> > in the guide, that i could be missing? > >> > > >> > Any help would be greatly appreciated! > >> > > >> > //Jonas Adler > >> > > >> > _______________________________________________ > >> > zeromq-dev mailing list > >> > zeromq-dev at lists.zeromq.org > >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > _______________________________________________ > >> > zeromq-dev mailing list > >> > zeromq-dev at lists.zeromq.org > >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > >> > >> > > > > > > -- > > Victor > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/ccde4784/attachment.htm From jonas.adler at epiq.se Wed Jul 25 16:20:02 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Wed, 25 Jul 2012 16:20:02 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> Message-ID: Oh i forgot to add the link to the log, I'm sorry :p http://pastebin.com/pWwepPdr > Cqn you please send me your config.log ? > > BR, > > On Wed, Jul 25, 2012 at 3:17 PM, wrote: > >> I still get the same problem with zmq_init not in -lzmq. >> >> some enviroment variables that might be useful: >> >> >> PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games >> >> OUTPUT_DIR=/tmp/zeromq-android >> >> packages I installed (running ubuntu x86_64 clean install before i >> tried) >> was: >> * libtool, autogen, automake >> * gcc, gpp, gcc-multilib >> * libc6-dev >> * git >> >> something I'm missing? >> >> The tarball for zmq I downloaded was >> http://download.zeromq.org/zeromq-2.2.0.tar.gz >> (with wget into /tmp/. Since the wiki doesn't state where to get it i >> just >> took it from the download page) >> >> Also here is the config.log file the JZMQ ./config generated (with that >> LIBS"-luuid" added to the flags, as you can see on line 7) >> >> Thanks in advance. >> >> > OK, I ran the exact same sequence. Seems you are right, I have >> forgotten >> a >> > little word on the last configure line. >> > When it fails, the config.log says: >> > >> > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function >> `uuid_t': >> > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to >> > `uuid_generate' >> > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to >> > `uuid_unparse' >> > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to >> > `uuid_generate' >> > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to >> > `uuid_unparse' >> > >> > Well if you recompile jzmq with the line: >> > >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" >> > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version >> > >> > and everything seems fine. Can you confirm it works ? >> > >> > Best regards, >> > >> > On Wed, Jul 25, 2012 at 1:30 PM, wrote: >> > >> >> Yes, I configured zmq before I tried to configure jzmq. >> >> My OUTPUT_DIR was set to /tmp/zeromq-android before I configured zmq. >> >> >> >> Here's a link to the script I made (from the instructions on >> >> build:android) after redoing the instructions approximate 15 times. >> >> >> >> Worth noting is that I installed the NDK and added the >> >> /opt/android-toolchain/bin to my PATH by hand, the steps i followed >> are >> >> at >> >> the top of this pastebin post. >> >> >> >> http://pastebin.com/iXQWCxNV >> >> >> >> Everything seems to go smooth untill the jzmq config. That is where i >> >> get >> >> the "configure: error: cannot link with -lzmq" error. >> >> >> >> Everything I did tried I did with sudo or root access. >> >> >> >> > Did you try to configure zmq or jzmq?The configure command you >> >> described >> >> > is command line for jzmq. You need first to have set the env >> >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated >> zmq. >> >> > Then you should be able to launch configure for jzmq. >> >> > Regards. >> >> > >> >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se >> >> >> >> a >> >> > ?crit : >> >> > >> >> > De: jonas.adler at epiq.se >> >> > Objet: [zeromq-dev] Massive problems running ZMQ on android >> >> > ?: zeromq-dev at lists.zeromq.org >> >> > Date: Mardi 24 juillet 2012, 16h03 >> >> > >> >> > Hello, >> >> > >> >> > I'm new to ZMQ, and trying to get it to run on android. I am >> however, >> >> > facing issue, after issue, after issue. >> >> > >> >> > I try to follow the official guide, >> >> (http://www.zeromq.org/build:android >> >> ), >> >> > and have gotten to the following call on my ubuntu machine: >> >> > >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" >> >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version >> >> > >> >> > I get this error: >> >> > >> >> > "configure: error: cannot link with -lzmq" >> >> > >> >> > I have tried google for a few days now, but i cannot find any >> solution >> >> to >> >> > this that works for me. >> >> > >> >> > Some comments on other solutions i have found, that did not work >> for >> >> me: >> >> > >> >> > I have installed pretty much every compiler known to man, but if >> you >> >> have >> >> > any specific suggestions, please tell me. >> >> > I have made no alterations to the source at all, simply following >> the >> >> > instructions to the letter. >> >> > >> >> > Has someone else had this error? Is there something that is >> >> "understood" >> >> > in the guide, that i could be missing? >> >> > >> >> > Any help would be greatly appreciated! >> >> > >> >> > //Jonas Adler >> >> > >> >> > _______________________________________________ >> >> > zeromq-dev mailing list >> >> > zeromq-dev at lists.zeromq.org >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > _______________________________________________ >> >> > zeromq-dev mailing list >> >> > zeromq-dev at lists.zeromq.org >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > >> >> >> >> >> > >> > >> > -- >> > Victor >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> >> > > > -- > Victor > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From victor at iso3103.net Wed Jul 25 16:52:18 2012 From: victor at iso3103.net (Victor Perron) Date: Wed, 25 Jul 2012 16:52:18 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> Message-ID: Seems there is an issue in your PATH. From the line 83 (and the others) it looks like the toolchain is not found: configure:3246: checking for arm-linux-androideabi-gcc configure:3276: result: no configure:3286: checking for gcc configure:3302: found /usr/bin/gcc configure:3313: result: gcc ... and so on. In the end the compiler complains about clock_gettime() and pthread_create not found, but that;s an aftereffect of not using the right compiler. Could you check your $PATH ? On Wed, Jul 25, 2012 at 4:20 PM, wrote: > Oh i forgot to add the link to the log, I'm sorry :p > > http://pastebin.com/pWwepPdr > > > Cqn you please send me your config.log ? > > > > BR, > > > > On Wed, Jul 25, 2012 at 3:17 PM, wrote: > > > >> I still get the same problem with zmq_init not in -lzmq. > >> > >> some enviroment variables that might be useful: > >> > >> > >> > PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games > >> > >> OUTPUT_DIR=/tmp/zeromq-android > >> > >> packages I installed (running ubuntu x86_64 clean install before i > >> tried) > >> was: > >> * libtool, autogen, automake > >> * gcc, gpp, gcc-multilib > >> * libc6-dev > >> * git > >> > >> something I'm missing? > >> > >> The tarball for zmq I downloaded was > >> http://download.zeromq.org/zeromq-2.2.0.tar.gz > >> (with wget into /tmp/. Since the wiki doesn't state where to get it i > >> just > >> took it from the download page) > >> > >> Also here is the config.log file the JZMQ ./config generated (with that > >> LIBS"-luuid" added to the flags, as you can see on line 7) > >> > >> Thanks in advance. > >> > >> > OK, I ran the exact same sequence. Seems you are right, I have > >> forgotten > >> a > >> > little word on the last configure line. > >> > When it fails, the config.log says: > >> > > >> > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function > >> `uuid_t': > >> > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > >> > `uuid_generate' > >> > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > >> > `uuid_unparse' > >> > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > >> > `uuid_generate' > >> > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > >> > `uuid_unparse' > >> > > >> > Well if you recompile jzmq with the line: > >> > > >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > >> > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version > >> > > >> > and everything seems fine. Can you confirm it works ? > >> > > >> > Best regards, > >> > > >> > On Wed, Jul 25, 2012 at 1:30 PM, wrote: > >> > > >> >> Yes, I configured zmq before I tried to configure jzmq. > >> >> My OUTPUT_DIR was set to /tmp/zeromq-android before I configured zmq. > >> >> > >> >> Here's a link to the script I made (from the instructions on > >> >> build:android) after redoing the instructions approximate 15 times. > >> >> > >> >> Worth noting is that I installed the NDK and added the > >> >> /opt/android-toolchain/bin to my PATH by hand, the steps i followed > >> are > >> >> at > >> >> the top of this pastebin post. > >> >> > >> >> http://pastebin.com/iXQWCxNV > >> >> > >> >> Everything seems to go smooth untill the jzmq config. That is where i > >> >> get > >> >> the "configure: error: cannot link with -lzmq" error. > >> >> > >> >> Everything I did tried I did with sudo or root access. > >> >> > >> >> > Did you try to configure zmq or jzmq?The configure command you > >> >> described > >> >> > is command line for jzmq. You need first to have set the env > >> >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated > >> zmq. > >> >> > Then you should be able to launch configure for jzmq. > >> >> > Regards. > >> >> > > >> >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se > >> >> > >> >> a > >> >> > ?crit : > >> >> > > >> >> > De: jonas.adler at epiq.se > >> >> > Objet: [zeromq-dev] Massive problems running ZMQ on android > >> >> > ?: zeromq-dev at lists.zeromq.org > >> >> > Date: Mardi 24 juillet 2012, 16h03 > >> >> > > >> >> > Hello, > >> >> > > >> >> > I'm new to ZMQ, and trying to get it to run on android. I am > >> however, > >> >> > facing issue, after issue, after issue. > >> >> > > >> >> > I try to follow the official guide, > >> >> (http://www.zeromq.org/build:android > >> >> ), > >> >> > and have gotten to the following call on my ubuntu machine: > >> >> > > >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > >> >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version > >> >> > > >> >> > I get this error: > >> >> > > >> >> > "configure: error: cannot link with -lzmq" > >> >> > > >> >> > I have tried google for a few days now, but i cannot find any > >> solution > >> >> to > >> >> > this that works for me. > >> >> > > >> >> > Some comments on other solutions i have found, that did not work > >> for > >> >> me: > >> >> > > >> >> > I have installed pretty much every compiler known to man, but if > >> you > >> >> have > >> >> > any specific suggestions, please tell me. > >> >> > I have made no alterations to the source at all, simply following > >> the > >> >> > instructions to the letter. > >> >> > > >> >> > Has someone else had this error? Is there something that is > >> >> "understood" > >> >> > in the guide, that i could be missing? > >> >> > > >> >> > Any help would be greatly appreciated! > >> >> > > >> >> > //Jonas Adler > >> >> > > >> >> > _______________________________________________ > >> >> > zeromq-dev mailing list > >> >> > zeromq-dev at lists.zeromq.org > >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> >> > _______________________________________________ > >> >> > zeromq-dev mailing list > >> >> > zeromq-dev at lists.zeromq.org > >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> >> > > >> >> > >> >> > >> > > >> > > >> > -- > >> > Victor > >> > _______________________________________________ > >> > zeromq-dev mailing list > >> > zeromq-dev at lists.zeromq.org > >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > >> > >> > > > > > > -- > > Victor > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/c3e3ffc5/attachment.htm From mrossi19 at gmail.com Wed Jul 25 18:11:50 2012 From: mrossi19 at gmail.com (Marc Rossi) Date: Wed, 25 Jul 2012 11:11:50 -0500 Subject: [zeromq-dev] Connect with inproc Message-ID: Linux w/ ZMQ 2.2.0 I have a publish function that is called from a thread. This publish function connects an inproc socket with a socket in another thread. Since inproc sockets error on a connect call if the other side isn't setup yet I have the publish functino return without publishing until the connection can be succesfully established. This function publishes a high volume of data and sometimes when the other side of the socket takes a second or two to setup I run into the assertion Too many open files (signaler.cpp:330) when it tries to create a socketpair. Can't find where the socketpair gets cleaned up after deletion. Am I missing something with my approach? Initially tried to reuse created socket instead of deleting/recreating every time but connect would never succeed. TIA Marc zmq::socket *s = NULL; void publish(void *data) { if (s == NULL) { s = new zmq::socket_t(context, ZMQ_PUB); try { s->connect("inproc://test"); } catch (...) { delete s; s = NULL; return; } } // here I publish data on the socket } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/fcc4e494/attachment.htm From lists at chuckremes.com Wed Jul 25 18:45:11 2012 From: lists at chuckremes.com (Chuck Remes) Date: Wed, 25 Jul 2012 11:45:11 -0500 Subject: [zeromq-dev] Connect with inproc In-Reply-To: References: Message-ID: <9852F3B7-D494-4CF6-A996-5DE6D6BEBEB7@chuckremes.com> On Jul 25, 2012, at 11:11 AM, Marc Rossi wrote: > > Linux w/ ZMQ 2.2.0 > > I have a publish function that is called from a thread. This publish > function connects an inproc socket with a socket in another thread. > Since inproc sockets error on a connect call if the other side isn't > setup yet I have the publish functino return without publishing > until the connection can be succesfully established. > > This function publishes a high volume of data and sometimes when the > other side of the socket takes a second or two to setup I run into > the assertion > > Too many open files (signaler.cpp:330) > > when it tries to create a socketpair. Can't find where the socketpair > gets cleaned up after deletion. > > Am I missing something with my approach? Initially tried to reuse > created socket instead of deleting/recreating every time but > connect would never succeed. > Unless there is some delay between attempts, you are probably trying to create and connect that socket hundreds or thousands of times per second until the other thread has completed its setup and called zmq_bind() on the inproc transport. Socket deletion, like everything else in zeromq, is asynchronous. So, while you may have deleted the socket it does not mean that its resources have been reclaimed yet. In a tight enough loop you will run out of file descriptors because the "deleted" sockets are still holding on to unreleased file descriptors while they await their termination. I suggest using a real signaling mechanism (like a condition variable) to indicate that your receiver thread has completed its setup. Only then should you try and create the publish socket and connect it. cr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120725/5908cd4a/attachment.htm From Richard_Newton at waters.com Thu Jul 26 14:31:29 2012 From: Richard_Newton at waters.com (Richard_Newton at waters.com) Date: Thu, 26 Jul 2012 13:31:29 +0100 Subject: [zeromq-dev] [PATCH] [cppzmq] Add move constructor to message_t Message-ID: Hi, In the C++ binding both context_t and socket_t have move constructors, I would like to extend that to message_t as well. (See attached file: Add-move-constructor-to-message_t.patch) This was again the master branch on github, also sent corresponding pull request. Regards, Richard. =========================================================== The information in this email is confidential, and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized and therefore prohibited. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. =========================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120726/361306d0/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: Add-move-constructor-to-message_t.patch Type: application/octet-stream Size: 1034 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120726/361306d0/attachment.obj From linkfanel at yahoo.fr Thu Jul 26 17:27:30 2012 From: linkfanel at yahoo.fr (Pierre Ynard) Date: Thu, 26 Jul 2012 17:27:30 +0200 Subject: [zeromq-dev] ZMQ_MCAST_LOOP with PGM Message-ID: <20120726152730.GA16824@via.ecp.fr> Hello, I took notice of https://zeromq.jira.com/browse/LIBZMQ-104 and of the removal of this option, but I have trouble understanding the issue. Even after reading http://lists.zeromq.org/pipermail/zeromq-dev/2010-June/004133.html I don't get it. > unicast packets are not broadcast to all listening sockets hence > back channel communication is only functional to the first opened > transport. Are we talking sender or receiver side of the transport here? What is specific to loopback with this? Isn't it impossible to have several sockets listening on the same unicast address anyway? Anyway, is it safe to enable this option if I don't mind about reliability? -- Pierre Ynard "Une ?me dans un corps, c'est comme un dessin sur une feuille de papier." From ian.barber at gmail.com Thu Jul 26 17:35:10 2012 From: ian.barber at gmail.com (Ian Barber) Date: Thu, 26 Jul 2012 16:35:10 +0100 Subject: [zeromq-dev] ZMQ_MCAST_LOOP with PGM In-Reply-To: <20120726152730.GA16824@via.ecp.fr> References: <20120726152730.GA16824@via.ecp.fr> Message-ID: On Thu, Jul 26, 2012 at 4:27 PM, Pierre Ynard wrote: > > Anyway, is it safe to enable this option if I don't mind about > reliability? > I'm sure Steve can give a better answer, but basically multicast loopback just doesn't work very well at all, and causes a lot of confusion among people trying out PGM. Ian From steven.mccoy at miru.hk Thu Jul 26 20:27:15 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Thu, 26 Jul 2012 14:27:15 -0400 Subject: [zeromq-dev] ZMQ_MCAST_LOOP with PGM In-Reply-To: References: <20120726152730.GA16824@via.ecp.fr> Message-ID: On 26 July 2012 11:35, Ian Barber wrote: > On Thu, Jul 26, 2012 at 4:27 PM, Pierre Ynard wrote: > > > > > Anyway, is it safe to enable this option if I don't mind about > > reliability? > > > > I'm sure Steve can give a better answer, but basically multicast > loopback just doesn't work very well at all, and causes a lot of > confusion among people trying out PGM. > > It can work well in a restricted environment, the disruptor team have shown great performance with Java and multicast loop but with the PGM protocol specifically there are problems and limitations that can break reliability. From steven.mccoy at miru.hk Fri Jul 27 03:54:10 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Thu, 26 Jul 2012 21:54:10 -0400 Subject: [zeromq-dev] Build errors with Win64 on CZMQ Message-ID: Looks like the code is not both C99 and C++2003 compliant: C:\temp\czmq-1.1.0\src\zhash.c(131) : warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details. c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\string.h(238) : see declaration of 'strdup' C:\temp\czmq-1.1.0\src\zmsg.c(179) : error C2440: 'initializing' : cannot convert from 'void *' to 'zframe_t *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast C:\temp\czmq-1.1.0\src\zmsg.c(462) : error C2440: '=' : cannot convert from 'void *' to 'byte *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast C:\temp\czmq-1.1.0\src\zmsg.c(680) : error C2440: 'initializing' : cannot convert from 'void *' to 'byte *' Conversion from 'void*' to pointer to non-'void' requires an explicit cast -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120726/5459d08c/attachment.htm From steven.mccoy at miru.hk Fri Jul 27 04:38:27 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Thu, 26 Jul 2012 22:38:27 -0400 Subject: [zeromq-dev] Build errors with Win64 on CZMQ In-Reply-To: References: Message-ID: I found a ssize_t in there too, Windows only has SSIZE_T. -- Steve-o On 26 July 2012 21:54, Steven McCoy wrote: > Looks like the code is not both C99 and C++2003 compliant: > > C:\temp\czmq-1.1.0\src\zhash.c(131) : warning C4996: 'strdup': The POSIX > name for this item is deprecated. Instead, use the ISO C++ conformant name: > _strdup. See online help for details. > c:\Program Files (x86)\Microsoft Visual Studio > 10.0\VC\INCLUDE\string.h(238) : see declaration of 'strdup' > C:\temp\czmq-1.1.0\src\zmsg.c(179) : error C2440: 'initializing' : cannot > convert from 'void *' to 'zframe_t *' > Conversion from 'void*' to pointer to non-'void' requires an > explicit cast > C:\temp\czmq-1.1.0\src\zmsg.c(462) : error C2440: '=' : cannot convert > from 'void *' to 'byte *' > Conversion from 'void*' to pointer to non-'void' requires an > explicit cast > C:\temp\czmq-1.1.0\src\zmsg.c(680) : error C2440: 'initializing' : cannot > convert from 'void *' to 'byte *' > Conversion from 'void*' to pointer to non-'void' requires an > explicit cast > > -- > Steve-o > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120726/9c509365/attachment.htm From finalguy at gmail.com Thu Jul 26 04:50:23 2012 From: finalguy at gmail.com (Ming Ji) Date: Wed, 25 Jul 2012 21:50:23 -0500 Subject: [zeromq-dev] Question about constness Message-ID: <5010B06F.1080506@gmail.com> I was wrong that zmq_msg_copy does not destroy the original message. It just does a shadow copy. Still it is better to indicate if the functions might change the original message at API level. From ivan at blackpx.com Thu Jul 26 21:29:53 2012 From: ivan at blackpx.com (Ivan Figueredo) Date: Thu, 26 Jul 2012 14:29:53 -0500 Subject: [zeromq-dev] If not Majordomo for asynchronous workers, then what? Message-ID: I am writing a distributed trading manager. There are many different liquidity providers, and the client would like to route to a given exchange. With this in mind, I thought that using the Majordomo pattern with a broker in between clients and workers asking a particular [named] worker to do its work. However at least as I understand it, Majordomo won't work in this scenario. Let's take the FIX protocol. Since FIX is asynchronous, I believe I can't use the Majordomo. You may send an order to a FIX engine, and that one order may send back many different messages. For example, that one order may see the following responses: Insert, Pending, New, Partial Fill, then finally Fill. In the Majordomo pattern, a section of code in the worker looks like this mdwrk session ("tcp://localhost:5555", sourceStr.c_str(), verbose); zmsg *reply = 0; while (1) { zmsg *request = session.recv (reply); if (request == 0) { break; // Worker was interrupted } //reply = request; // Echo is complex... :-) reply = new zmsg(sourceStr.c_str()); } This assumes one request, and one reply. Since my application is not strictly a single request, that gets a single response as in the code above, do I have to drop Majordomo ? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120726/2ba529a6/attachment.htm From ph at imatix.com Fri Jul 27 07:58:24 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 27 Jul 2012 08:58:24 +0300 Subject: [zeromq-dev] [PATCH] tests: getting rid of warnings when build with NDEBUG. In-Reply-To: <1343049340.16350.16.camel@vivanov> References: <1343049340.16350.16.camel@vivanov> Message-ID: Hi Vitally, Can you send any patch to 2.2 as a pull request, with a corresponding issue in the issue tracker? Thanks a lot Pieter On Mon, Jul 23, 2012 at 4:15 PM, Vitaliy Ivanov wrote: > Hi, > > ZMQ tree 2-x. > I didn't use ZMQ_ASSERT as tests are not using this macro. > > Vitaliy > > ---------------------------------------------------------------------- > > >From 12e7514e9c076f35cd525fee5f2c68a1228e53f2 Mon Sep 17 00:00:00 2001 > From: Vitaliy Ivanov > Date: Mon, 23 Jul 2012 16:06:13 +0300 > Subject: [PATCH] tests: getting rid of warnings when build with NDEBUG. > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > Correcting the following warnings when build in non asserts mode: > a. > testutil.hpp: In function ?void zmqtestutil::basic_tests(const char*, int, int)?: > testutil.hpp:114: error: unused variable ?rc? > b. > test_hwm.cpp: In function ?int main(int, char**)?: > test_hwm.cpp:47: error: unused variable ?sent? > test_hwm.cpp:60: error: unused variable ?received? > test_hwm.cpp:64: error: unused variable ?sent? > > Signed-off-by: Vitaliy Ivanov > --- > tests/test_hwm.cpp | 17 +++++++++-------- > tests/test_timeo.cpp | 4 ++-- > tests/testutil.hpp | 17 +++++++++-------- > 3 files changed, 20 insertions(+), 18 deletions(-) > > diff --git a/tests/test_hwm.cpp b/tests/test_hwm.cpp > index d73c25f..e1fcec2 100644 > --- a/tests/test_hwm.cpp > +++ b/tests/test_hwm.cpp > @@ -28,6 +28,7 @@ int main (int argc, char *argv []) > { > uint64_t hwm = 5; > int linger = 0; > + bool rc; > > zmq::context_t context (1); > zmq::socket_t s1 (context, ZMQ_PULL); > @@ -44,25 +45,25 @@ int main (int argc, char *argv []) > zmq::message_t msg (sizeof ("test") - 1); > memcpy (msg.data (), "test", sizeof ("test") - 1); > > - bool sent = s2.send (msg, ZMQ_NOBLOCK); > + rc = s2.send (msg, ZMQ_NOBLOCK); > > // Anything below HWM should be sent > if (i < 5) { > - assert (sent); > + assert (rc); > } else { > - assert (!sent && errno == EAGAIN); > + assert (!rc && errno == EAGAIN); > } > } > > // There should be now 5 messages pending, consume one > zmq::message_t msg; > > - bool received = s1.recv (&msg, 0); > - assert (received); > + rc = s1.recv (&msg, 0); > + assert (rc); > > // Now it should be possible to send one more > - bool sent = s2.send (msg, 0); > - assert (sent); > + rc = s2.send (msg, 0); > + assert (rc); > > - return 0; > + return 0; > } > diff --git a/tests/test_timeo.cpp b/tests/test_timeo.cpp > index b9cd512..251972e 100644 > --- a/tests/test_timeo.cpp > +++ b/tests/test_timeo.cpp > @@ -107,7 +107,7 @@ int main (int argc, char *argv []) > memcpy (zmq_msg_data (&msg), "12345678ABCDEFGH12345678abcdefgh", 32); > rc = zmq_send (sc, &msg, 0); > assert (rc == 0); > - > + > rc = zmq_recv (sb, &msg, 0); > assert (rc == 0); > assert (32 == zmq_msg_size(&msg)); > @@ -120,6 +120,6 @@ int main (int argc, char *argv []) > rc = zmq_term (ctx); > assert (rc == 0); > > - return 0 ; > + return 0; > } > > diff --git a/tests/testutil.hpp b/tests/testutil.hpp > index 7f182c1..550ecf0 100644 > --- a/tests/testutil.hpp > +++ b/tests/testutil.hpp > @@ -30,8 +30,7 @@ > > namespace zmqtestutil > { > - > - using namespace std ; > + using namespace std; > > typedef std::pair socket_pair; > > @@ -68,7 +67,7 @@ namespace zmqtestutil > s2.send (pong, 0); > > // Return received data as std::string. > - return ret ; > + return ret; > } > > /* Run basic tests for the given transport. > @@ -79,6 +78,8 @@ namespace zmqtestutil > */ > void basic_tests (const char *transport_, int t1_, int t2_) > { > + int rc = 0; > + string returned; > zmq::context_t context (1); > > zmq::pollitem_t items [2]; > @@ -88,7 +89,7 @@ namespace zmqtestutil > const string expect ("XXX"); > > { > - const string returned = zmqtestutil::ping_pong (p, expect); > + returned = zmqtestutil::ping_pong (p, expect); > assert (expect == returned); > > // Adjust socket state so that poll shows only 1 pending message. > @@ -97,7 +98,7 @@ namespace zmqtestutil > } > > { > - // Now poll is used to singal that a message is ready to read. > + // Now poll is used to signal that a message is ready to read. > zmq::message_t m1 (expect.size ()); > memcpy (m1.data (), expect.c_str (), expect.size ()); > items [0].socket = *p.first; > @@ -111,14 +112,14 @@ namespace zmqtestutil > > p.first->send (m1, 0); > > - int rc = zmq::poll (&items [0], 2, -1); > + rc = zmq::poll (&items [0], 2, -1); > assert (rc == 1); > assert ((items [1].revents & ZMQ_POLLIN) != 0); > > zmq::message_t m2; > p.second->recv (&m2, 0); > - const string ret ((char*) m2.data (), m2.size ()); > - assert (expect == ret); > + returned = string((char*) m2.data (), m2.size ()); > + assert (expect == returned); > } > > // Delete sockets. > -- > 1.7.0.4 > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From ph at imatix.com Fri Jul 27 08:33:08 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 27 Jul 2012 09:33:08 +0300 Subject: [zeromq-dev] Question about constness In-Reply-To: References: <500E28F6.1040608@gmail.com> Message-ID: On Tue, Jul 24, 2012 at 4:23 PM, Sebastian Lauwers wrote: > Checking the zeromq 3.2 RC [1], I see this still hasn't been > applied---I don't know what the project's policy would be regarding > "breaking" the 3.2 API after the first RC has been released. > Constness is used a handful of times in zmq.h. Breaking the C API is a bad idea, no matter what the version numbering. I'd suggest leaving the C API as is, and improving the C++ API (in https://github.com/zeromq/cppzmq). -Pieter From sebastian.lauwers at gmail.com Fri Jul 27 08:56:40 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Fri, 27 Jul 2012 08:56:40 +0200 Subject: [zeromq-dev] Question about constness In-Reply-To: References: <500E28F6.1040608@gmail.com> Message-ID: <50123BA8.3080806@gmail.com> On 27/07/12 08:33, Pieter Hintjens wrote: > I'd suggest leaving the C API as is, and improving the C++ API (in > https://github.com/zeromq/cppzmq). Very well, I'll try to provide a patch tomorrow. -S. From ph at imatix.com Fri Jul 27 09:03:26 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 27 Jul 2012 10:03:26 +0300 Subject: [zeromq-dev] [PATCH] [cppzmq] Add move constructor to message_t In-Reply-To: References: Message-ID: Hi Richard, The process for contributions is described here: http://www.zeromq.org/docs:contributing Basically you want to make github pull requests against the cppzmq project. -Pieter On Thu, Jul 26, 2012 at 3:31 PM, wrote: > Hi, > > In the C++ binding both context_t and socket_t have move constructors, I > would like to extend that to message_t as well. > > > (See attached file: Add-move-constructor-to-message_t.patch) > > This was again the master branch on github, also sent corresponding pull > request. > > Regards, > > Richard. > > =========================================================== > The information in this email is confidential, and is intended solely for > the addressee(s). > Access to this email by anyone else is unauthorized and therefore > prohibited. If you are > not the intended recipient you are notified that disclosing, copying, > distributing or taking > any action in reliance on the contents of this information is strictly > prohibited and may be unlawful. > =========================================================== > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From ph at imatix.com Fri Jul 27 09:07:33 2012 From: ph at imatix.com (Pieter Hintjens) Date: Fri, 27 Jul 2012 10:07:33 +0300 Subject: [zeromq-dev] If not Majordomo for asynchronous workers, then what? In-Reply-To: References: Message-ID: Hi Ivan, Majordomo is based on a 1-to-1 request-reply model for workers, yes. You should be able to quite easily modify MDP to allow multiple replies, perhaps by adding a "there's more coming" indicator to replies that the broker uses to route several replies back to the same client. Modifying MDP and the implementations will be simpler than writing your own from scratch. You can also use other architectures; MDP is specifically aimed at allowing multiple redundant workers per service type. If you have a single well-known gateway per exchange you can just connect each client to each exchange gateway directly and work fully asynchronously. -Pieter On Thu, Jul 26, 2012 at 10:29 PM, Ivan Figueredo wrote: > I am writing a distributed trading manager. There are many different > liquidity providers, and the client would like to route to a given exchange. > With this in mind, I thought that using the Majordomo pattern with a broker > in between clients and workers asking a particular [named] worker to do its > work. However at least as I understand it, Majordomo won't work in this > scenario. > > Let's take the FIX protocol. Since FIX is asynchronous, I believe I can't > use the Majordomo. You may send an order to a FIX engine, and that one order > may send back many different messages. For example, that one order may see > the following responses: Insert, Pending, New, Partial Fill, then finally > Fill. > > In the Majordomo pattern, a section of code in the worker looks like this > > mdwrk session ("tcp://localhost:5555", sourceStr.c_str(), verbose); > > zmsg *reply = 0; > while (1) { > zmsg *request = session.recv (reply); > if (request == 0) { > break; // Worker was interrupted > } > > //reply = request; // Echo is complex... :-) > reply = new zmsg(sourceStr.c_str()); > } > > > This assumes one request, and one reply. Since my application is not > strictly a single request, that gets a single response as in the code above, > do I have to drop Majordomo ? > > > Thanks! > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From jonas.adler at epiq.se Fri Jul 27 09:08:39 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Fri, 27 Jul 2012 09:08:39 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> Message-ID: <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> If i manually type in "arm-linux-androideabi-" and press tab twice i get a list of all the compilers (gcc, g++ etc), so it must be in my path. Also the command "arm-linux-androideabi-gcc" is executable. > Seems there is an issue in your PATH. From the line 83 (and the others) it > looks like the toolchain is not found: > > configure:3246: checking for arm-linux-androideabi-gcc > configure:3276: result: no > configure:3286: checking for gcc > configure:3302: found /usr/bin/gcc > configure:3313: result: gcc > > ... and so on. In the end the compiler complains about clock_gettime() and > pthread_create not found, but that;s an aftereffect of not using the right > compiler. > > Could you check your $PATH ? > > On Wed, Jul 25, 2012 at 4:20 PM, wrote: > >> Oh i forgot to add the link to the log, I'm sorry :p >> >> http://pastebin.com/pWwepPdr >> >> > Cqn you please send me your config.log ? >> > >> > BR, >> > >> > On Wed, Jul 25, 2012 at 3:17 PM, wrote: >> > >> >> I still get the same problem with zmq_init not in -lzmq. >> >> >> >> some enviroment variables that might be useful: >> >> >> >> >> >> >> PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games >> >> >> >> OUTPUT_DIR=/tmp/zeromq-android >> >> >> >> packages I installed (running ubuntu x86_64 clean install before i >> >> tried) >> >> was: >> >> * libtool, autogen, automake >> >> * gcc, gpp, gcc-multilib >> >> * libc6-dev >> >> * git >> >> >> >> something I'm missing? >> >> >> >> The tarball for zmq I downloaded was >> >> http://download.zeromq.org/zeromq-2.2.0.tar.gz >> >> (with wget into /tmp/. Since the wiki doesn't state where to get it i >> >> just >> >> took it from the download page) >> >> >> >> Also here is the config.log file the JZMQ ./config generated (with >> that >> >> LIBS"-luuid" added to the flags, as you can see on line 7) >> >> >> >> Thanks in advance. >> >> >> >> > OK, I ran the exact same sequence. Seems you are right, I have >> >> forgotten >> >> a >> >> > little word on the last configure line. >> >> > When it fails, the config.log says: >> >> > >> >> > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function >> >> `uuid_t': >> >> > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to >> >> > `uuid_generate' >> >> > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to >> >> > `uuid_unparse' >> >> > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to >> >> > `uuid_generate' >> >> > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to >> >> > `uuid_unparse' >> >> > >> >> > Well if you recompile jzmq with the line: >> >> > >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" >> >> > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version >> >> > >> >> > and everything seems fine. Can you confirm it works ? >> >> > >> >> > Best regards, >> >> > >> >> > On Wed, Jul 25, 2012 at 1:30 PM, wrote: >> >> > >> >> >> Yes, I configured zmq before I tried to configure jzmq. >> >> >> My OUTPUT_DIR was set to /tmp/zeromq-android before I configured >> zmq. >> >> >> >> >> >> Here's a link to the script I made (from the instructions on >> >> >> build:android) after redoing the instructions approximate 15 >> times. >> >> >> >> >> >> Worth noting is that I installed the NDK and added the >> >> >> /opt/android-toolchain/bin to my PATH by hand, the steps i >> followed >> >> are >> >> >> at >> >> >> the top of this pastebin post. >> >> >> >> >> >> http://pastebin.com/iXQWCxNV >> >> >> >> >> >> Everything seems to go smooth untill the jzmq config. That is >> where i >> >> >> get >> >> >> the "configure: error: cannot link with -lzmq" error. >> >> >> >> >> >> Everything I did tried I did with sudo or root access. >> >> >> >> >> >> > Did you try to configure zmq or jzmq?The configure command you >> >> >> described >> >> >> > is command line for jzmq. You need first to have set the env >> >> >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated >> >> zmq. >> >> >> > Then you should be able to launch configure for jzmq. >> >> >> > Regards. >> >> >> > >> >> >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se >> >> >> >> >> >> a >> >> >> > ?crit : >> >> >> > >> >> >> > De: jonas.adler at epiq.se >> >> >> > Objet: [zeromq-dev] Massive problems running ZMQ on android >> >> >> > ?: zeromq-dev at lists.zeromq.org >> >> >> > Date: Mardi 24 juillet 2012, 16h03 >> >> >> > >> >> >> > Hello, >> >> >> > >> >> >> > I'm new to ZMQ, and trying to get it to run on android. I am >> >> however, >> >> >> > facing issue, after issue, after issue. >> >> >> > >> >> >> > I try to follow the official guide, >> >> >> (http://www.zeromq.org/build:android >> >> >> ), >> >> >> > and have gotten to the following call on my ubuntu machine: >> >> >> > >> >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" >> >> >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version >> >> >> > >> >> >> > I get this error: >> >> >> > >> >> >> > "configure: error: cannot link with -lzmq" >> >> >> > >> >> >> > I have tried google for a few days now, but i cannot find any >> >> solution >> >> >> to >> >> >> > this that works for me. >> >> >> > >> >> >> > Some comments on other solutions i have found, that did not work >> >> for >> >> >> me: >> >> >> > >> >> >> > I have installed pretty much every compiler known to man, but if >> >> you >> >> >> have >> >> >> > any specific suggestions, please tell me. >> >> >> > I have made no alterations to the source at all, simply >> following >> >> the >> >> >> > instructions to the letter. >> >> >> > >> >> >> > Has someone else had this error? Is there something that is >> >> >> "understood" >> >> >> > in the guide, that i could be missing? >> >> >> > >> >> >> > Any help would be greatly appreciated! >> >> >> > >> >> >> > //Jonas Adler >> >> >> > >> >> >> > _______________________________________________ >> >> >> > zeromq-dev mailing list >> >> >> > zeromq-dev at lists.zeromq.org >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> > _______________________________________________ >> >> >> > zeromq-dev mailing list >> >> >> > zeromq-dev at lists.zeromq.org >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> > >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > Victor >> >> > _______________________________________________ >> >> > zeromq-dev mailing list >> >> > zeromq-dev at lists.zeromq.org >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > >> >> >> >> >> > >> > >> > -- >> > Victor >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> >> >> > > > -- > Victor > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From victor at iso3103.net Fri Jul 27 09:30:21 2012 From: victor at iso3103.net (Victor Perron) Date: Fri, 27 Jul 2012 09:30:21 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> Message-ID: I don't know what happens then with your configuration. Again, from your config.log: 1. 2. PATH: /usr/local/sbin 3. PATH: /usr/local/bin 4. PATH: /usr/sbin 5. PATH: /usr/bin 6. PATH: /sbin 7. PATH: /bin 8. 9. 10. ## ----------- ## 11. ## Core tests. ## 12. ## ----------- ## 13. 14. configure:2454: checking for a BSD-compatible install 15. configure:2522: result: /usr/bin/install -c 16. configure:2533: checking whether build environment is sane 17. configure:2583: result: yes 18. *configure:2632: checking for arm-linux-androideabi-strip* 19. *configure:2662: result: no* 20. configure:2672: checking for strip 21. configure:2688: found /usr/bin/strip 22. configure:2699: result: strip 23. configure:2724: checking for a thread-safe mkdir -p 24. configure:2763: result: /bin/mkdir -p 25. configure:2776: checking for gawk 26. configure:2806: result: no 27. configure:2776: checking for mawk 28. configure:2792: found /usr/bin/mawk 29. configure:2803: result: mawk 30. configure:2814: checking whether make sets $(MAKE) 31. configure:2836: result: yes 32. configure:2911: checking how to create a ustar tar archive 33. configure:2924: tar --version 34. tar (GNU tar) 1.26 35. Copyright (C) 2011 Free Software Foundation, Inc. 36. License GPLv3+: GNU GPL version 3 or later < http://gnu.org/licenses/gpl.html>. 37. This is free software: you are free to change and redistribute it. 38. There is NO WARRANTY, to the extent permitted by law. 39. 40. Written by John Gilmore and Jay Fenlason. 41. configure:2927: $? = 0 42. configure:2967: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar 43. configure:2970: $? = 0 44. configure:2974: tar -xf - &5 62. gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 63. Copyright (C) 2011 Free Software Foundation, Inc. 64. This is free software; see the source for copying conditions. There is NO 65. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 66. My config.log with the exact same autogen/configure/... suite : PATH: /opt/swig-2.0.7/bin PATH: /home/victor/work/bin/arm-linux-androideabi-4.4.3/bin PATH: /home/victor/work/bin/apache-maven-3.0.4/bin PATH: /home/victor/work/bin/jdk1.6.0_30/bin PATH: /home/victor/work/bin/android-ndk-r8 PATH: /home/victor/work/bin/android-sdk-linux/tools PATH: /home/victor/work/bin/android-sdk-linux/platform-tools PATH: /home/victor/work/bin/eclipse PATH: /home/victor/bin PATH: /home/victor/work/bin PATH: /home/victor/bin PATH: /usr/local/sbin PATH: /usr/local/bin PATH: /usr/sbin PATH: /usr/bin PATH: /sbin PATH: /bin PATH: /usr/games ## ----------- ## ## Core tests. ## ## ----------- ## configure:2454: checking for a BSD-compatible install configure:2522: result: /usr/bin/install -c configure:2533: checking whether build environment is sane configure:2583: result: yes configure:2632: checking for arm-linux-androideabi-strip configure:2648: found /home/victor/work/bin/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-strip configure:2659: result: arm-linux-androideabi-strip configure:2724: checking for a thread-safe mkdir -p configure:2763: result: /bin/mkdir -p configure:2776: checking for gawk configure:2792: found /usr/bin/gawk configure:2803: result: gawk configure:2814: checking whether make sets $(MAKE) configure:2836: result: yes configure:2911: checking how to create a ustar tar archive configure:2924: tar --version tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by John Gilmore and Jay Fenlason. configure:2927: $? = 0 configure:2967: tardir=conftest.dir && eval tar --format=ustar -chf - "$tardir" >conftest.tar configure:2970: $? = 0 configure:2974: tar -xf - &5 arm-linux-androideabi-gcc (GCC) 4.4.3 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. That is quite a difference ! :) On Fri, Jul 27, 2012 at 9:08 AM, wrote: > If i manually type in "arm-linux-androideabi-" and press tab twice i get a > list of all the compilers (gcc, g++ etc), so it must be in my path. > > Also the command "arm-linux-androideabi-gcc" is executable. > > > Seems there is an issue in your PATH. From the line 83 (and the others) > it > > looks like the toolchain is not found: > > > > configure:3246: checking for arm-linux-androideabi-gcc > > configure:3276: result: no > > configure:3286: checking for gcc > > configure:3302: found /usr/bin/gcc > > configure:3313: result: gcc > > > > ... and so on. In the end the compiler complains about clock_gettime() > and > > pthread_create not found, but that;s an aftereffect of not using the > right > > compiler. > > > > Could you check your $PATH ? > > > > On Wed, Jul 25, 2012 at 4:20 PM, wrote: > > > >> Oh i forgot to add the link to the log, I'm sorry :p > >> > >> http://pastebin.com/pWwepPdr > >> > >> > Cqn you please send me your config.log ? > >> > > >> > BR, > >> > > >> > On Wed, Jul 25, 2012 at 3:17 PM, wrote: > >> > > >> >> I still get the same problem with zmq_init not in -lzmq. > >> >> > >> >> some enviroment variables that might be useful: > >> >> > >> >> > >> >> > >> > PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games > >> >> > >> >> OUTPUT_DIR=/tmp/zeromq-android > >> >> > >> >> packages I installed (running ubuntu x86_64 clean install before i > >> >> tried) > >> >> was: > >> >> * libtool, autogen, automake > >> >> * gcc, gpp, gcc-multilib > >> >> * libc6-dev > >> >> * git > >> >> > >> >> something I'm missing? > >> >> > >> >> The tarball for zmq I downloaded was > >> >> http://download.zeromq.org/zeromq-2.2.0.tar.gz > >> >> (with wget into /tmp/. Since the wiki doesn't state where to get it i > >> >> just > >> >> took it from the download page) > >> >> > >> >> Also here is the config.log file the JZMQ ./config generated (with > >> that > >> >> LIBS"-luuid" added to the flags, as you can see on line 7) > >> >> > >> >> Thanks in advance. > >> >> > >> >> > OK, I ran the exact same sequence. Seems you are right, I have > >> >> forgotten > >> >> a > >> >> > little word on the last configure line. > >> >> > When it fails, the config.log says: > >> >> > > >> >> > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function > >> >> `uuid_t': > >> >> > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > >> >> > `uuid_generate' > >> >> > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > >> >> > `uuid_unparse' > >> >> > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to > >> >> > `uuid_generate' > >> >> > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to > >> >> > `uuid_unparse' > >> >> > > >> >> > Well if you recompile jzmq with the line: > >> >> > > >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > >> >> > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version > >> >> > > >> >> > and everything seems fine. Can you confirm it works ? > >> >> > > >> >> > Best regards, > >> >> > > >> >> > On Wed, Jul 25, 2012 at 1:30 PM, wrote: > >> >> > > >> >> >> Yes, I configured zmq before I tried to configure jzmq. > >> >> >> My OUTPUT_DIR was set to /tmp/zeromq-android before I configured > >> zmq. > >> >> >> > >> >> >> Here's a link to the script I made (from the instructions on > >> >> >> build:android) after redoing the instructions approximate 15 > >> times. > >> >> >> > >> >> >> Worth noting is that I installed the NDK and added the > >> >> >> /opt/android-toolchain/bin to my PATH by hand, the steps i > >> followed > >> >> are > >> >> >> at > >> >> >> the top of this pastebin post. > >> >> >> > >> >> >> http://pastebin.com/iXQWCxNV > >> >> >> > >> >> >> Everything seems to go smooth untill the jzmq config. That is > >> where i > >> >> >> get > >> >> >> the "configure: error: cannot link with -lzmq" error. > >> >> >> > >> >> >> Everything I did tried I did with sudo or root access. > >> >> >> > >> >> >> > Did you try to configure zmq or jzmq?The configure command you > >> >> >> described > >> >> >> > is command line for jzmq. You need first to have set the env > >> >> >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have generated > >> >> zmq. > >> >> >> > Then you should be able to launch configure for jzmq. > >> >> >> > Regards. > >> >> >> > > >> >> >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se > >> >> >> > >> >> >> a > >> >> >> > ?crit : > >> >> >> > > >> >> >> > De: jonas.adler at epiq.se > >> >> >> > Objet: [zeromq-dev] Massive problems running ZMQ on android > >> >> >> > ?: zeromq-dev at lists.zeromq.org > >> >> >> > Date: Mardi 24 juillet 2012, 16h03 > >> >> >> > > >> >> >> > Hello, > >> >> >> > > >> >> >> > I'm new to ZMQ, and trying to get it to run on android. I am > >> >> however, > >> >> >> > facing issue, after issue, after issue. > >> >> >> > > >> >> >> > I try to follow the official guide, > >> >> >> (http://www.zeromq.org/build:android > >> >> >> ), > >> >> >> > and have gotten to the following call on my ubuntu machine: > >> >> >> > > >> >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR > >> >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" > >> >> >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version > >> >> >> > > >> >> >> > I get this error: > >> >> >> > > >> >> >> > "configure: error: cannot link with -lzmq" > >> >> >> > > >> >> >> > I have tried google for a few days now, but i cannot find any > >> >> solution > >> >> >> to > >> >> >> > this that works for me. > >> >> >> > > >> >> >> > Some comments on other solutions i have found, that did not work > >> >> for > >> >> >> me: > >> >> >> > > >> >> >> > I have installed pretty much every compiler known to man, but if > >> >> you > >> >> >> have > >> >> >> > any specific suggestions, please tell me. > >> >> >> > I have made no alterations to the source at all, simply > >> following > >> >> the > >> >> >> > instructions to the letter. > >> >> >> > > >> >> >> > Has someone else had this error? Is there something that is > >> >> >> "understood" > >> >> >> > in the guide, that i could be missing? > >> >> >> > > >> >> >> > Any help would be greatly appreciated! > >> >> >> > > >> >> >> > //Jonas Adler > >> >> >> > > >> >> >> > _______________________________________________ > >> >> >> > zeromq-dev mailing list > >> >> >> > zeromq-dev at lists.zeromq.org > >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> >> >> > _______________________________________________ > >> >> >> > zeromq-dev mailing list > >> >> >> > zeromq-dev at lists.zeromq.org > >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> >> >> > > >> >> >> > >> >> >> > >> >> > > >> >> > > >> >> > -- > >> >> > Victor > >> >> > _______________________________________________ > >> >> > zeromq-dev mailing list > >> >> > zeromq-dev at lists.zeromq.org > >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> >> > > >> >> > >> >> > >> > > >> > > >> > -- > >> > Victor > >> > _______________________________________________ > >> > zeromq-dev mailing list > >> > zeromq-dev at lists.zeromq.org > >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > >> > >> > >> > > > > > > -- > > Victor > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/293132e7/attachment.htm From jonas.adler at epiq.se Fri Jul 27 09:43:54 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Fri, 27 Jul 2012 09:43:54 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> Message-ID: I think i've found something. If I use sudo i get that arm-linux-androideabi-gcc isnt found, but when i dont use sudo and it is found, i get "C compiler cannot create executables"... arm-linux-androideabi-gcc -> works sudo arm-linux-androideabi-gcc -> command not found > I don't know what happens then with your configuration. Again, from your > config.log: > > 1. > 2. PATH: /usr/local/sbin > 3. PATH: /usr/local/bin > 4. PATH: /usr/sbin > 5. PATH: /usr/bin > 6. PATH: /sbin > 7. PATH: /bin > 8. > 9. > 10. ## ----------- ## > 11. ## Core tests. ## > 12. ## ----------- ## > 13. > 14. configure:2454: checking for a BSD-compatible install > 15. configure:2522: result: /usr/bin/install -c > 16. configure:2533: checking whether build environment is sane > 17. configure:2583: result: yes > 18. *configure:2632: checking for arm-linux-androideabi-strip* > 19. *configure:2662: result: no* > 20. configure:2672: checking for strip > 21. configure:2688: found /usr/bin/strip > 22. configure:2699: result: strip > 23. configure:2724: checking for a thread-safe mkdir -p > 24. configure:2763: result: /bin/mkdir -p > 25. configure:2776: checking for gawk > 26. configure:2806: result: no > 27. configure:2776: checking for mawk > 28. configure:2792: found /usr/bin/mawk > 29. configure:2803: result: mawk > 30. configure:2814: checking whether make sets $(MAKE) > 31. configure:2836: result: yes > 32. configure:2911: checking how to create a ustar tar archive > 33. configure:2924: tar --version > 34. tar (GNU tar) 1.26 > 35. Copyright (C) 2011 Free Software Foundation, Inc. > 36. License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html>. > 37. This is free software: you are free to change and redistribute it. > 38. There is NO WARRANTY, to the extent permitted by law. > 39. > 40. Written by John Gilmore and Jay Fenlason. > 41. configure:2927: $? = 0 > 42. configure:2967: tardir=conftest.dir && eval tar --format=ustar -chf > - "$tardir" >conftest.tar > 43. configure:2970: $? = 0 > 44. configure:2974: tar -xf - 45. configure:2977: $? = 0 > 46. configure:2990: result: gnutar > 47. configure:3039: checking build system type > 48. configure:3053: result: x86_64-unknown-linux-gnu > 49. configure:3073: checking host system type > 50. configure:3086: result: arm-unknown-linux-androideabi > 51. configure:3127: checking how to print strings > 52. configure:3154: result: printf > 53. configure:3187: checking for style of include used by make > 54. configure:3215: result: GNU > 55. configure:3246: checking for arm-linux-androideabi-gcc > 56. configure:3276: result: no > 57. configure:3286: checking for gcc > 58. configure:3302: found /usr/bin/gcc > 59. configure:3313: result: gcc > 60. configure:3542: checking for C compiler version > 61. configure:3551: gcc --version >&5 > 62. gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 > 63. Copyright (C) 2011 Free Software Foundation, Inc. > 64. This is free software; see the source for copying conditions. > There > is NO > 65. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > 66. > > > My config.log with the exact same autogen/configure/... suite : > > PATH: /opt/swig-2.0.7/bin > PATH: /home/victor/work/bin/arm-linux-androideabi-4.4.3/bin > PATH: /home/victor/work/bin/apache-maven-3.0.4/bin > PATH: /home/victor/work/bin/jdk1.6.0_30/bin > PATH: /home/victor/work/bin/android-ndk-r8 > PATH: /home/victor/work/bin/android-sdk-linux/tools > PATH: /home/victor/work/bin/android-sdk-linux/platform-tools > PATH: /home/victor/work/bin/eclipse > PATH: /home/victor/bin > PATH: /home/victor/work/bin > PATH: /home/victor/bin > PATH: /usr/local/sbin > PATH: /usr/local/bin > PATH: /usr/sbin > PATH: /usr/bin > PATH: /sbin > PATH: /bin > PATH: /usr/games > > > ## ----------- ## > ## Core tests. ## > ## ----------- ## > > configure:2454: checking for a BSD-compatible install > configure:2522: result: /usr/bin/install -c > configure:2533: checking whether build environment is sane > configure:2583: result: yes > configure:2632: checking for arm-linux-androideabi-strip > configure:2648: found > /home/victor/work/bin/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-strip > configure:2659: result: arm-linux-androideabi-strip > configure:2724: checking for a thread-safe mkdir -p > configure:2763: result: /bin/mkdir -p > configure:2776: checking for gawk > configure:2792: found /usr/bin/gawk > configure:2803: result: gawk > configure:2814: checking whether make sets $(MAKE) > configure:2836: result: yes > configure:2911: checking how to create a ustar tar archive > configure:2924: tar --version > tar (GNU tar) 1.26 > Copyright (C) 2011 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > >. > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > > Written by John Gilmore and Jay Fenlason. > configure:2927: $? = 0 > configure:2967: tardir=conftest.dir && eval tar --format=ustar -chf - > "$tardir" >conftest.tar > configure:2970: $? = 0 > configure:2974: tar -xf - configure:2977: $? = 0 > configure:2990: result: gnutar > configure:3039: checking build system type > configure:3053: result: x86_64-unknown-linux-gnu > configure:3073: checking host system type > configure:3086: result: arm-unknown-linux-androideabi > configure:3127: checking how to print strings > configure:3154: result: printf > configure:3187: checking for style of include used by make > configure:3215: result: GNU > configure:3246: checking for arm-linux-androideabi-gcc > configure:3262: found > /home/victor/work/bin/arm-linux-androideabi-4.4.3/bin/arm-linux-androideabi-gcc > configure:3273: result: arm-linux-androideabi-gcc > configure:3542: checking for C compiler version > configure:3551: arm-linux-androideabi-gcc --version >&5 > arm-linux-androideabi-gcc (GCC) 4.4.3 > Copyright (C) 2009 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR > PURPOSE. > > > That is quite a difference ! :) > > > On Fri, Jul 27, 2012 at 9:08 AM, wrote: > >> If i manually type in "arm-linux-androideabi-" and press tab twice i get >> a >> list of all the compilers (gcc, g++ etc), so it must be in my path. >> >> Also the command "arm-linux-androideabi-gcc" is executable. >> >> > Seems there is an issue in your PATH. From the line 83 (and the >> others) >> it >> > looks like the toolchain is not found: >> > >> > configure:3246: checking for arm-linux-androideabi-gcc >> > configure:3276: result: no >> > configure:3286: checking for gcc >> > configure:3302: found /usr/bin/gcc >> > configure:3313: result: gcc >> > >> > ... and so on. In the end the compiler complains about clock_gettime() >> and >> > pthread_create not found, but that;s an aftereffect of not using the >> right >> > compiler. >> > >> > Could you check your $PATH ? >> > >> > On Wed, Jul 25, 2012 at 4:20 PM, wrote: >> > >> >> Oh i forgot to add the link to the log, I'm sorry :p >> >> >> >> http://pastebin.com/pWwepPdr >> >> >> >> > Cqn you please send me your config.log ? >> >> > >> >> > BR, >> >> > >> >> > On Wed, Jul 25, 2012 at 3:17 PM, wrote: >> >> > >> >> >> I still get the same problem with zmq_init not in -lzmq. >> >> >> >> >> >> some enviroment variables that might be useful: >> >> >> >> >> >> >> >> >> >> >> >> PATH=/opt/android-toolchain/bin:/use/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:usr/games >> >> >> >> >> >> OUTPUT_DIR=/tmp/zeromq-android >> >> >> >> >> >> packages I installed (running ubuntu x86_64 clean install before i >> >> >> tried) >> >> >> was: >> >> >> * libtool, autogen, automake >> >> >> * gcc, gpp, gcc-multilib >> >> >> * libc6-dev >> >> >> * git >> >> >> >> >> >> something I'm missing? >> >> >> >> >> >> The tarball for zmq I downloaded was >> >> >> http://download.zeromq.org/zeromq-2.2.0.tar.gz >> >> >> (with wget into /tmp/. Since the wiki doesn't state where to get >> it i >> >> >> just >> >> >> took it from the download page) >> >> >> >> >> >> Also here is the config.log file the JZMQ ./config generated (with >> >> that >> >> >> LIBS"-luuid" added to the flags, as you can see on line 7) >> >> >> >> >> >> Thanks in advance. >> >> >> >> >> >> > OK, I ran the exact same sequence. Seems you are right, I have >> >> >> forgotten >> >> >> a >> >> >> > little word on the last configure line. >> >> >> > When it fails, the config.log says: >> >> >> > >> >> >> > 504 /tmp/myandroid/lib/libzmq.a(libzmq_la-uuid.o): In function >> >> >> `uuid_t': >> >> >> > 505 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to >> >> >> > `uuid_generate' >> >> >> > 506 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to >> >> >> > `uuid_unparse' >> >> >> > 507 /tmp/zeromq-2.2.0/src/uuid.cpp:88: undefined reference to >> >> >> > `uuid_generate' >> >> >> > 508 /tmp/zeromq-2.2.0/src/uuid.cpp:89: undefined reference to >> >> >> > `uuid_unparse' >> >> >> > >> >> >> > Well if you recompile jzmq with the line: >> >> >> > >> >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC -I$OUTPUT_DIR/include" >> >> >> > LDFLAGS="-L$OUTPUT_DIR/lib"* LIBS="-luuid" *--disable-version >> >> >> > >> >> >> > and everything seems fine. Can you confirm it works ? >> >> >> > >> >> >> > Best regards, >> >> >> > >> >> >> > On Wed, Jul 25, 2012 at 1:30 PM, wrote: >> >> >> > >> >> >> >> Yes, I configured zmq before I tried to configure jzmq. >> >> >> >> My OUTPUT_DIR was set to /tmp/zeromq-android before I >> configured >> >> zmq. >> >> >> >> >> >> >> >> Here's a link to the script I made (from the instructions on >> >> >> >> build:android) after redoing the instructions approximate 15 >> >> times. >> >> >> >> >> >> >> >> Worth noting is that I installed the NDK and added the >> >> >> >> /opt/android-toolchain/bin to my PATH by hand, the steps i >> >> followed >> >> >> are >> >> >> >> at >> >> >> >> the top of this pastebin post. >> >> >> >> >> >> >> >> http://pastebin.com/iXQWCxNV >> >> >> >> >> >> >> >> Everything seems to go smooth untill the jzmq config. That is >> >> where i >> >> >> >> get >> >> >> >> the "configure: error: cannot link with -lzmq" error. >> >> >> >> >> >> >> >> Everything I did tried I did with sudo or root access. >> >> >> >> >> >> >> >> > Did you try to configure zmq or jzmq?The configure command >> you >> >> >> >> described >> >> >> >> > is command line for jzmq. You need first to have set the env >> >> >> >> > variable OUTPUT_DIR=/tmp/zeromq-android and then have >> generated >> >> >> zmq. >> >> >> >> > Then you should be able to launch configure for jzmq. >> >> >> >> > Regards. >> >> >> >> > >> >> >> >> > --- En date de : Mar 24.7.12, jonas.adler at epiq.se >> >> >> >> >> >> >> >> a >> >> >> >> > ?crit : >> >> >> >> > >> >> >> >> > De: jonas.adler at epiq.se >> >> >> >> > Objet: [zeromq-dev] Massive problems running ZMQ on android >> >> >> >> > ?: zeromq-dev at lists.zeromq.org >> >> >> >> > Date: Mardi 24 juillet 2012, 16h03 >> >> >> >> > >> >> >> >> > Hello, >> >> >> >> > >> >> >> >> > I'm new to ZMQ, and trying to get it to run on android. I am >> >> >> however, >> >> >> >> > facing issue, after issue, after issue. >> >> >> >> > >> >> >> >> > I try to follow the official guide, >> >> >> >> (http://www.zeromq.org/build:android >> >> >> >> ), >> >> >> >> > and have gotten to the following call on my ubuntu machine: >> >> >> >> > >> >> >> >> > ./configure --host=arm-linux-androideabi --prefix=$OUTPUT_DIR >> >> >> >> > --with-zeromq=$OUTPUT_DIR CPPFLAGS="-fPIC >> -I$OUTPUT_DIR/include" >> >> >> >> > LDFLAGS="-L$OUTPUT_DIR/lib" --disable-version >> >> >> >> > >> >> >> >> > I get this error: >> >> >> >> > >> >> >> >> > "configure: error: cannot link with -lzmq" >> >> >> >> > >> >> >> >> > I have tried google for a few days now, but i cannot find any >> >> >> solution >> >> >> >> to >> >> >> >> > this that works for me. >> >> >> >> > >> >> >> >> > Some comments on other solutions i have found, that did not >> work >> >> >> for >> >> >> >> me: >> >> >> >> > >> >> >> >> > I have installed pretty much every compiler known to man, but >> if >> >> >> you >> >> >> >> have >> >> >> >> > any specific suggestions, please tell me. >> >> >> >> > I have made no alterations to the source at all, simply >> >> following >> >> >> the >> >> >> >> > instructions to the letter. >> >> >> >> > >> >> >> >> > Has someone else had this error? Is there something that is >> >> >> >> "understood" >> >> >> >> > in the guide, that i could be missing? >> >> >> >> > >> >> >> >> > Any help would be greatly appreciated! >> >> >> >> > >> >> >> >> > //Jonas Adler >> >> >> >> > >> >> >> >> > _______________________________________________ >> >> >> >> > zeromq-dev mailing list >> >> >> >> > zeromq-dev at lists.zeromq.org >> >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> >> > _______________________________________________ >> >> >> >> > zeromq-dev mailing list >> >> >> >> > zeromq-dev at lists.zeromq.org >> >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> >> > >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Victor >> >> >> > _______________________________________________ >> >> >> > zeromq-dev mailing list >> >> >> > zeromq-dev at lists.zeromq.org >> >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> > >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > Victor >> >> > _______________________________________________ >> >> > zeromq-dev mailing list >> >> > zeromq-dev at lists.zeromq.org >> >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > >> >> >> >> >> >> >> > >> > >> > -- >> > Victor >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > > > -- > Victor > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From sebastian.lauwers at gmail.com Fri Jul 27 09:52:58 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Fri, 27 Jul 2012 09:52:58 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> Message-ID: <501248DA.6000108@gmail.com> On 27/07/12 09:43, jonas.adler at epiq.se wrote: > I think i've found something. If I use sudo i get that > arm-linux-androideabi-gcc isnt found, but when i dont use sudo and it is > found, i get "C compiler cannot create executables"... As a rule of thumb, you should never use the super user to perform the ./configure && make steps of a compilation. Only make install, when you are installing to a privileged prefix (/usr, or /usr/local), should be run as a privileged user. -S. From jonas.adler at epiq.se Fri Jul 27 10:08:00 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Fri, 27 Jul 2012 10:08:00 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: <501248DA.6000108@gmail.com> References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> <501248DA.6000108@gmail.com> Message-ID: <5235cc349efd283f1783f1e309269a8c.squirrel@mail.glesys.se> Ok i'll think about that from here on, but if i don't use a privileged user the ./conigure replies with "C compiler cannot create executables", even though it find arm-linux-androideabi-gcc > On 27/07/12 09:43, jonas.adler at epiq.se wrote: >> I think i've found something. If I use sudo i get that >> arm-linux-androideabi-gcc isnt found, but when i dont use sudo and it is >> found, i get "C compiler cannot create executables"... > > As a rule of thumb, you should never use the super user to perform the > ./configure && make steps of a compilation. > > Only make install, when you are installing to a privileged prefix (/usr, > or /usr/local), should be run as a privileged user. > > -S. > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > From victor at iso3103.net Fri Jul 27 10:22:11 2012 From: victor at iso3103.net (Victor Perron) Date: Fri, 27 Jul 2012 10:22:11 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: <5235cc349efd283f1783f1e309269a8c.squirrel@mail.glesys.se> References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> <501248DA.6000108@gmail.com> <5235cc349efd283f1783f1e309269a8c.squirrel@mail.glesys.se> Message-ID: That's weird. You run the build process in /tmp, which I chose to minimize those issues (it's generally chmodded 777) ; for the "C compiler cannot create executables" issue as non-su, - did you properly remove ALL the files from the previous compilation ? even the directories, the cloned gits, the tar archive, etc ? - if the issue persists, can you pastebin me your config.log again ? On Fri, Jul 27, 2012 at 10:08 AM, wrote: > Ok i'll think about that from here on, but if i don't use a privileged > user the ./conigure replies with "C compiler cannot create executables", > even though it find arm-linux-androideabi-gcc > > > On 27/07/12 09:43, jonas.adler at epiq.se wrote: > >> I think i've found something. If I use sudo i get that > >> arm-linux-androideabi-gcc isnt found, but when i dont use sudo and it is > >> found, i get "C compiler cannot create executables"... > > > > As a rule of thumb, you should never use the super user to perform the > > ./configure && make steps of a compilation. > > > > Only make install, when you are installing to a privileged prefix (/usr, > > or /usr/local), should be run as a privileged user. > > > > -S. > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/4f3c076b/attachment.htm From paolo.denti at gmail.com Fri Jul 27 10:16:11 2012 From: paolo.denti at gmail.com (Paolo Denti) Date: Fri, 27 Jul 2012 08:16:11 +0000 (UTC) Subject: [zeromq-dev] iOS build References: Message-ID: Nick Forte clrtouch.com> writes: > > > Has anyone successfully built libzmq.a and used it on iOS? > Before I spend time getting a > universal binary built for i386,arm6, and ... > > > > Take a look at: http://paolodenti.blog.com/2012/07/24/zeromq-ios/ Cheers From dave at directdataservices.co.uk Fri Jul 27 12:42:54 2012 From: dave at directdataservices.co.uk (Dave Rutlidge) Date: Fri, 27 Jul 2012 11:42:54 +0100 Subject: [zeromq-dev] C#/.NET CZMQ Library Message-ID: Hi, I'm working through The Guide and want to try the CZMQ examples but can't find a library for .NET. How do I obtain it? I've tried the usual places and got the sources from github but they won't build in VS2012RC (hundreds on duplicate definition type errors). Can anyone help? Thanks Dave -- Direct Data Services is a private limited company registered in England and Wales. Registration number: 06064780. Registered office: Direct Data Services (DDS) Ltd 25 Grosvenor Road Wrexham LL11 1BT -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/9266d6e0/attachment.htm From jonas.adler at epiq.se Fri Jul 27 13:04:54 2012 From: jonas.adler at epiq.se (jonas.adler at epiq.se) Date: Fri, 27 Jul 2012 13:04:54 +0200 (CEST) Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> <501248DA.6000108@gmail.com> <5235cc349efd283f1783f1e309269a8c.squirrel@mail.glesys.se> Message-ID: I reinstalled Ubuntu (it's not my work machine, just using it to build for android) and got a problem that the C compiler couldn't create executables again but some searching on google i found that i needed "ia32-libs" package because i was running a x64 ubuntu and the NDK is compiled for 32-bit. After that 300mb package everything went just fine. I not have my zmq.jar and libjzmq.so ! :) So I can now confirm that it works (the compiling anyways). But now I've come across another problem... I assume that android zmq is identical to java, but when i tried an example (hwclient) I got a "FATAL EXCEPTION: main, java.lang.NoClassDefFoundError: org.zeromq.ZMQ." The only change i made to the code is "System.loadLibrary("jzmq");" at the top. the .jar is in /libs/ and has been added to build path and the .so is in /libs/armeabi/ I've also added the internet permission to the android manifest. > That's weird. You run the build process in /tmp, which I chose to minimize > those issues (it's generally chmodded 777) ; for the "C compiler cannot > create executables" issue as non-su, > - did you properly remove ALL the files from the previous compilation ? > even the directories, the cloned gits, the tar archive, etc ? > - if the issue persists, can you pastebin me your config.log again ? > > On Fri, Jul 27, 2012 at 10:08 AM, wrote: > >> Ok i'll think about that from here on, but if i don't use a privileged >> user the ./conigure replies with "C compiler cannot create executables", >> even though it find arm-linux-androideabi-gcc >> >> > On 27/07/12 09:43, jonas.adler at epiq.se wrote: >> >> I think i've found something. If I use sudo i get that >> >> arm-linux-androideabi-gcc isnt found, but when i dont use sudo and it >> is >> >> found, i get "C compiler cannot create executables"... >> > >> > As a rule of thumb, you should never use the super user to perform the >> > ./configure && make steps of a compilation. >> > >> > Only make install, when you are installing to a privileged prefix >> (/usr, >> > or /usr/local), should be run as a privileged user. >> > >> > -S. >> > >> > _______________________________________________ >> > zeromq-dev mailing list >> > zeromq-dev at lists.zeromq.org >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > >> > >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > > > -- > Victor > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > From victor at iso3103.net Fri Jul 27 14:34:37 2012 From: victor at iso3103.net (Victor Perron) Date: Fri, 27 Jul 2012 14:34:37 +0200 Subject: [zeromq-dev] Re : Massive problems running ZMQ on android In-Reply-To: References: <1343150764.17285.YahooMailClassic@web29502.mail.ird.yahoo.com> <29050c5d7b95b9b31443e332a8c255a1.squirrel@mail.glesys.se> <46694ac63d506ee97fec9c8076f8e9fa.squirrel@mail.glesys.se> <501248DA.6000108@gmail.com> <5235cc349efd283f1783f1e309269a8c.squirrel@mail.glesys.se> Message-ID: OK, that's some progress. I doubt you really need ia32-libs for anything though, but whatever. You're not supposed to add the System.loadLibrary() call by yourself as ZMQ.java does it already. And about the last issue, the ""FATAL EXCEPTION: main, java.lang.NoClassDefFoundError: org.zeromq.ZMQ" makes me think that your classpath is not *that* well set. But that is no more of my business, I guess ;) On Fri, Jul 27, 2012 at 1:04 PM, wrote: > I reinstalled Ubuntu (it's not my work machine, just using it to build for > android) and got a problem that the C compiler couldn't create executables > again but some searching on google i found that i needed "ia32-libs" > package because i was running a x64 ubuntu and the NDK is compiled for > 32-bit. > > After that 300mb package everything went just fine. I not have my zmq.jar > and libjzmq.so ! :) > > So I can now confirm that it works (the compiling anyways). > > > But now I've come across another problem... I assume that android zmq is > identical to java, but when i tried an example (hwclient) I got a "FATAL > EXCEPTION: main, java.lang.NoClassDefFoundError: org.zeromq.ZMQ." > The only change i made to the code is "System.loadLibrary("jzmq");" at the > top. > > the .jar is in /libs/ and has been added to build path and the .so is in > /libs/armeabi/ > > I've also added the internet permission to the android manifest. > > > That's weird. You run the build process in /tmp, which I chose to > minimize > > those issues (it's generally chmodded 777) ; for the "C compiler cannot > > create executables" issue as non-su, > > - did you properly remove ALL the files from the previous compilation ? > > even the directories, the cloned gits, the tar archive, etc ? > > - if the issue persists, can you pastebin me your config.log again ? > > > > On Fri, Jul 27, 2012 at 10:08 AM, wrote: > > > >> Ok i'll think about that from here on, but if i don't use a privileged > >> user the ./conigure replies with "C compiler cannot create executables", > >> even though it find arm-linux-androideabi-gcc > >> > >> > On 27/07/12 09:43, jonas.adler at epiq.se wrote: > >> >> I think i've found something. If I use sudo i get that > >> >> arm-linux-androideabi-gcc isnt found, but when i dont use sudo and it > >> is > >> >> found, i get "C compiler cannot create executables"... > >> > > >> > As a rule of thumb, you should never use the super user to perform the > >> > ./configure && make steps of a compilation. > >> > > >> > Only make install, when you are installing to a privileged prefix > >> (/usr, > >> > or /usr/local), should be run as a privileged user. > >> > > >> > -S. > >> > > >> > _______________________________________________ > >> > zeromq-dev mailing list > >> > zeromq-dev at lists.zeromq.org > >> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > >> > > >> > >> > >> _______________________________________________ > >> zeromq-dev mailing list > >> zeromq-dev at lists.zeromq.org > >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > >> > > > > > > > > -- > > Victor > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev at lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > > -- Victor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/df62668b/attachment.htm From ian.barber at gmail.com Fri Jul 27 17:10:06 2012 From: ian.barber at gmail.com (Ian Barber) Date: Fri, 27 Jul 2012 16:10:06 +0100 Subject: [zeromq-dev] [PATCH] [cppzmq] Add move constructor to message_t In-Reply-To: References: Message-ID: On Fri, Jul 27, 2012 at 8:03 AM, Pieter Hintjens wrote: > Hi Richard, > > The process for contributions is described here: > http://www.zeromq.org/docs:contributing > > Basically you want to make github pull requests against the cppzmq project. Hi Pieter, He both pull reqed and send a patch. Merged it in. Ian From linkfanel at yahoo.fr Fri Jul 27 17:27:42 2012 From: linkfanel at yahoo.fr (Pierre Ynard) Date: Fri, 27 Jul 2012 17:27:42 +0200 Subject: [zeromq-dev] ZMQ_MCAST_LOOP with PGM In-Reply-To: Message-ID: <20120727152741.GA8276@via.ecp.fr> > It can work well in a restricted environment, the disruptor team have > shown great performance with Java and multicast loop but with the PGM > protocol specifically there are problems and limitations that can > break reliability. Problems such as...? I tried really hard but I couldn't figure out what you meant about the unicast back channel and loopback, sorry. -- Pierre Ynard "Une ?me dans un corps, c'est comme un dessin sur une feuille de papier." From diffuser78 at gmail.com Fri Jul 27 19:26:13 2012 From: diffuser78 at gmail.com (diffuser78) Date: Fri, 27 Jul 2012 10:26:13 -0700 Subject: [zeromq-dev] looking inside ZMQ queue Message-ID: Hi All, I read the zguide and couldn't find the answer to it. I wanted to know if there is a deterministic way to find out if a message that I sent has actually reached the other end. Let me explain the scenario in detail. I am writing a lib (wrapped around ZMQ) for my app. App sends a message M using my lib. The lib first persists the message on the disk or shared memory, and then calls zmq_send() in non-blocking way. From my little insight into ZMQ, I think if ZMQ can buffer the message in its queue zmq_send() will return success and if it can't then it returns EAGAIN. What I want to know is that, ZMQ might have returned success upon buffering the message. But what if message is still in the queue and has not been delivered to the receiver for some reasons (say slow receiver). Is there a way I can peek into ZMQ queue to find out if my message M that I had sent in a non blocking way was indeed sent on the wire successfully? My lib needs to acknowledge to the app if there was an error after some time T for it to timeout on the message M. Please let me know your thoughts. I greatly appreciate your help. Many thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/1ed3cce3/attachment.htm From ian.barber at gmail.com Fri Jul 27 20:16:17 2012 From: ian.barber at gmail.com (Ian Barber) Date: Fri, 27 Jul 2012 19:16:17 +0100 Subject: [zeromq-dev] looking inside ZMQ queue In-Reply-To: References: Message-ID: On Fri, Jul 27, 2012 at 6:26 PM, diffuser78 wrote: > What I want to know is that, ZMQ might have returned success upon buffering > the message. But what if message is still in the queue and has not been > delivered to the receiver for some reasons (say slow receiver). Is there a > way I can peek into ZMQ queue to find out if my message M that I had sent in > a non blocking way was indeed sent on the wire successfully? My lib needs to > acknowledge to the app if there was an error after some time T for it to > timeout on the message M. It could be lost in the network, or the other side could crash while processing. The best way is to send an acknowledgement back from the receiver (also using ZeroMQ) and use that to determine whether the other side has received and processed it. Ian From diffuser78 at gmail.com Fri Jul 27 20:27:39 2012 From: diffuser78 at gmail.com (diffuser78) Date: Fri, 27 Jul 2012 11:27:39 -0700 Subject: [zeromq-dev] looking inside ZMQ queue In-Reply-To: References: Message-ID: Sorry about my ignorance and laziness. I read this on the FAQ page: *How do I determine how many messages are in queue?* *This isn't possible. At any given time a message may be in the ?MQ sender queue, the sender's kernel buffer, on the wire, in the receiver's kernel buffer or in the receiver's ?MQ receiver queue. Furthermore, a ?MQ socket can bind and/or connect to many peers. Each peer may have different performance characteristics and therefore a different queue depth. Any "queue depth" number is almost certainly wrong, so rather than provide incorrect information the library avoids providing any view into this data.* I had a related question but not same as above. When ZMQ sent this message over TCP to the receivier and when receiver did a FIN/ACK indicating that it is ACK'ing to the finish of the tranmission of byte transfer, it indicates that the transport layer on the other end got the message. Does ZMQ keep tab of this ? When does sender ZMQ removes this message from its internal buffer. *I am only interested in knowing (in YES or NO) whether this message is in sender zmq buffer or not*. Is that possible ? If you can point me out, I can create a patch for it and send for review. Any thoughts are greatly appreciated. DJ On Fri, Jul 27, 2012 at 11:16 AM, Ian Barber wrote: > On Fri, Jul 27, 2012 at 6:26 PM, diffuser78 wrote: > > What I want to know is that, ZMQ might have returned success upon > buffering > > the message. But what if message is still in the queue and has not been > > delivered to the receiver for some reasons (say slow receiver). Is there > a > > way I can peek into ZMQ queue to find out if my message M that I had > sent in > > a non blocking way was indeed sent on the wire successfully? My lib > needs to > > acknowledge to the app if there was an error after some time T for it to > > timeout on the message M. > > It could be lost in the network, or the other side could crash while > processing. The best way is to send an acknowledgement back from the > receiver (also using ZeroMQ) and use that to determine whether the > other side has received and processed it. > > Ian > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/42a4de4b/attachment.htm From stu at compuserve.com Fri Jul 27 21:23:35 2012 From: stu at compuserve.com (Stuart Brandt) Date: Fri, 27 Jul 2012 15:23:35 -0400 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x Message-ID: <5012EAB7.80500@compuserve.com> I get an assertion during a call to zmq_recv on 2 different OSes (OSX 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and a recent build off latest at github.com/zeromq/libzmq). The assertion is: Assertion failed: (msg_->flags () & msg_t::identity) == 0 (router.cpp:220) Aborted The setup involves: 1) the simple message queue broker found at https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c I modified the #include to look for zmq.h rather than zhelpers.h to get it to compile with ZMQ 3.x 2) a minimal server implementation that connects to the broker and does a zmq_recv. Code is: // // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket // Connects to tcp://localhost:5560 // #include #include int main (void) { char buf[80]; // buffer for zmq_recv call int len; // len returned by zmq_recv void *ctx; // ZMQ context void *sock; // ZMQ socket // init ZMQ context, create a REP socket, and connect to ROUTER ctx = zmq_ctx_new(); sock = zmq_socket(ctx,ZMQ_REP); zmq_connect (sock, "tcp://localhost:5560"); // do a basic zmq_recv call...warn if it fails len = zmq_recv(sock,buf,sizeof(buf),0); if (len < 0) { printf("zmq_recv failed - %s\n",zmq_strerror(errno)); } // Done. Clean up and end zmq_close (sock); zmq_term (ctx); return 0; } Steps to repro are start server, start broker, kill broker (spec. ctrl-C), restart broker. Server aborts with the above assertion. Is there something my code should be doing differently? Thanks....Stuart From bklooste at gmail.com Sat Jul 28 00:46:02 2012 From: bklooste at gmail.com (Bennie Kloosteman) Date: Sat, 28 Jul 2012 06:46:02 +0800 Subject: [zeromq-dev] looking inside ZMQ queue In-Reply-To: References: Message-ID: Like most systems ZeroMQ will just send the message to the transport when the transport has received the message ( eg TCP/IP )it is removed from ZeroMQ. There are no guarantees it has even been sent , yet alone that the transport layer on the other side has the message. This is pretty standard TCP/IP provides no guarantees the other service has received the message ( only the receiver TCp/IP stack) so you need to code this in your application logic. Also if you are persisting you do not need a light weight system , persistence is always slow and heavy , killing any performance ( Normally non persistent messaging systems do at least 10* the messages / second to persistent ones) . For persistence I would use a queue like MSMQ or the IBM equivalent . Queues also help in knowing if the other side has received it. Ben On Sat, Jul 28, 2012 at 2:27 AM, diffuser78 wrote: > Sorry about my ignorance and laziness. I read this on the FAQ page: > > > *How do I determine how many messages are in queue?* > > *This isn't possible. At any given time a message may be in the ?MQ > sender queue, the sender's kernel buffer, on the wire, in the receiver's > kernel buffer or in the receiver's ?MQ receiver queue. Furthermore, a ?MQ > socket can bind and/or connect to many peers. Each peer may have different > performance characteristics and therefore a different queue depth. Any > "queue depth" number is almost certainly wrong, so rather than provide > incorrect information the library avoids providing any view into this data. > * > I had a related question but not same as above. > > When ZMQ sent this message over TCP to the receivier and when receiver did > a FIN/ACK indicating that it is ACK'ing to the finish of the tranmission of > byte transfer, it indicates that the transport layer on the other end got > the message. Does ZMQ keep tab of this ? When does sender ZMQ removes this > message from its internal buffer. *I am only interested in knowing (in > YES or NO) whether this message is in sender zmq buffer or not*. Is that > possible ? If you can point me out, I can create a patch for it and send > for review. > > Any thoughts are greatly appreciated. > > DJ > > On Fri, Jul 27, 2012 at 11:16 AM, Ian Barber wrote: > >> On Fri, Jul 27, 2012 at 6:26 PM, diffuser78 wrote: >> > What I want to know is that, ZMQ might have returned success upon >> buffering >> > the message. But what if message is still in the queue and has not been >> > delivered to the receiver for some reasons (say slow receiver). Is >> there a >> > way I can peek into ZMQ queue to find out if my message M that I had >> sent in >> > a non blocking way was indeed sent on the wire successfully? My lib >> needs to >> > acknowledge to the app if there was an error after some time T for it to >> > timeout on the message M. >> >> It could be lost in the network, or the other side could crash while >> processing. The best way is to send an acknowledgement back from the >> receiver (also using ZeroMQ) and use that to determine whether the >> other side has received and processed it. >> >> Ian >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120728/047f3c31/attachment.htm From steven.mccoy at miru.hk Sat Jul 28 01:03:12 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Fri, 27 Jul 2012 19:03:12 -0400 Subject: [zeromq-dev] ZMQ_MCAST_LOOP with PGM In-Reply-To: <20120727152741.GA8276@via.ecp.fr> References: <20120727152741.GA8276@via.ecp.fr> Message-ID: On 27 July 2012 11:27, Pierre Ynard wrote: > > It can work well in a restricted environment, the disruptor team have > > shown great performance with Java and multicast loop but with the PGM > > protocol specifically there are problems and limitations that can > > break reliability. > > Problems such as...? > The OS only forwards packets to the first open socket. > I tried really hard but I couldn't figure out what you meant about the > unicast back channel and loopback, sorry. > > Check the RFC's on PGM and PGMCC for details of the protocols in question, http://www.ietf.org/rfc/rfc3208.txt http://www.ietf.org/proceedings/57/I-D/draft-ietf-rmt-bb-pgmcc-02.txt -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120727/202f9ea6/attachment.htm From ph at imatix.com Sat Jul 28 05:33:58 2012 From: ph at imatix.com (Pieter Hintjens) Date: Sat, 28 Jul 2012 12:33:58 +0900 Subject: [zeromq-dev] looking inside ZMQ queue In-Reply-To: References: Message-ID: On Sat, Jul 28, 2012 at 2:26 AM, diffuser78 wrote: > I read the zguide and couldn't find the answer to it. I wanted to know if > there is a deterministic way to find out if a message that I sent has > actually reached the other end. The short answer is that if you need information from the receiver, you MUST send that back as a message. The longer answer is in the Guide, in the section on request-reply reliability (Chapter 4). -Pieter From oj at buffered.io Sat Jul 28 08:57:19 2012 From: oj at buffered.io (OJ Reeves) Date: Sat, 28 Jul 2012 16:57:19 +1000 Subject: [zeromq-dev] C#/.NET CZMQ Library In-Reply-To: References: Message-ID: Dave, Do you absolutely need to build it from source? Why not use the NuGet packages? http://nuget.org/packages/clrzmq http://nuget.org/packages/clrzmq-x64 Cheers. OJ On Fri, Jul 27, 2012 at 8:42 PM, Dave Rutlidge < dave at directdataservices.co.uk> wrote: > Hi, > > I'm working through The Guide and want to try the CZMQ examples but can't > find a library for .NET. How do I obtain it? > > I've tried the usual places and got the sources from github but they won't > build in VS2012RC (hundreds on duplicate definition type errors). Can > anyone help? > > Thanks > > Dave > > Direct Data Services is a private limited company registered in England and Wales. > Registration number: 06064780. > Registered office: > Direct Data Services (DDS) Ltd > 25 Grosvenor Road > Wrexham > LL11 1BT > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -- OJ Reeves +61 431 952 586 http://buffered.io/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120728/972f1b3e/attachment.htm From breese at mail1.stofanet.dk Sat Jul 28 12:52:01 2012 From: breese at mail1.stofanet.dk (Bjorn Reese) Date: Sat, 28 Jul 2012 12:52:01 +0200 Subject: [zeromq-dev] Router to router delay Message-ID: <5013C451.1080000@mail1.stofanet.dk> I am writing a peer-to-peer system on top of a router-to-router connection. As there can be multiple peers, I set their identity. It appears that router pairs have to exchange their identity before they can exchange messages. Any message I send before the identity is exhanged, are silently discarded. The only solution I have seen to this problem, is to sleep for one second before sending the first message. Unfortunately, there is no guarantee that one second is sufficient. A slow connection may take longer than one second to exchange the identity. So this is not a feasible solution. I see three alternatives: 1. Let ZeroMQ queue the messages and send them once the identity has been exchanged. This is my preferred solution seen from a users point of view. 2. Let zmq_send() return EAGAIN until the identity has been exchanged. 3. Add an event to notify the application that the identity has been exchanged (e.g. via the new zmq_ctx_monitor_event() functionality.) From cfkaran2 at gmail.com Sat Jul 28 13:02:02 2012 From: cfkaran2 at gmail.com (Cem Karan) Date: Sat, 28 Jul 2012 07:02:02 -0400 Subject: [zeromq-dev] Router to router delay In-Reply-To: <5013C451.1080000@mail1.stofanet.dk> References: <5013C451.1080000@mail1.stofanet.dk> Message-ID: <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> Can you describe your system a bit more? Are the peers on the same LAN, or do they need to peer across the internet? Do the peers already know about each other (as in, a small group with well-known identities), or do they have to discover each other? etc... Thanks, Cem Karan On Jul 28, 2012, at 6:52 AM, Bjorn Reese wrote: > I am writing a peer-to-peer system on top of a router-to-router > connection. As there can be multiple peers, I set their identity. > > It appears that router pairs have to exchange their identity before > they can exchange messages. Any message I send before the identity > is exhanged, are silently discarded. > > The only solution I have seen to this problem, is to sleep for one > second before sending the first message. Unfortunately, there is no > guarantee that one second is sufficient. A slow connection may take > longer than one second to exchange the identity. So this is not a > feasible solution. > > I see three alternatives: > > 1. Let ZeroMQ queue the messages and send them once the identity has > been exchanged. This is my preferred solution seen from a users > point of view. > > 2. Let zmq_send() return EAGAIN until the identity has been exchanged. > > 3. Add an event to notify the application that the identity has been > exchanged (e.g. via the new zmq_ctx_monitor_event() functionality.) > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1581 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120728/94b9d217/attachment.bin From breese at mail1.stofanet.dk Sat Jul 28 14:11:47 2012 From: breese at mail1.stofanet.dk (Bjorn Reese) Date: Sat, 28 Jul 2012 14:11:47 +0200 Subject: [zeromq-dev] Router to router delay In-Reply-To: <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> References: <5013C451.1080000@mail1.stofanet.dk> <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> Message-ID: <5013D703.60502@mail1.stofanet.dk> On 2012-07-28 13:02, Cem Karan wrote: > Can you describe your system a bit more? Are the peers on the same LAN, or do they need to peer across the internet? Do the peers already know about each other (as in, a small group with well-known identities), or do they have to discover each other? etc... Initially, all peers are on the same LAN where they discover each other via ZeroConf (Bonjour). These local peers constitutes one cluster. Later this has to be extended to several clusters communicating over WAN. The exact means for this has not been determined yet. From ivan at blackpx.com Sat Jul 28 16:34:15 2012 From: ivan at blackpx.com (Ivan) Date: Sat, 28 Jul 2012 14:34:15 +0000 (UTC) Subject: [zeromq-dev] If not Majordomo for asynchronous workers, then what? References: Message-ID: Pieter, Pieter Hintjens imatix.com> writes: > > Hi Ivan, > > Majordomo is based on a 1-to-1 request-reply model for workers, yes. > You should be able to quite easily modify MDP to allow multiple > replies, perhaps by adding a "there's more coming" indicator to > replies that the broker uses to route several replies back to the same > client. It seems like I will have to map a clientOrderID to a particular client. That way, when the FIX engine sends back more messages, I can look up this order ID, get the client, and send it back to that particular client. > Modifying MDP and the implementations will be simpler than writing > your own from scratch. Right. I believe what I describe above is the correct modification to the Broker. I have to understand the magic by which the broker knows how to route a message back to the client. It would be a great addition to MDP if I could call a function that, given a message, would break the multipart message for me. This way I could hash the route to the client based on some key, in my case, OrderID. > You can also use other architectures; MDP is specifically aimed at > allowing multiple redundant workers per service type. If you have a > single well-known gateway per exchange you can just connect each > client to each exchange gateway directly and work fully > asynchronously. Having the clients know of the routes would break encapsulation, to say nothing of the fact that there can be all sort of different protocols like FIX, ITCH, proprietary binary, etc. The idea is that a client can send normalized/generic order to a broker, who then fills in the appropriate details as to how to get that order to a particular exchange. On the way back from the exchange, the reverse process occurs, where a given message from an exchange is normalized back into a simpler internal message. So complexity is hidden from the client. > -Pieter Thanks again Peiter for your suggestions. Is there any way I can contact you directly? Ivan > On Thu, Jul 26, 2012 at 10:29 PM, Ivan Figueredo blackpx.com> wrote: > > I am writing a distributed trading manager. There are many different > > liquidity providers, and the client would like to route to a given exchange. > > With this in mind, I thought that using the Majordomo pattern with a broker > > in between clients and workers asking a particular [named] worker to do its > > work. However at least as I understand it, Majordomo won't work in this > > scenario. > > > > Let's take the FIX protocol. Since FIX is asynchronous, I believe I can't > > use the Majordomo. You may send an order to a FIX engine, and that one order > > may send back many different messages. For example, that one order may see > > the following responses: Insert, Pending, New, Partial Fill, then finally > > Fill. > > > > In the Majordomo pattern, a section of code in the worker looks like this > > > > mdwrk session ("tcp://localhost:5555", sourceStr.c_str(), verbose); > > > > zmsg *reply = 0; > > while (1) { > > zmsg *request = session.recv (reply); > > if (request == 0) { > > break; // Worker was interrupted > > } > > > > //reply = request; // Echo is complex... > > reply = new zmsg(sourceStr.c_str()); > > } > > > > > > This assumes one request, and one reply. Since my application is not > > strictly a single request, that gets a single response as in the code above, > > do I have to drop Majordomo ? > > > > > > Thanks! > > > > > > _______________________________________________ > > zeromq-dev mailing list > > zeromq-dev lists.zeromq.org > > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > > From sebastian.lauwers at gmail.com Sat Jul 28 18:05:28 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Sat, 28 Jul 2012 18:05:28 +0200 Subject: [zeromq-dev] Question about constness In-Reply-To: <50123BA8.3080806@gmail.com> References: <500E28F6.1040608@gmail.com> <50123BA8.3080806@gmail.com> Message-ID: <50140DC8.1020708@gmail.com> On 07/27/2012 08:56 AM, Sebastian Lauwers wrote: > Very well, I'll try to provide a patch tomorrow. I guess I hadn't looked at the CPP API closely before answering to Ming, or offering a patch. I'm not seeing anything in that API that doesn't have proper constness applied. Apologies to Martin for blindly assuming it wasn't done. -S. From cfkaran2 at gmail.com Sat Jul 28 20:48:08 2012 From: cfkaran2 at gmail.com (Cem Karan) Date: Sat, 28 Jul 2012 14:48:08 -0400 Subject: [zeromq-dev] Router to router delay In-Reply-To: <5013D703.60502@mail1.stofanet.dk> References: <5013C451.1080000@mail1.stofanet.dk> <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> <5013D703.60502@mail1.stofanet.dk> Message-ID: OK, you're doing something similar to what I'm trying to do, except that you're planning on expanding to a WAN. I'm going to outline what I'm doing, but I want to note that what I have are a number of pieces of test code that let me make sure that the way I'm using zmq makes sense. I haven't tried to push large amounts of data through yet, so it may break. With that disclaimer in mind... I started out with router-router connections, but switched to pub-sub over epgm and administratively scoped multicast addresses (http://en.wikipedia.org/wiki/Multicast_address#Administratively_Scoped_IPv4_Multicast_addresses) for precisely the reasons you outlined in your original email; it isn't easy distributing the addresses. In my code, each node has one publisher socket and one subscriber socket. All publishers and all subscribers are connected to the same address and port. This means that I effectively have a reliable broadcast channel (epgm ensures that all receivers get the message, in the correct order, etc.). I wrote a simple control layer/protocol on top that allows all nodes to communicate some minimal control information, which in your case might include zmq URIs. That should allow router-router connections. I don't know if the IANA has any addresses in the ad-hoc block (http://en.wikipedia.org/wiki/Multicast_address#AD-HOC_block) which are open to individual developers, but that is another thing to look at; if you can get permission to use an address in there, then the pub-sub trick would work across the internet. Thanks, Cem Karan On Jul 28, 2012, at 8:11 AM, Bjorn Reese wrote: > On 2012-07-28 13:02, Cem Karan wrote: >> Can you describe your system a bit more? Are the peers on the same LAN, or do they need to peer across the internet? Do the peers already know about each other (as in, a small group with well-known identities), or do they have to discover each other? etc... > > Initially, all peers are on the same LAN where they discover each other > via ZeroConf (Bonjour). These local peers constitutes one cluster. > Later this has to be extended to several clusters communicating over > WAN. The exact means for this has not been determined yet. -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1581 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120728/5647a062/attachment.bin From artem.vysochyn at gmail.com Sun Jul 29 00:39:52 2012 From: artem.vysochyn at gmail.com (Artem V12) Date: Sun, 29 Jul 2012 01:39:52 +0300 Subject: [zeromq-dev] Pls. advice on design/architecture. Message-ID: Hello there, 0Community! I want to build some cool notification system based on 0MQ, but this's gonna be challening effort. I read the guide(almost all) but didn't find what can help me. So here's the thing: I have a persistent layer where I store users and their preferences. The preferences, essentially, are the filters against neverending flow of some events (at this point it's doesn't matter what events represent by itself) and can be updated at any time by user. One fact about events and user' preferences - they can be matched together by certain prefix. So, at the end of the day I have to have notification system which on arrival of certain event has to match (by prefix in the messsage) corresponding user' pref, then check that event matched is 'good', and send email to user. Essentially I have to track the updates of certain stuff. So I after reading the guide, it's more/less clear to me how to impl. this. 1. On one side there will be fanout broadcast of events which will bombard by messages the two 0MQ boxes (second is backup). 2. On the other side - clients which has to be subscribed (by user' pref) onto one of the two endpoints. If understood 0MQ idea correctly then making some component to listen for some events isn't hard thing. But here's the issue: user' prefs (i.e. filters) are persistent and, worse, are subject to Create/Update/Delete. So, say, in jvm, I will pull a user' pref, make it listen on ZMQ.SUB socket, but while I was doing this user could Update/Delete his pref. Or better - once user' pref is created - let it listen 'from the birth', but the first restart of the box where user' pref is listening for events will end the connection. In general the problem I faced is: how to make persistent things to listen in reliable manner? Thanks in advance! -regards -artemv -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120729/f99baa56/attachment.htm From ph at imatix.com Sun Jul 29 05:13:27 2012 From: ph at imatix.com (Pieter Hintjens) Date: Sun, 29 Jul 2012 12:13:27 +0900 Subject: [zeromq-dev] If not Majordomo for asynchronous workers, then what? In-Reply-To: References: Message-ID: On Sat, Jul 28, 2012 at 11:34 PM, Ivan wrote: > Right. I believe what I describe above is the correct modification to the > Broker. I have to understand the magic by which the broker knows how to route a > message back to the client. It would be a great addition to MDP if I could call > a function that, given a message, would break the multipart message for me. This > way I could hash the route to the client based on some key, in my case, OrderID. It's explained in http://rfc.zeromq.org/spec:7 and in the Guide that develops MDP. -Pieter From paul at colomiets.name Sun Jul 29 16:49:01 2012 From: paul at colomiets.name (Paul Colomiets) Date: Sun, 29 Jul 2012 17:49:01 +0300 Subject: [zeromq-dev] If not Majordomo for asynchronous workers, then what? In-Reply-To: References: Message-ID: Hi Ivan, On Sat, Jul 28, 2012 at 5:34 PM, Ivan wrote: >> Modifying MDP and the implementations will be simpler than writing >> your own from scratch. > > Right. I believe what I describe above is the correct modification to the > Broker. I have to understand the magic by which the broker knows how to route a > message back to the client. It would be a great addition to MDP if I could call > a function that, given a message, would break the multipart message for me. This > way I could hash the route to the client based on some key, in my case, OrderID. > There are actually two schools here: First, proposes to modify the broker, as you described. Second, requires to decompose the communication into patterns. In your case it's as follows: 1. You have two connections: requrest/reply, and pub/sub 2. Before doing request, you create and OrderID, and you subscribe on that OrderID in pub/sub 3. Than you do the request. There is no reply until the whole order is processed 4. The order status updates are sent by pub/sub 5. When everything is done, you receive final reply on request I usually choose the latter approach, for the following reasons: 1. The solution consists of two clearly defined patterns 2. It leverages zeromq ability to introduce intermediate nodes (as it uses bare patterns) 3. It allows to run brokerless when setup is small (e.g. for development) 4. It allows to use simple request-reply for clients which do not need intermediate statuses 5. It allows another peer/application to follow intermediate statuses (so gives more flexibility to the client) -- Paul From arkrost at gmail.com Sun Jul 29 12:10:16 2012 From: arkrost at gmail.com (Arkady Rost) Date: Sun, 29 Jul 2012 14:10:16 +0400 Subject: [zeromq-dev] zeromq 3.2 tests fails Message-ID: Hi! I've just installed zeromq 3.2 from sources but 2 tests fails. They are test_monitor and test_shutdown_stress. Here is full check log: https://gist.github.com/3197194. I think that the problem with test_monitor is related with issue #399. Any ideas what should I fix? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120729/ff433372/attachment.htm From sebastian.lauwers at gmail.com Mon Jul 30 08:44:33 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Mon, 30 Jul 2012 08:44:33 +0200 Subject: [zeromq-dev] zeromq 3.2 tests fails In-Reply-To: References: Message-ID: On 29 July 2012 12:10, Arkady Rost wrote: > Hi! Hi Arkady, > I've just installed zeromq 3.2 from sources but 2 tests fails. They are > test_monitor and test_shutdown_stress. Could you confirm which repository/branch you are using? From the gist, I'd say it's the zeromq 3.x repository (https://github.com/zeromq/zeromq3-x.git). Also, could you indicate at what position your HEAD is? I've not been able to reproduce the segfault problem using the latest HEAD (d3518eafe4b58c0d7606ef0d9035df3ec52c22d4), however, the test_monitor does indeed fail. git bisect shows that the regression might be introduced by commit 38a0710b89b7bfe81f7250c5e9a96e024cfabe62 (Fixed issue #399 socket_monitor test, fromXMbIPEK ). However, I don't think this commit is the actual origin. From Richard_Newton at waters.com Mon Jul 30 09:55:26 2012 From: Richard_Newton at waters.com (Richard_Newton at waters.com) Date: Mon, 30 Jul 2012 08:55:26 +0100 Subject: [zeromq-dev] [PATCH] [cppzmq] Add move constructor to message_t In-Reply-To: References: Message-ID: Hi Ian, Thanks, but merged it in where? I cannot see the changes at https://github.com/zeromq/cppzmq. So I am clear, what is the protocol for submitting patches? Should I be sending the patch to the list for review as well as doing a pull request or do you just want the pull request? Sending the patch to the mailing list as well would seem to be sensible so it can be reviewed, I notice there is some talk on the list about constness, I have another pull request that adds const data access to message_t that probably isn't that visible to people on the list. Regards, Richard. Richard Newton Waters Logo Principal Software Engineer [T]?+44 (0) 161 946 Waters 2685 Corporation [F]?+44 (0) 161 946 Floats Road 2480 Wythenshawe [W]?www.waters.com Manchester [E] M23 9LZ richard_newton at waters.com UK Micromass UK Limited is registered in England under No 3162904 Registered office: Floats Road, Wythenshawe, Manchester M23 9LZ From: "Ian Barber" To: "ZeroMQ development list" Date: 27/07/2012 04:10 PM Subject: Re: [zeromq-dev] [PATCH] [cppzmq] Add move constructor to message_t Sent by: zeromq-dev-bounces at lists.zeromq.org On Fri, Jul 27, 2012 at 8:03 AM, Pieter Hintjens wrote: > Hi Richard, > > The process for contributions is described here: > http://www.zeromq.org/docs:contributing > > Basically you want to make github pull requests against the cppzmq project. Hi Pieter, He both pull reqed and send a patch. Merged it in. Ian _______________________________________________ zeromq-dev mailing list zeromq-dev at lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev =========================================================== The information in this email is confidential, and is intended solely for the addressee(s). Access to this email by anyone else is unauthorized and therefore prohibited. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited and may be unlawful. =========================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/b6630a08/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: 70263135.gif Type: image/gif Size: 3839 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/b6630a08/attachment.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/b6630a08/attachment-0001.gif -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/b6630a08/attachment-0002.gif From breese at mail1.stofanet.dk Mon Jul 30 10:33:47 2012 From: breese at mail1.stofanet.dk (Bjorn Reese) Date: Mon, 30 Jul 2012 10:33:47 +0200 Subject: [zeromq-dev] Router to router delay In-Reply-To: References: <5013C451.1080000@mail1.stofanet.dk> <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> <5013D703.60502@mail1.stofanet.dk> Message-ID: <501646EB.9070807@mail1.stofanet.dk> We are straying off-topic. I also use publish-subscribe in my system, but I need router-router for point-to-point interaction. So my original problem about messages being silently discarded before the identity exchange is finalized is still relevant. Let me elaborate on the original problem with an example. The example is against https://github.com/zeromq/zeromq3-x and error handling has been removed for brevity (but it is present in my original code) void *client = zmq_socket(context, ZMQ_ROUTER); zmq_setsockopt(client, ZMQ_IDENTITY, identity, strlen(identity)); zmq_connect(client, endpoint); sleep(1); /* Wait for identity exchange to finish */ zmq_msg_t message; zmq_msg_init_size(&message, strlen(data)); memcpy(zmq_msg_data(&message), data, strlen(data)); int rc = zmq_sendmsg(client, &message, 0); assert(rc == 0); If the sleep() function above is removed, then the subsequent message is silently ignored. On 2012-07-28 20:48, Cem Karan wrote: > OK, you're doing something similar to what I'm trying to do, except that you're planning on expanding to a WAN. I'm going to outline what I'm doing, but I want to note that what I have are a number of pieces of test code that let me make sure that the way I'm using zmq makes sense. I haven't tried to push large amounts of data through yet, so it may break. With that disclaimer in mind... > > I started out with router-router connections, but switched to pub-sub over epgm and administratively scoped multicast addresses (http://en.wikipedia.org/wiki/Multicast_address#Administratively_Scoped_IPv4_Multicast_addresses) for precisely the reasons you outlined in your original email; it isn't easy distributing the addresses. In my code, each node has one publisher socket and one subscriber socket. All publishers and all subscribers are connected to the same address and port. This means that I effectively have a reliable broadcast channel (epgm ensures that all receivers get the message, in the correct order, etc.). I wrote a simple control layer/protocol on top that allows all nodes to communicate some minimal control information, which in your case might include zmq URIs. That should allow router-router connections. > > I don't know if the IANA has any addresses in the ad-hoc block (http://en.wikipedia.org/wiki/Multicast_address#AD-HOC_block) which are open to individual developers, but that is another thing to look at; if you can get permission to use an address in there, then the pub-sub trick would work across the internet. > > Thanks, > Cem Karan > > On Jul 28, 2012, at 8:11 AM, Bjorn Reese wrote: > >> On 2012-07-28 13:02, Cem Karan wrote: >>> Can you describe your system a bit more? Are the peers on the same LAN, or do they need to peer across the internet? Do the peers already know about each other (as in, a small group with well-known identities), or do they have to discover each other? etc... >> >> Initially, all peers are on the same LAN where they discover each other >> via ZeroConf (Bonjour). These local peers constitutes one cluster. >> Later this has to be extended to several clusters communicating over >> WAN. The exact means for this has not been determined yet. >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev From arkrost at gmail.com Mon Jul 30 12:22:30 2012 From: arkrost at gmail.com (Arkady Rost) Date: Mon, 30 Jul 2012 14:22:30 +0400 Subject: [zeromq-dev] msvc and pgm Message-ID: Hi! I have problems with building zeromq 3.2 with enabled openpgm support under windows 7 in msvc 2010. Here is compiling log: http://pastebin.com/QBTvyZDv. I've just open WithOpenPGM configuration and tried to build a solution. Am I missing some steps? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/ca75149c/attachment.htm From Kevin.Doherty at mlp.com Mon Jul 30 12:43:59 2012 From: Kevin.Doherty at mlp.com (Doherty, Kevin) Date: Mon, 30 Jul 2012 06:43:59 -0400 Subject: [zeromq-dev] poller lifecycle Message-ID: <49D0E89A1F0DC445A55F4938115FC3F039535BCA22@EXCHUS100.AD.MLP.COM> Folks, commenting out the line below results in the exception shown. When creating a new socket after closing the old. Unregistering the closed socket from the poller object and adding the new one to the same poller object does not seem to work. The poll/send complains about an invaid argument ? (Creating a new poller object is fine.) params.items.unregister(params.zmqPubSocket); params.zmqPubSocket.close(); params.zmqPubSocket = ((ZMQ.Context)zmqContext).socket (ZMQ.PUSH); //**************** params.items = ((ZMQ.Context)zmqContext).poller(); params.zmqPubSocket.setLinger(0); params.items.register(params.zmqPubSocket, ZMQ.Poller.POLLOUT); params.items.register(params.zmqPubSocket, ZMQ.Poller.POLLERR); params.zmqPubSocket.bind (params.sendTo); try{Thread.sleep(5000);}catch(Exception e){} params.items.poll(1000000); <<<<<<<<<<<<<<<<<<<<<<<<<<< zmq PUSH send failed 22 Connect: zmq throwing org.zeromq.ZMQException: Invalid argument(0x16) at org.zeromq.ZMQ$Poller.run_poll(Native Method) at org.zeromq.ZMQ$Poller.poll(ZMQ.java:1298) ###################################################################### The information contained in this communication is confidential and may contain information that is privileged or exempt from disclosure under applicable law. If you are not a named addressee, please notify the sender immediately and delete this email from your system. If you have received this communication, and are not a named recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. ###################################################################### -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/f57cbdfe/attachment.htm From cfkaran2 at gmail.com Mon Jul 30 12:52:15 2012 From: cfkaran2 at gmail.com (Cem Karan) Date: Mon, 30 Jul 2012 06:52:15 -0400 Subject: [zeromq-dev] Router to router delay In-Reply-To: <501646EB.9070807@mail1.stofanet.dk> References: <5013C451.1080000@mail1.stofanet.dk> <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> <5013D703.60502@mail1.stofanet.dk> <501646EB.9070807@mail1.stofanet.dk> Message-ID: <5BCF2D34-9635-4E32-BE26-5122E86612E5@gmail.com> I'm afraid that pub-sub was the only way I could find to fix my problem, and that building some control structures on top of it worked for me. On the other hand, my use case is probably very different than yours. The only other suggestion I can make would be to define some kind of control on top of your router-router connections and basically ping the remote end until you get a message back. If you put that in a moderately tight loop, say, one ping message every 10 milliseconds or so, you'll eventually get through, and the fact that you get a return tells you the connection is up. I know that that is not ideal because you'll end up with a long queue of pings that you can't get rid of after you've received a reply, but it is all I can offer as a suggestion. Good luck, Cem Karan On Jul 30, 2012, at 4:33 AM, Bjorn Reese wrote: > We are straying off-topic. > > I also use publish-subscribe in my system, but I need router-router for > point-to-point interaction. > > So my original problem about messages being silently discarded before > the identity exchange is finalized is still relevant. > > Let me elaborate on the original problem with an example. The example > is against https://github.com/zeromq/zeromq3-x and error handling > has been removed for brevity (but it is present in my original code) > > void *client = zmq_socket(context, ZMQ_ROUTER); > zmq_setsockopt(client, ZMQ_IDENTITY, identity, strlen(identity)); > zmq_connect(client, endpoint); > > sleep(1); /* Wait for identity exchange to finish */ > > zmq_msg_t message; > zmq_msg_init_size(&message, strlen(data)); > memcpy(zmq_msg_data(&message), data, strlen(data)); > int rc = zmq_sendmsg(client, &message, 0); > assert(rc == 0); > > If the sleep() function above is removed, then the subsequent message > is silently ignored. > > > On 2012-07-28 20:48, Cem Karan wrote: >> OK, you're doing something similar to what I'm trying to do, except that you're planning on expanding to a WAN. I'm going to outline what I'm doing, but I want to note that what I have are a number of pieces of test code that let me make sure that the way I'm using zmq makes sense. I haven't tried to push large amounts of data through yet, so it may break. With that disclaimer in mind... >> >> I started out with router-router connections, but switched to pub-sub over epgm and administratively scoped multicast addresses (http://en.wikipedia.org/wiki/Multicast_address#Administratively_Scoped_IPv4_Multicast_addresses) for precisely the reasons you outlined in your original email; it isn't easy distributing the addresses. In my code, each node has one publisher socket and one subscriber socket. All publishers and all subscribers are connected to the same address and port. This means that I effectively have a reliable broadcast channel (epgm ensures that all receivers get the message, in the correct order, etc.). I wrote a simple control layer/protocol on top that allows all nodes to communicate some minimal control information, which in your case might include zmq URIs. That should allow router-router connections. >> >> I don't know if the IANA has any addresses in the ad-hoc block (http://en.wikipedia.org/wiki/Multicast_address#AD-HOC_block) which are open to individual developers, but that is another thing to look at; if you can get permission to use an address in there, then the pub-sub trick would work across the internet. >> >> Thanks, >> Cem Karan >> >> On Jul 28, 2012, at 8:11 AM, Bjorn Reese wrote: >> >>> On 2012-07-28 13:02, Cem Karan wrote: >>>> Can you describe your system a bit more? Are the peers on the same LAN, or do they need to peer across the internet? Do the peers already know about each other (as in, a small group with well-known identities), or do they have to discover each other? etc... >>> >>> Initially, all peers are on the same LAN where they discover each other >>> via ZeroConf (Bonjour). These local peers constitutes one cluster. >>> Later this has to be extended to several clusters communicating over >>> WAN. The exact means for this has not been determined yet. >>> >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 1581 bytes Desc: not available Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/5ac8523b/attachment.bin From breese at mail1.stofanet.dk Mon Jul 30 14:26:43 2012 From: breese at mail1.stofanet.dk (Bjorn Reese) Date: Mon, 30 Jul 2012 14:26:43 +0200 Subject: [zeromq-dev] Router to router delay In-Reply-To: <5BCF2D34-9635-4E32-BE26-5122E86612E5@gmail.com> References: <5013C451.1080000@mail1.stofanet.dk> <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> <5013D703.60502@mail1.stofanet.dk> <501646EB.9070807@mail1.stofanet.dk> <5BCF2D34-9635-4E32-BE26-5122E86612E5@gmail.com> Message-ID: <50167D83.5010007@mail1.stofanet.dk> On 2012-07-30 12:52, Cem Karan wrote: > The only other suggestion I can make would be to define some kind of control on top of your router-router connections and basically ping the remote end until you get a message back. If you put that in a moderately tight loop, say, one ping message every 10 milliseconds or so, you'll eventually get through, and the fact that you get a return tells you the connection is up. I know that that is not ideal because you'll end up with a long queue of pings that you can't get rid of after you've received a reply, but it is all I can offer as a suggestion. I do not think this is necessary, although I appreciate the suggestion. ZMQ knows when it has received the identity of the peer. It is just a question of letting it act upon this event (in one of the three ways that I have suggested in my original post.) If the ZMQ developers can agree on what the behavior should be, then I can implement it. From steven.mccoy at miru.hk Mon Jul 30 15:33:03 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Mon, 30 Jul 2012 09:33:03 -0400 Subject: [zeromq-dev] msvc and pgm In-Reply-To: References: Message-ID: On 30 July 2012 06:22, Arkady Rost wrote: > Hi! I have problems with building zeromq 3.2 with enabled openpgm support > under windows 7 in msvc 2010. Here is compiling log: > http://pastebin.com/QBTvyZDv. I've just open WithOpenPGM configuration > and tried to build a solution. Am I missing some steps? > That build target is for the build bot, you will have to modify the path configuration for it to work in your environment. I use *CMake *to make the packages available here: http://www.zeromq.org/distro:microsoft-windows The CMakeLists.txt is included in some of the repo's but still requires a few minor steps before working out of the box, but pretty straightforward. -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/bca1e9ad/attachment.htm From arkrost at gmail.com Mon Jul 30 17:34:09 2012 From: arkrost at gmail.com (Arkady Rost) Date: Mon, 30 Jul 2012 19:34:09 +0400 Subject: [zeromq-dev] msvc and pgm In-Reply-To: References: Message-ID: Thanks for reply. I've managed to solve this problem. I've download win64 openpgm installer from http://miru.hk/openpgm/. During compilation zeromq with "WithOpenPGM" configuration added ${OpenPGM_install_dir}/include to IncludeDirectories and ${OpenPGM_install_dir}/lib to LibraryDirectories. Then I recompiled jzmq and got working bindings. I don't understand how to use "zeromq-3.2.0\foreign\openpgm\libpgm-5.1.118~dfsg.tar.gz" that is mentioned on this page http://www.zeromq.org/area:download/. I think it would be great if someone could update installation instructions. Yours, Arkady Rost -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/4d8e346b/attachment.htm From iggy.philly at hotmail.com Mon Jul 30 17:38:39 2012 From: iggy.philly at hotmail.com (Iggy Philly) Date: Mon, 30 Jul 2012 11:38:39 -0400 Subject: [zeromq-dev] TCP vs IPC on common host Message-ID: I'm trying to understand the differences between using TCP and IPC between processes on the same linux host. I've seen various indications that the TCP and IPC infrastructures are the same so I'm wondering if there is any significant performance difference between the two protocols on the same host machine. Does the TCP protocol still go through the network stack if both ends are on the same host? Or could I expect performance to be similar? Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/ac5e26d4/attachment.htm From lists at chuckremes.com Mon Jul 30 17:51:13 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 30 Jul 2012 10:51:13 -0500 Subject: [zeromq-dev] TCP vs IPC on common host In-Reply-To: References: Message-ID: On Jul 30, 2012, at 10:38 AM, Iggy Philly wrote: > > I'm trying to understand the differences between using TCP and IPC between processes on the same linux host. I've seen various indications that the TCP and IPC infrastructures are the same so I'm wondering if there is any significant performance difference between the two protocols on the same host machine. Does the TCP protocol still go through the network stack if both ends are on the same host? Or could I expect performance to be similar? This is a great example of a question that could be answered by running the "perf" examples and trying out the different transports to see any differences. That's the only way to get a good answer for your environment. On Windows, IPC is *currently* handled by opening up a local TCP connection through loopback. However, that could change in a future release and result in a performance change. Same is true for Linux; more recent releases have a highly optimized kernel code path for IPC than for TCP to the same host. Try it and see. On OSX, IPC is handled via UNIX domain sockets so that the performance relative to TCP is pretty similar. Future releases of OSX may change this. You will also see performance differences depending on the size of your messages and the transport choice. Try it and see for *your app.* When doing any benchmarking, it's important that your test run for 30 or more seconds. Any "performance test" that completes in a few seconds will be dominated by startup & shutdown time and therefore give you bogus numbers, so make sure it runs longer. cr -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/e1fc4010/attachment.htm From steven.mccoy at miru.hk Mon Jul 30 18:46:56 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Mon, 30 Jul 2012 12:46:56 -0400 Subject: [zeromq-dev] msvc and pgm In-Reply-To: References: Message-ID: On 30 July 2012 11:34, Arkady Rost wrote: > Thanks for reply. I've managed to solve this problem. I've download win64 > openpgm installer from http://miru.hk/openpgm/. During compilation > zeromq with "WithOpenPGM" configuration added ${OpenPGM_install_dir}/include > to IncludeDirectories and ${OpenPGM_install_dir}/lib to > LibraryDirectories. Then I recompiled jzmq and got working bindings. > > There's also ZeroMQ with OpenPGM and JZMQ installers available, the Java bindings are hiding a bit: http://miru.hk/zeromq/ > I don't understand how to use > "zeromq-3.2.0\foreign\openpgm\libpgm-5.1.118~dfsg.tar.gz" that is mentioned > on this page http://www.zeromq.org/area:download/. I think it would be > great if someone could update installation instructions. > > Those instructions are generic for every platform but Windows which requires additional work for non-trivial builds. Building OpenPGM is outside the scope of ZeroMQ but documented on the OpenPGM site: https://code.google.com/p/openpgm/wiki/OpenPgm5CReferenceBuildLibraryWindows -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/ab16a274/attachment.htm From pelletier.michel at gmail.com Mon Jul 30 19:00:48 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 30 Jul 2012 10:00:48 -0700 Subject: [zeromq-dev] Router to router delay In-Reply-To: <50167D83.5010007@mail1.stofanet.dk> References: <5013C451.1080000@mail1.stofanet.dk> <91C79A3D-F595-4567-B006-86F71B240B93@gmail.com> <5013D703.60502@mail1.stofanet.dk> <501646EB.9070807@mail1.stofanet.dk> <5BCF2D34-9635-4E32-BE26-5122E86612E5@gmail.com> <50167D83.5010007@mail1.stofanet.dk> Message-ID: Initially I think it makes sense to implement this as a monitor event so that the signaling is out of band. As for having the 0mq developers "agree", don't worry about that. Follow the process here and your feature will get merged: http://www.zeromq.org/docs:contributing -Michel On Mon, Jul 30, 2012 at 5:26 AM, Bjorn Reese wrote: > On 2012-07-30 12:52, Cem Karan wrote: >> The only other suggestion I can make would be to define some kind of control on top of your router-router connections and basically ping the remote end until you get a message back. If you put that in a moderately tight loop, say, one ping message every 10 milliseconds or so, you'll eventually get through, and the fact that you get a return tells you the connection is up. I know that that is not ideal because you'll end up with a long queue of pings that you can't get rid of after you've received a reply, but it is all I can offer as a suggestion. > > I do not think this is necessary, although I appreciate the suggestion. > > ZMQ knows when it has received the identity of the peer. It is just a > question of letting it act upon this event (in one of the three ways > that I have suggested in my original post.) > > If the ZMQ developers can agree on what the behavior should be, then I > can implement it. > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From diffuser78 at gmail.com Mon Jul 30 20:48:25 2012 From: diffuser78 at gmail.com (diffuser78) Date: Mon, 30 Jul 2012 11:48:25 -0700 Subject: [zeromq-dev] looking inside ZMQ queue In-Reply-To: References: Message-ID: Ok, so once ZMQ sends to transport, zmq removes it from its internal queue. Is there a way to know when would ZMQ do that ? Or may be build one ? The customers of my lib want TCP like semantics and I need to tell if the buffer is copied successfully to the kernel. Any help on this is greatly appreciated. Thanks. DJ On Fri, Jul 27, 2012 at 3:46 PM, Bennie Kloosteman wrote: > Like most systems ZeroMQ will just send the message to the transport when > the transport has received the message ( eg TCP/IP )it is removed from > ZeroMQ. There are no guarantees it has even been sent , yet alone that the > transport layer on the other side has the message. This is pretty standard > TCP/IP provides no guarantees the other service has received the message ( > only the receiver TCp/IP stack) so you need to code this in your > application logic. > > Also if you are persisting you do not need a light weight system , > persistence is always slow and heavy , killing any performance ( Normally > non persistent messaging systems do at least 10* the messages / second to > persistent ones) . For persistence I would use a queue like MSMQ or the IBM > equivalent . Queues also help in knowing if the other side has received > it. > > Ben > > > > On Sat, Jul 28, 2012 at 2:27 AM, diffuser78 wrote: > >> Sorry about my ignorance and laziness. I read this on the FAQ page: >> >> >> *How do I determine how many messages are in queue?* >> >> *This isn't possible. At any given time a message may be in the ?MQ >> sender queue, the sender's kernel buffer, on the wire, in the receiver's >> kernel buffer or in the receiver's ?MQ receiver queue. Furthermore, a ?MQ >> socket can bind and/or connect to many peers. Each peer may have different >> performance characteristics and therefore a different queue depth. Any >> "queue depth" number is almost certainly wrong, so rather than provide >> incorrect information the library avoids providing any view into this data. >> * >> I had a related question but not same as above. >> >> When ZMQ sent this message over TCP to the receivier and when receiver >> did a FIN/ACK indicating that it is ACK'ing to the finish of the >> tranmission of byte transfer, it indicates that the transport layer on the >> other end got the message. Does ZMQ keep tab of this ? When does sender ZMQ >> removes this message from its internal buffer. *I am only interested in >> knowing (in YES or NO) whether this message is in sender zmq buffer or not >> *. Is that possible ? If you can point me out, I can create a patch for >> it and send for review. >> >> Any thoughts are greatly appreciated. >> >> DJ >> >> On Fri, Jul 27, 2012 at 11:16 AM, Ian Barber wrote: >> >>> On Fri, Jul 27, 2012 at 6:26 PM, diffuser78 >>> wrote: >>> > What I want to know is that, ZMQ might have returned success upon >>> buffering >>> > the message. But what if message is still in the queue and has not been >>> > delivered to the receiver for some reasons (say slow receiver). Is >>> there a >>> > way I can peek into ZMQ queue to find out if my message M that I had >>> sent in >>> > a non blocking way was indeed sent on the wire successfully? My lib >>> needs to >>> > acknowledge to the app if there was an error after some time T for it >>> to >>> > timeout on the message M. >>> >>> It could be lost in the network, or the other side could crash while >>> processing. The best way is to send an acknowledgement back from the >>> receiver (also using ZeroMQ) and use that to determine whether the >>> other side has received and processed it. >>> >>> Ian >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/73e505cc/attachment.htm From lists at chuckremes.com Mon Jul 30 21:01:53 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 30 Jul 2012 14:01:53 -0500 Subject: [zeromq-dev] looking inside ZMQ queue In-Reply-To: References: Message-ID: On Jul 30, 2012, at 1:48 PM, diffuser78 wrote: > Ok, so once ZMQ sends to transport, zmq removes it from its internal queue. Is there a way to know when would ZMQ do that ? Or may be build one ? The customers of my lib want TCP like semantics and I need to tell if the buffer is copied successfully to the kernel. > > Any help on this is greatly appreciated. > > Thanks. If your customers need TCP-like semantics, then why not create FIN/ACK (and others) as zeromq messages in your application? Every person who has responded to this thread has already told you how to solve this. The receiver must ACK the message. Then, and *only* then, will you know that the message has been sent and received. cr From diffuser78 at gmail.com Mon Jul 30 21:05:48 2012 From: diffuser78 at gmail.com (diffuser78) Date: Mon, 30 Jul 2012 12:05:48 -0700 Subject: [zeromq-dev] How to get reliability in pub-sub pattern Message-ID: Hi, From lists at chuckremes.com Mon Jul 30 21:19:45 2012 From: lists at chuckremes.com (Chuck Remes) Date: Mon, 30 Jul 2012 14:19:45 -0500 Subject: [zeromq-dev] How to get reliability in pub-sub pattern In-Reply-To: References: Message-ID: On Jul 30, 2012, at 2:05 PM, diffuser78 wrote: > Hi, > > From ZMQ guide I see that pub-sub pattern does not offer reliability, i.e. publisher doesn't know if the subscriber has been consuming messages. > > What other pattern would you recommend in pub-sub scenario where a publisher must know the details of subscribers and how many messages subscribers have consumed ? I should write a wiki article about an idea/opinion that I have. I brought it up at the Chicago meetup from a few months ago. The only socket types that we should encourage people to use are DEALER/ROUTER (and there was some discussion that this could be reduced to just ROUTER sockets). With DEALER/ROUTER, it is (hopefully) obvious how to do reliable communications between any number of peers. The patterns in the guide illustrate this nicely and in most (all?) cases use the DEALER/ROUTER socket types. For pub/sub, if you need reliability then you absolutely need bidirectional communications at your application level. The PUB/SUB sockets in the library do not offer this, so now you are back to DEALER/ROUTER. You could mimic reliable pub/sub by using two sets of sockets where the subscribers on the first set would publish the sequence numbers that have been received (or a range). Much like a sliding-window protocol, you could cheaply "ack" lots of messages. But now you need to build in additional intelligence to all subscribers so that they know to ignore duplicate sequence numbers. Plus, you have the complexity of creating a truly unique sequence number in a distributed system; that generator is oftentimes a bottle neck. Good luck. Let us know what you figure out. cr From pelletier.michel at gmail.com Mon Jul 30 23:06:47 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 30 Jul 2012 14:06:47 -0700 Subject: [zeromq-dev] How to get reliability in pub-sub pattern In-Reply-To: References: Message-ID: Also check out: http://zguide.zeromq.org/page:all#A-Shared-Key-Value-Cache-Clone-Pattern -Michel On Mon, Jul 30, 2012 at 12:19 PM, Chuck Remes wrote: > On Jul 30, 2012, at 2:05 PM, diffuser78 wrote: > >> Hi, >> >> From ZMQ guide I see that pub-sub pattern does not offer reliability, i.e. publisher doesn't know if the subscriber has been consuming messages. >> >> What other pattern would you recommend in pub-sub scenario where a publisher must know the details of subscribers and how many messages subscribers have consumed ? > > I should write a wiki article about an idea/opinion that I have. I brought it up at the Chicago meetup from a few months ago. > > The only socket types that we should encourage people to use are DEALER/ROUTER (and there was some discussion that this could be reduced to just ROUTER sockets). With DEALER/ROUTER, it is (hopefully) obvious how to do reliable communications between any number of peers. The patterns in the guide illustrate this nicely and in most (all?) cases use the DEALER/ROUTER socket types. > > For pub/sub, if you need reliability then you absolutely need bidirectional communications at your application level. The PUB/SUB sockets in the library do not offer this, so now you are back to DEALER/ROUTER. > > You could mimic reliable pub/sub by using two sets of sockets where the subscribers on the first set would publish the sequence numbers that have been received (or a range). Much like a sliding-window protocol, you could cheaply "ack" lots of messages. But now you need to build in additional intelligence to all subscribers so that they know to ignore duplicate sequence numbers. Plus, you have the complexity of creating a truly unique sequence number in a distributed system; that generator is oftentimes a bottle neck. > > Good luck. Let us know what you figure out. > > cr > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From pelletier.michel at gmail.com Mon Jul 30 23:26:31 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 30 Jul 2012 14:26:31 -0700 Subject: [zeromq-dev] TCP vs IPC on common host In-Reply-To: References: Message-ID: On Mon, Jul 30, 2012 at 8:51 AM, Chuck Remes wrote: > On Jul 30, 2012, at 10:38 AM, Iggy Philly wrote: > On Windows, IPC is *currently* handled by opening up a local TCP connection > through loopback. However, that could change in a future release and result > in a performance change. > > Same is true for Linux; more recent releases have a highly optimized kernel > code path for IPC than for TCP to the same host. Try it and see. I always thought (and it looks to me by brief code inspection) that Linux uses domain sockets as well. > > On OSX, IPC is handled via UNIX domain sockets so that the performance > relative to TCP is pretty similar. Future releases of OSX may change this. -Michel From steven.mccoy at miru.hk Tue Jul 31 01:20:54 2012 From: steven.mccoy at miru.hk (Steven McCoy) Date: Mon, 30 Jul 2012 19:20:54 -0400 Subject: [zeromq-dev] TCP vs IPC on common host In-Reply-To: References: Message-ID: On 30 July 2012 17:26, Michel Pelletier wrote: > On Mon, Jul 30, 2012 at 8:51 AM, Chuck Remes wrote: > > On Jul 30, 2012, at 10:38 AM, Iggy Philly wrote: > > > On Windows, IPC is *currently* handled by opening up a local TCP > connection > > through loopback. However, that could change in a future release and > result > > in a performance change. > > > > Same is true for Linux; more recent releases have a highly optimized > kernel > > code path for IPC than for TCP to the same host. Try it and see. > > I always thought (and it looks to me by brief code inspection) that > Linux uses domain sockets as well. > > I think the point is Unix sockets are faster than TCP because of less layers to traverse. Solaris is still I think the only OS that can bump localhost TCP connections to Unix sockets. -- Steve-o -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120730/32dbf5d9/attachment.htm From stu at compuserve.com Tue Jul 31 03:01:55 2012 From: stu at compuserve.com (Stuart Brandt) Date: Mon, 30 Jul 2012 21:01:55 -0400 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x In-Reply-To: <5012EAB7.80500@compuserve.com> References: <5012EAB7.80500@compuserve.com> Message-ID: <50172E83.5040006@compuserve.com> Just a followup that a similar issue appears to exist with ZMQ_ROUTER connecting the ZMQ_DEALER. In this case I'm seeing... Assertion failed: (prefetched_msg.flags () & msg_t::identity) == 0 (router.cpp:274) Aborted I repro'd this one with two Queue devices connecting back-to-back -- the 2nd Queue's front-end Router connecting to the back-end Dealer of the first Queue, then killing and restarting the process with the first Queue. Is there some sockopt I'm missing that could be contributing to this? On 7/27/2012 3:23 PM, Stuart Brandt wrote: > I get an assertion during a call to zmq_recv on 2 different OSes (OSX > 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and > a recent build off latest at github.com/zeromq/libzmq). > > The assertion is: > Assertion failed: (msg_->flags ()& msg_t::identity) == 0 (router.cpp:220) > Aborted > > The setup involves: > 1) the simple message queue broker found at > https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c > I modified the #include to look for zmq.h rather than zhelpers.h to get > it to compile with ZMQ 3.x > > 2) a minimal server implementation that connects to the broker and does > a zmq_recv. Code is: > // > // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket > // Connects to tcp://localhost:5560 > // > #include > #include > > int main (void) > { > char buf[80]; // buffer for zmq_recv call > int len; // len returned by zmq_recv > void *ctx; // ZMQ context > void *sock; // ZMQ socket > > // init ZMQ context, create a REP socket, and connect to ROUTER > ctx = zmq_ctx_new(); > sock = zmq_socket(ctx,ZMQ_REP); > zmq_connect (sock, "tcp://localhost:5560"); > > // do a basic zmq_recv call...warn if it fails > len = zmq_recv(sock,buf,sizeof(buf),0); > if (len< 0) { > printf("zmq_recv failed - %s\n",zmq_strerror(errno)); > } > > // Done. Clean up and end > zmq_close (sock); > zmq_term (ctx); > return 0; > } > > > Steps to repro are start server, start broker, kill broker (spec. > ctrl-C), restart broker. Server aborts with the above assertion. > > Is there something my code should be doing differently? > > Thanks....Stuart > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From pelletier.michel at gmail.com Tue Jul 31 04:39:10 2012 From: pelletier.michel at gmail.com (Michel Pelletier) Date: Mon, 30 Jul 2012 19:39:10 -0700 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x In-Reply-To: <50172E83.5040006@compuserve.com> References: <5012EAB7.80500@compuserve.com> <50172E83.5040006@compuserve.com> Message-ID: Just a guess from looking at the code, but it seems like reconnection and routers may not be playing along so well as the new connection sends the identity as the first message, and the router does not think it's in a state where it is expecting that. It seems like router should expect an identity at any time due to a reconnection, and reset it's state accordingly. If true, I'd def call that a bug. -Michel On Mon, Jul 30, 2012 at 6:01 PM, Stuart Brandt wrote: > Just a followup that a similar issue appears to exist with ZMQ_ROUTER > connecting the ZMQ_DEALER. In this case I'm seeing... > > Assertion failed: (prefetched_msg.flags () & msg_t::identity) == 0 > (router.cpp:274) > Aborted > > I repro'd this one with two Queue devices connecting back-to-back -- the > 2nd Queue's front-end Router connecting to the back-end Dealer of the > first Queue, then killing and restarting the process with the first > Queue. Is there some sockopt I'm missing that could be contributing to this? > > On 7/27/2012 3:23 PM, Stuart Brandt wrote: >> I get an assertion during a call to zmq_recv on 2 different OSes (OSX >> 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and >> a recent build off latest at github.com/zeromq/libzmq). >> >> The assertion is: >> Assertion failed: (msg_->flags ()& msg_t::identity) == 0 (router.cpp:220) >> Aborted >> >> The setup involves: >> 1) the simple message queue broker found at >> https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c >> I modified the #include to look for zmq.h rather than zhelpers.h to get >> it to compile with ZMQ 3.x >> >> 2) a minimal server implementation that connects to the broker and does >> a zmq_recv. Code is: >> // >> // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket >> // Connects to tcp://localhost:5560 >> // >> #include >> #include >> >> int main (void) >> { >> char buf[80]; // buffer for zmq_recv call >> int len; // len returned by zmq_recv >> void *ctx; // ZMQ context >> void *sock; // ZMQ socket >> >> // init ZMQ context, create a REP socket, and connect to ROUTER >> ctx = zmq_ctx_new(); >> sock = zmq_socket(ctx,ZMQ_REP); >> zmq_connect (sock, "tcp://localhost:5560"); >> >> // do a basic zmq_recv call...warn if it fails >> len = zmq_recv(sock,buf,sizeof(buf),0); >> if (len< 0) { >> printf("zmq_recv failed - %s\n",zmq_strerror(errno)); >> } >> >> // Done. Clean up and end >> zmq_close (sock); >> zmq_term (ctx); >> return 0; >> } >> >> >> Steps to repro are start server, start broker, kill broker (spec. >> ctrl-C), restart broker. Server aborts with the above assertion. >> >> Is there something my code should be doing differently? >> >> Thanks....Stuart >> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From sebastian.lauwers at gmail.com Tue Jul 31 09:00:25 2012 From: sebastian.lauwers at gmail.com (Sebastian Lauwers) Date: Tue, 31 Jul 2012 09:00:25 +0200 Subject: [zeromq-dev] zeromq 3.2 tests fails In-Reply-To: References: Message-ID: On 30 July 2012 08:44, Sebastian Lauwers wrote: > I'm not familiar enough with ZMQ to understand what's going on, so > I'll leave the rest to someone more experienced. Looking at this a bit further, this is what I found. Please note that I haven't become an expert since yesterday, so I'm mainly just going at this by intuition. Feel free to correct any mistakes I may have made or point out any wrong assumptions. In stream::engine::plug(), a call to session_base_t::get_address(), which rightfully checks whether its addr property is null before calling a method on it (session_base.cpp:269): if (addr) return addr->to_string (addr_); return -1; If addr is correctly initialised, everything is fine and dandy: we simply return the address in string format. However, addr isn't always set: In some cases, the session_base_t object is instantiated with addr = NULL (tcp_listener.cpp:105): session_base_t *session = session_base_t::create (io_thread, false, socket, options, NULL); The same line is also usedin ipc_listerner.cpp. However, in socket_base.cpp (line 492 and 529), the session is created with a non-NULL parameter: address_t *paddr = new (std::nothrow) address_t (protocol, address); alloc_assert (paddr); session_base_t *session = session_base_t::create (io_thread, true, this, options, paddr); Now, passing the paddr to the ::create() call was added in February by Staffan Gim?ker in commit b9fb48f47b8b6f211625e0897c5f52ba5cfe6593, which added the ability to propagate resolution errors on connect rather than exclusively from the IO thread. If this research is correct, then I guess two things could be done (again, feel free to add other possibilities if you see them, I'm shooting in the dark here): - Find a way to properly create the addr object before creating the session object, or, - Not use the session to get the address in string format. Thoughts? -S. From arkrost at gmail.com Tue Jul 31 09:14:21 2012 From: arkrost at gmail.com (Arkady Rost) Date: Tue, 31 Jul 2012 11:14:21 +0400 Subject: [zeromq-dev] zeromq 3.2 tests fails In-Reply-To: References: Message-ID: Extremely apologize for not replying. I'm away from my home pc where I have problems with tests. In this evening I'll manage to test a bit more. Thank you for a great response. -- Arkady Rost -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120731/b2543811/attachment.htm From sikamani at ge.com Tue Jul 31 02:14:33 2012 From: sikamani at ge.com (Sikamani, Kothandaraman (GE Global Research, consultant)) Date: Tue, 31 Jul 2012 00:14:33 +0000 Subject: [zeromq-dev] Cannot build a working JZMQ on Windows: which git branch to take? Message-ID: <52DE3381F9F917438EBEBE0C4530CE62E1B2@CINMBCNA06.e2k.ad.ge.com> After I build using MS Visiual Studio 64 bit version support with for ZeroMQ Im able to get libzmq.dll under C:\Code\zeromq-zeromq3\lib But when I try for Java wrapper to get build jzmq.dll in same Visiual Studio I get following erros 1>------ Rebuild All started: Project: jzmq, Configuration: Release Win32 ------ 1>Build started 7/30/2012 4:57:52 PM. 1>_PrepareForClean: 1> Deleting file "Release\jzmq.lastbuildstate". 1>InitializeBuildStatus: 1> Touching "Release\jzmq.unsuccessfulbuild". 1>PreBuildEvent: 1> Description: Compiling Java classes 1> 1 file(s) copied. 1>CustomBuild: 1> Generating JNI header 1> Generating JNI header 1> Generating JNI header 1> Generating JNI header 1> Generating JNI header 1> Generating JNI header 1> Generating JNI header 1>ClCompile: 1> Context.cpp 1>..\..\..\src\Context.cpp(22): fatal error C1083: Cannot open include file: 'zmq.h': No such file or directory 1> Poller.cpp 1>..\..\..\src\Poller.cpp(22): fatal error C1083: Cannot open include file: 'zmq.h': No such file or directory 1> Socket.cpp 1>..\..\..\src\Socket.cpp(23): fatal error C1083: Cannot open include file: 'zmq.h': No such file or directory 1> util.cpp 1>..\..\..\src\util.cpp(22): fatal error C1083: Cannot open include file: 'zmq.h': No such file or directory 1> ZMQ.cpp 1>..\..\..\src\ZMQ.cpp(22): fatal error C1083: Cannot open include file: 'zmq.h': No such file or directory 1> 1>Build FAILED. 1> 1>Time Elapsed 00:00:05.06 2>------ Rebuild All started: Project: remote_lat, Configuration: Release Win32 ------ 3>------ Rebuild All started: Project: local_lat, Configuration: Release Win32 ------ 4>------ Rebuild All started: Project: local_thr, Configuration: Release Win32 ------ 5>------ Rebuild All started: Project: remote_thr, Configuration: Release Win32 ------ 3>Build started 7/30/2012 4:57:57 PM. 3>_PrepareForClean: 3> Deleting file "Release\local_lat.lastbuildstate". 2>Build started 7/30/2012 4:57:57 PM. 2>_PrepareForClean: 2> Deleting file "Release\remote_lat.lastbuildstate". 4>Build started 7/30/2012 4:57:58 PM. 4>_PrepareForClean: 4> Deleting file "Release\local_thr.lastbuildstate". 2>InitializeBuildStatus: 4>InitializeBuildStatus: 4> Creating "Release\local_thr.unsuccessfulbuild" because "AlwaysCreate" was specified. 4>PreBuildEvent: 4> Description: Compiling Java classes 2> Creating "Release\remote_lat.unsuccessfulbuild" because "AlwaysCreate" was specified. 2>PreBuildEvent: 2> Description: Compiling Java classes 3>InitializeBuildStatus: 3> Creating "Release\local_lat.unsuccessfulbuild" because "AlwaysCreate" was specified. 3>PreBuildEvent: 3> Description: Compiling Java classes 5>Build started 7/30/2012 4:57:58 PM. 5>_PrepareForClean: 5> Deleting file "Release\remote_thr.lastbuildstate". 5>InitializeBuildStatus: 5> Creating "Release\remote_thr.unsuccessfulbuild" because "AlwaysCreate" was specified. 5>PreBuildEvent: 5> Description: Compiling Java classes 4>FinalizeBuildStatus: 4> Deleting file "Release\local_thr.unsuccessfulbuild". 4> Touching "Release\local_thr.lastbuildstate". 4> 4>Build succeeded. 4> 4>Time Elapsed 00:00:01.37 3>FinalizeBuildStatus: 3> Deleting file "Release\local_lat.unsuccessfulbuild". 3> Touching "Release\local_lat.lastbuildstate". 3> 3>Build succeeded. 3> 3>Time Elapsed 00:00:02.23 2>FinalizeBuildStatus: 2> Deleting file "Release\remote_lat.unsuccessfulbuild". 2> Touching "Release\remote_lat.lastbuildstate". 2> 2>Build succeeded. 2> 2>Time Elapsed 00:00:02.06 5>FinalizeBuildStatus: 5> Deleting file "Release\remote_thr.unsuccessfulbuild". 5> Touching "Release\remote_thr.lastbuildstate". 5> 5>Build succeeded. 5> 5>Time Elapsed 00:00:01.40 ========== Rebuild All: 4 succeeded, 1 failed, 0 skipped ========== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120731/3f8bbc84/attachment.htm From arkrost at gmail.com Tue Jul 31 10:18:35 2012 From: arkrost at gmail.com (Arkady Rost) Date: Tue, 31 Jul 2012 12:18:35 +0400 Subject: [zeromq-dev] Cannot build a working JZMQ on Windows: which git branch to take? In-Reply-To: <52DE3381F9F917438EBEBE0C4530CE62E1B2@CINMBCNA06.e2k.ad.ge.com> References: <52DE3381F9F917438EBEBE0C4530CE62E1B2@CINMBCNA06.e2k.ad.ge.com> Message-ID: Hello! I have same problems yesterday. Please ensure that you've configured your project correctly. Go to jzmq Project -> Properties -> VC++ Directories. Add ${jdk1.7}/include, ${jdk1.7}/include/win32, ${zeromq_compile_dir}/include to IncludeDirectories and ${zeromq_compile_dir}/lib/x64 to Library Directories. After that I suppose you'll build jzmq. -- Arkady Rost -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120731/e4cf2496/attachment.htm From hurtonm at gmail.com Tue Jul 31 12:04:17 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Tue, 31 Jul 2012 12:04:17 +0200 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x In-Reply-To: <5012EAB7.80500@compuserve.com> References: <5012EAB7.80500@compuserve.com> Message-ID: Hi Stuart, could you please file an issue for this? - Martin On Fri, Jul 27, 2012 at 9:23 PM, Stuart Brandt wrote: > I get an assertion during a call to zmq_recv on 2 different OSes (OSX > 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and > a recent build off latest at github.com/zeromq/libzmq). > > The assertion is: > Assertion failed: (msg_->flags () & msg_t::identity) == 0 (router.cpp:220) > Aborted > > The setup involves: > 1) the simple message queue broker found at > https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c > I modified the #include to look for zmq.h rather than zhelpers.h to get > it to compile with ZMQ 3.x > > 2) a minimal server implementation that connects to the broker and does > a zmq_recv. Code is: > // > // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket > // Connects to tcp://localhost:5560 > // > #include > #include > > int main (void) > { > char buf[80]; // buffer for zmq_recv call > int len; // len returned by zmq_recv > void *ctx; // ZMQ context > void *sock; // ZMQ socket > > // init ZMQ context, create a REP socket, and connect to ROUTER > ctx = zmq_ctx_new(); > sock = zmq_socket(ctx,ZMQ_REP); > zmq_connect (sock, "tcp://localhost:5560"); > > // do a basic zmq_recv call...warn if it fails > len = zmq_recv(sock,buf,sizeof(buf),0); > if (len < 0) { > printf("zmq_recv failed - %s\n",zmq_strerror(errno)); > } > > // Done. Clean up and end > zmq_close (sock); > zmq_term (ctx); > return 0; > } > > > Steps to repro are start server, start broker, kill broker (spec. > ctrl-C), restart broker. Server aborts with the above assertion. > > Is there something my code should be doing differently? > > Thanks....Stuart > > > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From breese at mail1.stofanet.dk Tue Jul 31 12:07:35 2012 From: breese at mail1.stofanet.dk (Bjorn Reese) Date: Tue, 31 Jul 2012 12:07:35 +0200 Subject: [zeromq-dev] Router to router delay In-Reply-To: <5013C451.1080000@mail1.stofanet.dk> References: <5013C451.1080000@mail1.stofanet.dk> Message-ID: <5017AE67.5050808@mail1.stofanet.dk> On 2012-07-28 12:52, Bjorn Reese wrote: > 2. Let zmq_send() return EAGAIN until the identity has been exchanged. > > 3. Add an event to notify the application that the identity has been > exchanged (e.g. via the new zmq_ctx_monitor_event() functionality.) While delving deeper into this problem, I discovered that the ZMQ_ROUTER_BEHAVIOR option is more or less what I am looking for. If this option is enabled, the call to zmq_send() will block until the identity has been exchanged, thus making the sleep() superfluous. If zmq_send() is called with ZMQ_DONTWAIT, it will return EAGAIN, which is exactly as I requested in #2 above. In the non-blocking case it may still be a good idea to receive an event when the identity has been exchanged, so I will look further into that. From breese at mail1.stofanet.dk Tue Jul 31 15:21:49 2012 From: breese at mail1.stofanet.dk (Bjorn Reese) Date: Tue, 31 Jul 2012 15:21:49 +0200 Subject: [zeromq-dev] Router to router delay In-Reply-To: <5017AE67.5050808@mail1.stofanet.dk> References: <5013C451.1080000@mail1.stofanet.dk> <5017AE67.5050808@mail1.stofanet.dk> Message-ID: <5017DBED.6040900@mail1.stofanet.dk> On 2012-07-31 12:07, Bjorn Reese wrote: > In the non-blocking case it may still be a good idea to receive an > event when the identity has been exchanged, so I will look further > into that. Patch posted in jira (LIBZMQ-407) From stu at compuserve.com Tue Jul 31 17:48:14 2012 From: stu at compuserve.com (Stuart Brandt) Date: Tue, 31 Jul 2012 11:48:14 -0400 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x In-Reply-To: References: <5012EAB7.80500@compuserve.com> Message-ID: <5017FE3E.9050701@compuserve.com> Done. LIBZMQ-406 Thanks for confirmation. Let me know if there's any additional context needed. - Stuart On 7/31/2012 6:04 AM, Martin Hurton wrote: > Hi Stuart, could you please file an issue for this? > > - Martin > > On Fri, Jul 27, 2012 at 9:23 PM, Stuart Brandt wrote: >> I get an assertion during a call to zmq_recv on 2 different OSes (OSX >> 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and >> a recent build off latest at github.com/zeromq/libzmq). >> >> The assertion is: >> Assertion failed: (msg_->flags () & msg_t::identity) == 0 (router.cpp:220) >> Aborted >> >> The setup involves: >> 1) the simple message queue broker found at >> https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c >> I modified the #include to look for zmq.h rather than zhelpers.h to get >> it to compile with ZMQ 3.x >> >> 2) a minimal server implementation that connects to the broker and does >> a zmq_recv. Code is: >> // >> // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket >> // Connects to tcp://localhost:5560 >> // >> #include >> #include >> >> int main (void) >> { >> char buf[80]; // buffer for zmq_recv call >> int len; // len returned by zmq_recv >> void *ctx; // ZMQ context >> void *sock; // ZMQ socket >> >> // init ZMQ context, create a REP socket, and connect to ROUTER >> ctx = zmq_ctx_new(); >> sock = zmq_socket(ctx,ZMQ_REP); >> zmq_connect (sock, "tcp://localhost:5560"); >> >> // do a basic zmq_recv call...warn if it fails >> len = zmq_recv(sock,buf,sizeof(buf),0); >> if (len < 0) { >> printf("zmq_recv failed - %s\n",zmq_strerror(errno)); >> } >> >> // Done. Clean up and end >> zmq_close (sock); >> zmq_term (ctx); >> return 0; >> } >> >> >> Steps to repro are start server, start broker, kill broker (spec. >> ctrl-C), restart broker. Server aborts with the above assertion. >> >> Is there something my code should be doing differently? >> >> Thanks....Stuart >> >> >> >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From ian.barber at gmail.com Tue Jul 31 18:34:40 2012 From: ian.barber at gmail.com (Ian Barber) Date: Tue, 31 Jul 2012 17:34:40 +0100 Subject: [zeromq-dev] [PATCH] [cppzmq] Add move constructor to message_t In-Reply-To: References: Message-ID: On Mon, Jul 30, 2012 at 8:55 AM, wrote: > Hi Ian, > > Thanks, but merged it in where? I cannot see the changes at > https://github.com/zeromq/cppzmq. > > So I am clear, what is the protocol for submitting patches? Should I be > sending the patch to the list for review as well as doing a pull request or > do you just want the pull request? > That's a good question! Sorry, you did the right thing submitting the pull req, but I hadn't actually merged it - must have just reviewed and made the merge up in my head. Thanks, Ian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120731/4da175b1/attachment.htm From hurtonm at gmail.com Tue Jul 31 21:26:36 2012 From: hurtonm at gmail.com (Martin Hurton) Date: Tue, 31 Jul 2012 21:26:36 +0200 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x In-Reply-To: <5017FE3E.9050701@compuserve.com> References: <5012EAB7.80500@compuserve.com> <5017FE3E.9050701@compuserve.com> Message-ID: Fixed in 9fab9937e516e78e6dbdf890e34f56cf80c9ff14. Can you check and close the issue if it fixes your problem. On Tue, Jul 31, 2012 at 5:48 PM, Stuart Brandt wrote: > Done. LIBZMQ-406 > > Thanks for confirmation. Let me know if there's any additional context > needed. > > - Stuart > > On 7/31/2012 6:04 AM, Martin Hurton wrote: >> Hi Stuart, could you please file an issue for this? >> >> - Martin >> >> On Fri, Jul 27, 2012 at 9:23 PM, Stuart Brandt wrote: >>> I get an assertion during a call to zmq_recv on 2 different OSes (OSX >>> 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and >>> a recent build off latest at github.com/zeromq/libzmq). >>> >>> The assertion is: >>> Assertion failed: (msg_->flags () & msg_t::identity) == 0 (router.cpp:220) >>> Aborted >>> >>> The setup involves: >>> 1) the simple message queue broker found at >>> https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c >>> I modified the #include to look for zmq.h rather than zhelpers.h to get >>> it to compile with ZMQ 3.x >>> >>> 2) a minimal server implementation that connects to the broker and does >>> a zmq_recv. Code is: >>> // >>> // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket >>> // Connects to tcp://localhost:5560 >>> // >>> #include >>> #include >>> >>> int main (void) >>> { >>> char buf[80]; // buffer for zmq_recv call >>> int len; // len returned by zmq_recv >>> void *ctx; // ZMQ context >>> void *sock; // ZMQ socket >>> >>> // init ZMQ context, create a REP socket, and connect to ROUTER >>> ctx = zmq_ctx_new(); >>> sock = zmq_socket(ctx,ZMQ_REP); >>> zmq_connect (sock, "tcp://localhost:5560"); >>> >>> // do a basic zmq_recv call...warn if it fails >>> len = zmq_recv(sock,buf,sizeof(buf),0); >>> if (len < 0) { >>> printf("zmq_recv failed - %s\n",zmq_strerror(errno)); >>> } >>> >>> // Done. Clean up and end >>> zmq_close (sock); >>> zmq_term (ctx); >>> return 0; >>> } >>> >>> >>> Steps to repro are start server, start broker, kill broker (spec. >>> ctrl-C), restart broker. Server aborts with the above assertion. >>> >>> Is there something my code should be doing differently? >>> >>> Thanks....Stuart >>> >>> >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From stu at compuserve.com Tue Jul 31 23:19:10 2012 From: stu at compuserve.com (Stuart Brandt) Date: Tue, 31 Jul 2012 17:19:10 -0400 Subject: [zeromq-dev] Assertion during zmq_recv in 3.x In-Reply-To: References: <5012EAB7.80500@compuserve.com> <5017FE3E.9050701@compuserve.com> Message-ID: <50184BCE.5020501@compuserve.com> Checked out OK, so I closed it. Thanks for the quick response. On 07/31/2012 03:26 PM, Martin Hurton wrote: > Fixed in 9fab9937e516e78e6dbdf890e34f56cf80c9ff14. Can you check and > close the issue if it fixes your problem. > > On Tue, Jul 31, 2012 at 5:48 PM, Stuart Brandt wrote: >> Done. LIBZMQ-406 >> >> Thanks for confirmation. Let me know if there's any additional context >> needed. >> >> - Stuart >> >> On 7/31/2012 6:04 AM, Martin Hurton wrote: >>> Hi Stuart, could you please file an issue for this? >>> >>> - Martin >>> >>> On Fri, Jul 27, 2012 at 9:23 PM, Stuart Brandt wrote: >>>> I get an assertion during a call to zmq_recv on 2 different OSes (OSX >>>> 10.7.4 and CentOS 5.8) under two different builds of 3.x (v3.2.0-rc1 and >>>> a recent build off latest at github.com/zeromq/libzmq). >>>> >>>> The assertion is: >>>> Assertion failed: (msg_->flags ()& msg_t::identity) == 0 (router.cpp:220) >>>> Aborted >>>> >>>> The setup involves: >>>> 1) the simple message queue broker found at >>>> https://github.com/imatix/zguide/blob/master/examples/C/msgqueue.c >>>> I modified the #include to look for zmq.h rather than zhelpers.h to get >>>> it to compile with ZMQ 3.x >>>> >>>> 2) a minimal server implementation that connects to the broker and does >>>> a zmq_recv. Code is: >>>> // >>>> // Demo of assertion in ZMQ 3.x by REP socket connecting to ROUTER socket >>>> // Connects to tcp://localhost:5560 >>>> // >>>> #include >>>> #include >>>> >>>> int main (void) >>>> { >>>> char buf[80]; // buffer for zmq_recv call >>>> int len; // len returned by zmq_recv >>>> void *ctx; // ZMQ context >>>> void *sock; // ZMQ socket >>>> >>>> // init ZMQ context, create a REP socket, and connect to ROUTER >>>> ctx = zmq_ctx_new(); >>>> sock = zmq_socket(ctx,ZMQ_REP); >>>> zmq_connect (sock, "tcp://localhost:5560"); >>>> >>>> // do a basic zmq_recv call...warn if it fails >>>> len = zmq_recv(sock,buf,sizeof(buf),0); >>>> if (len< 0) { >>>> printf("zmq_recv failed - %s\n",zmq_strerror(errno)); >>>> } >>>> >>>> // Done. Clean up and end >>>> zmq_close (sock); >>>> zmq_term (ctx); >>>> return 0; >>>> } >>>> >>>> >>>> Steps to repro are start server, start broker, kill broker (spec. >>>> ctrl-C), restart broker. Server aborts with the above assertion. >>>> >>>> Is there something my code should be doing differently? >>>> >>>> Thanks....Stuart >>>> >>>> >>>> >>>> _______________________________________________ >>>> zeromq-dev mailing list >>>> zeromq-dev at lists.zeromq.org >>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> _______________________________________________ >>> zeromq-dev mailing list >>> zeromq-dev at lists.zeromq.org >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> _______________________________________________ >> zeromq-dev mailing list >> zeromq-dev at lists.zeromq.org >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ > zeromq-dev mailing list > zeromq-dev at lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev From john_cerwin at yahoo.com Tue Jul 31 23:52:20 2012 From: john_cerwin at yahoo.com (John Cerwin) Date: Tue, 31 Jul 2012 14:52:20 -0700 (PDT) Subject: [zeromq-dev] java.lang.UnsatisfiedLinkError: no jzmq in java.library.path Message-ID: <1343771540.81840.YahooMailNeo@web113613.mail.gq1.yahoo.com> Hi, I am running Fedora 17 with ZMQ 2.2. It works fine under C, but I get the following error in Java when I execute the following command: java -Djava.library.path=/usr/local/lib? -cp /home/john/jzmq/src/zmq.jar:.? local_lat tcp://127.0.0.1:5000 1 100 Exception in thread "main" java.lang.UnsatisfiedLinkError: no jzmq in java.library.path ??? at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860) ??? at java.lang.Runtime.loadLibrary0(Runtime.java:845) ??? at java.lang.System.loadLibrary(System.java:1084) ??? at org.zeromq.ZMQ.(ZMQ.java:34) ??? at local_lat.main(local_lat.java:36) Here is what I have done so far: 1) Built zqm and jzmq on the same box (Fedora 17). 2) Followed the instructions here for Fedora: http://www.zeromq.org/bindings:java (***EXCEPT*** I am using zmq stable release 2.2 and NOT 2.1.10.) 3) Verified that libzmq is in /usr/local/lib, and that my java.library.path includes /usr/local/lib.? 4) Verfied that the classpath includes zmq.jar.? 5) Attempted to run it from both Eclipse and the shell? with the same resulting error. It appears that the native library cannot be found.... but could it be the incorrect version of zmq (2.2 vs 2.1.10)? Any help would be greatly appreciated! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120731/dec8e8a9/attachment.htm