[zeromq-dev] A C example using Zero-mq

2013-02-15 Thread Ajith Adapa
Hi, Anyone used the C bindings for zero-mq and have a sample example to share ?? I would like to make a try. Regards, Ajith ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/ze

Re: [zeromq-dev] how to implement zmsg_recv_nowait?

2013-02-15 Thread Apostolis Xekoukoulotakis
If you check the code of zmsg_recv, you will see that it uses zframe_recv. I think that you know how to implement it now. 2013/2/16 Majid Azimi > hi guys, > > I have asked this question in stackoverflow but there is no answer. Can > anyone help me: > > > http://stackoverflow.com/questions/148702

[zeromq-dev] how to implement zmsg_recv_nowait?

2013-02-15 Thread Majid Azimi
hi guys, I have asked this question in stackoverflow but there is no answer. Can anyone help me: http://stackoverflow.com/questions/14870251/how-to-implement-zmsg-recv-nowait Thank you very much. ___ zeromq-dev mailing list zeromq-dev@lists.zeromq.org

Re: [zeromq-dev] Repeated creation of ZMQ sockets lead to memory bloating?

2013-02-15 Thread Charles Remes
This has to do with memory fragmentation. See here: http://stackoverflow.com/questions/447899/why-does-my-c-program-not-free-memory-as-it-should Also, search the mailing list archives for a discussion on this topic a year or two ago. cr On Feb 15, 2013, at 4:55 PM, Kah-Chan Low wrote: > Hi

[zeromq-dev] Repeated creation of ZMQ sockets lead to memory bloating?

2013-02-15 Thread Kah-Chan Low
Hi! In my experimental run I repeatedly create and destroy ZMQ sockets.  I simply let the zmq::socket_t destructor take care of the deallocation.  I assume that ZMQ knows how to clean up the connections the destructed sockets have previously established. As time goes on I notice that the virtual

Re: [zeromq-dev] Zero Copy in Java jzmq

2013-02-15 Thread The Carrolls
Awesome! I'll be watching for it then. On 02/15/13 13:25, Trevor Bernard wrote: > This looks simple enough. I should be able to port this into a jzmq > branch fairly easily. > > I'll likely do it over the weekend. > > -Trev > > On Fri, Feb 15, 2013 at 1:55 PM, gonzalo diethelm wrote: >> I remembe

[zeromq-dev] Majordomo worker API destroy worker socket

2013-02-15 Thread Martijn Rijkeboer
Hi, In the s_mdwrk_connect_to_broker function of the Majordomo worker API the worker socket is destroyed and recreated. What is the reason for this since, according to the zguide, ZeroMQ reconnects automatically? Kind regards, Martijn Rijkeboer ___ z

[zeromq-dev] undefined symbols

2013-02-15 Thread Adir Iakya
Hey All :) I complied 0MQ in rhel5.6 and I'm trying to build the python module. zmq successfully finish but I have unresolved symbols that looks like that: [root@localhost zmq]# ldd -r libzmq.so undefined symbol: _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_

Re: [zeromq-dev] Zero Copy in Java jzmq

2013-02-15 Thread Trevor Bernard
This looks simple enough. I should be able to port this into a jzmq branch fairly easily. I'll likely do it over the weekend. -Trev On Fri, Feb 15, 2013 at 1:55 PM, gonzalo diethelm wrote: > I remembered that I did implement this for a tentative Java binding for > Crossroads IO. The relevant m

Re: [zeromq-dev] Joining a cluster

