[zeromq-dev] czmq container serialization

2015-01-12 Thread Alex Cornejo
Hi all, As part of an application I am developing I need to serialize/unserialize a zlistx_t and a zhash_t into/from messages. In my particular use case, the elements stored in these containers belong to a custom czmq-style C class with its own my_class_new/my_class_destroy. When I first read th

Re: [zeromq-dev] Alternative efficiency design of lbbroker

2015-01-12 Thread Kenneth Adam Miller
No, I don't want dealer router combination. Basically I have two mutually requiring parties that are each doing a lot of processing and work, distributed over a lot of machines. They all run concurrently, so there has to be a reliable way to facilitate an exchange of a work task from a producer to

Re: [zeromq-dev] Alternative efficiency design of lbbroker

2015-01-12 Thread Benjamin
>> But I want to do simply a request to the broker and receive the information >> I need in order to send directly to the other entity. I don't follow the question. You're talking about name-resolution? Chain of servers is how DNS works for instance (router => X => router). Some server knows the

Re: [zeromq-dev] Alternative efficiency design of lbbroker

2015-01-12 Thread Pieter Hintjens
No apologies, I wasn't aiming to be critical. It's just that the thinking process happens best by making working code and then improving it. If you have specific questions others can help. With larger architectural questions, you won't often get answers here. On Mon, Jan 12, 2015 at 3:43 PM, Kenne

Re: [zeromq-dev] Alternative efficiency design of lbbroker

2015-01-12 Thread Kenneth Adam Miller
Oh I apologize. I was just asking if what I was thinking of was possible with zeromq. On Mon, Jan 12, 2015 at 4:29 AM, Pieter Hintjens wrote: > > In any case, does what I am thinking about work? > > It's usually a good idea to make small pieces, and grow your > understanding of your problem and

Re: [zeromq-dev] Message queuing broker for mobile device

2015-01-12 Thread Pieter Hintjens
You must set these before doing a bind or connect. On Mon, Jan 12, 2015 at 11:07 AM, Gang Liu wrote: > I already tried this way(set > ZMQ_TCP_KEEPALIVE/ZMQ_TCP_KEEPALIVE_CNT/ZMQ_TCP_KEEPALIVE_IDLE/ZMQ_TCP_KEEPALIVE_INTVL > at broker front end zsock), it seems these setting don't apply to new > i

Re: [zeromq-dev] Message queuing broker for mobile device

2015-01-12 Thread Gang Liu
I already tried this way(set ZMQ_TCP_KEEPALIVE/ZMQ_TCP_KEEPALIVE_CNT/ZMQ_TCP_KEEPALIVE_IDLE/ZMQ_TCP_KEEPALIVE_INTVL at broker front end zsock), it seems these setting don't apply to new incoming connection. I will try again. regards, Gang On Mon, Jan 12, 2015 at 5:57 PM, Pieter Hintjens wrote:

Re: [zeromq-dev] Message queuing broker for mobile device

2015-01-12 Thread Pieter Hintjens
You can change the TCP socket keep alive setting, yes. See http://api.zeromq.org/4-2:zmq-setsockopt#toc42 On Mon, Jan 12, 2015 at 10:43 AM, Gang Liu wrote: > After some tracing, I found this case could be repeated when client > socket in connected state and I power off Wi-Fi router > or turn off

Re: [zeromq-dev] Message queuing broker for mobile device

2015-01-12 Thread Gang Liu
After some tracing, I found this case could be repeated when client socket in connected state and I power off Wi-Fi router or turn off mobile device 3G DATA signal before zmq client do disconnect. Is there any way to enable broker's low level client TCP sockets KEEP_ALIVE option? I try to setopt

Re: [zeromq-dev] Message queuing broker for mobile device

2015-01-12 Thread Pieter Hintjens
These sockets are managed automatically by TCP. On Mon, Jan 12, 2015 at 7:41 AM, Gang Liu wrote: > Dear all, > I am new to zeromq. I have a question about message > queuing broker (msgqueue.c) which use zmq_proxy() forward msgs between > frontend and backend. > In my testi

Re: [zeromq-dev] Alternative efficiency design of lbbroker

2015-01-12 Thread Pieter Hintjens
> In any case, does what I am thinking about work? It's usually a good idea to make small pieces, and grow your understanding of your problem and alternative solutions like that. No-one here can do that for you. On Mon, Jan 12, 2015 at 7:31 AM, Kenneth Adam Miller wrote: > Instead of routing all