2013-02-15 Thread Lee Sylvester
Hi Pieter, I've just realised the O'Reilly book is an exact copy of the ZGuide. I guess I just paid £15 for something I already had for free :-( Thanks for the pointers, though. I'll read through until I have a better understanding. Regards, Lee On 15 Feb 2013, at 18:00, Pieter Hintjens

Re: [zeromq-dev] Joining a cluster

2013-02-15 Thread Pieter Hintjens
Lee, As Eric says, Chapter 8. But you will get the best results by working through the other chapters first... You can also just download Zyre and use it, without studying the internals. It's on GitHub and comes in C and Java flavours. -Pieter On Fri, Feb 15, 2013 at 6:35 PM, Lee Sylvester wrot

Re: [zeromq-dev] Zero Copy in Java jzmq

2013-02-15 Thread gonzalo diethelm
I remembered that I did implement this for a tentative Java binding for Crossroads IO. The relevant methods where send() and recv(). This all worked and performed MUCH better that current binding. Some details follow; if more is required, let me know. Usage: int size = 128;

Re: [zeromq-dev] Joining a cluster

2013-02-15 Thread Eric Hill
I've heard Chapter 8 is good candidate. On Fri, Feb 15, 2013 at 11:35 AM, Lee Sylvester wrote: > Thank you Pieter. I've just purchased an early adopter version of your > O'Reilly book, so hope to gain something from that. Is there a specific > chapter in that book that describes what I need? > >

Re: [zeromq-dev] Joining a cluster

2013-02-15 Thread Lee Sylvester
Thank you Pieter. I've just purchased an early adopter version of your O'Reilly book, so hope to gain something from that. Is there a specific chapter in that book that describes what I need? Thanks, Lee Sent from my iPhone On 15 Feb 2013, at 17:19, Pieter Hintjens wrote: > Lee, > > Read th

Re: [zeromq-dev] Joining a cluster

2013-02-15 Thread Pieter Hintjens
Lee, Read the Guide and then specifically chapter 8, which builds a framework (Zyre) do to exactly this. -Pieter On Fri, Feb 15, 2013 at 8:10 AM, Lee Sylvester wrote: > Hey guys, > > So, I have a distributed application sitting on a cluster of servers. Each > node within this cluster has a se

Re: [zeromq-dev] Unit-Testing ZMQ

2013-02-15 Thread Pieter Hintjens
On Fri, Feb 15, 2013 at 7:03 AM, Christoph Heindl wrote: > - how to test a publisher subscriber? Since there are nearly no guarantees > on the receiving side (messages can be lost), I wonder how I should > reasonably test this. How's ZMQ testing publisher/subscriber? There aren't *no* guarantee

Re: [zeromq-dev] PUSH/ROUTER

2013-02-15 Thread Pieter Hintjens
Hi Gil, You'll want to use a ROUTER socket to talk to DEALER sockets, that gives you a bidirectional flow. This is explained in the Guide, by Chapter 4 or so. -Pieter On Thu, Feb 14, 2013 at 7:05 PM, Gil Levy wrote: > Hi, > > ** ** > > I’m currently implementing a messaging solution base

Re: [zeromq-dev] Zero Copy in Java jzmq

2013-02-15 Thread Dave
This would be very helpful for a project I'm working on, I'd be very interested. -- Find me on Cowbird: http://cowbird.com/author/dave On Fri, Feb 15, 2013 at 11:06 AM, The Carrolls wrote: > > I'm thinking of extending jzmq to optionally allow the zero-copy > technique using the concepts outli

Re: [zeromq-dev] Zero Copy in Java jzmq

2013-02-15 Thread Trevor Bernard
> I'm thinking of extending jzmq to optionally allow the zero-copy > technique using the concepts outlined by Martin Thompson here: That's awesome > I'm not 100% sure I'll do it, I need some more experimentation first, > but is there any interest or words of advice if someone's tried this > alrea

[zeromq-dev] Zero Copy in Java jzmq

2013-02-15 Thread The Carrolls
I'm thinking of extending jzmq to optionally allow the zero-copy technique using the concepts outlined by Martin Thompson here: http://mechanical-sympathy.blogspot.com/2012/10/compact-off-heap-structurestuples-in.html I'm not 100% sure I'll do it, I need some more experimentation first, but is

Re: [zeromq-dev] Releasing a zeromq client to many users

2013-02-15 Thread Alan Ward
Hi Eric, Thanks for the advice. The 3 files you identify are held in /usr/local/lib on my machine. I'll experiment with a release that includes only those. Thanks Alan From: zeromq-dev-boun...@lists.zeromq.org [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of Eric Hill Sent: 15 Feb

[zeromq-dev] Joining a cluster

2013-02-15 Thread Lee Sylvester
Hey guys, So, I have a distributed application sitting on a cluster of servers. Each node within this cluster has a service that creates and handles websockets for end users. When users request a web socket, *one* of the servers (the least used, but nearest) creates the socket and returns it.

Re: [zeromq-dev] zmq_poll return value and C-CTRL interrupts

2013-02-15 Thread mycircuit
Hi Statis Thank you for your comment. I didn't consider CTRL-C as a failure , but after reading the api doc again, I understand that it is treated as such . mycircuit On 15 February 2013 14:47, Stathis Gkotsis wrote: > Hi, > > ** ** > > “Upon failure, zmq_poll() shall return -1 and set err

Re: [zeromq-dev] Releasing a zeromq client to many users

2013-02-15 Thread Eric Hill
Look in the makefile under the install section. There is a library (libzmq.so.x.x.x) and a couple of symlinks (libzmq.so.x and libzmq.so). Those three are all we needed to deploy zmq to a few servers. We built them on a development server outside of our production environment. I built a libzmq.

Re: [zeromq-dev] zmq_poll return value and C-CTRL interrupts

2013-02-15 Thread Stathis Gkotsis
Hi, "Upon failure, zmq_poll() shall return -1 and set errno to one of the values defined below", so you should check errno. BR, Stathis From: zeromq-dev-boun...@lists.zeromq.org [mailto:zeromq-dev-boun...@lists.zeromq.org] On Behalf Of mycircuit Sent: Friday, February 15, 2013 2:05 PM To: zero

[zeromq-dev] zmq_poll return value and C-CTRL interrupts

2013-02-15 Thread mycircuit
Hi I am using zeromq 3.2.2 on linux ubuntu 12.04. I am confused about the behavior of zmq_poll when getting a ctrl-c. The guide says: If your code is blocking in zmq_msg_recv(), zmq_poll() , or zmq_msg_send()

[zeromq-dev] Releasing a zeromq client to many users

2013-02-15 Thread Alan Ward
Hi, I have developed a fairly simple zeromq client-server app using 3.2.2 on Ubuntu 11.10. I wish to distribute the client application to many end-points. Note that they are ARM-based. The Ubuntu apt package for zeromq is quite old. The only way I have found of installing the client is to first i

Re: [zeromq-dev] zmq-signaler-port-sync

2013-02-15 Thread KIU Shueng Chuan
Hi Pau, I submitted a patch earlier this morning against the development branch. https://github.com/zeromq/libzmq/pull/514 It only checks for error returns from connect() and accept(). The other assertions that occur would be due to programming errors. Regarding your patch, I see that yours does

Re: [zeromq-dev] zmq-signaler-port-sync

2013-02-15 Thread Pau
Kiu, I have rethought about the problem and it is not very clear to me how to run all make_fdpair() with no asserts. The problem is that I do not know waht may happen if we call a wsa function after a failure of a previous one. I guess that we could check in a per call way and see if it is ok.