Re: [zeromq-dev] Vulnerability of devices to incoming messages

2010-08-10 Thread Pieter Hintjens
Benjamin, Could you provide a minimal test case that reproduces the problem, and perhaps file an issue on the github tracker, thanks. -Pieter On Tue, Aug 10, 2010 at 8:34 AM, MinRK benjami...@gmail.com wrote: Hello, I'm using ZMQ devices for parallel computing in IPython.  One of our devices

[zeromq-dev] ZMQ_XREQ - assertion failed

2010-08-10 Thread ilejncs
Hello! I need a simple request/response interaction, though I am not happy with ZMQ_REQ/ZMQ_REP pattern. The main reason is it is unclear what I supposed to do if a response from a server is delayed or lost. Do we have an example covers e.g. reopening the socket in this case? Is it reasonable

Re: [zeromq-dev] OOB abort of previously sent msgs?

2010-08-10 Thread Pieter Hintjens
On Tue, Aug 10, 2010 at 2:30 AM, Matt Weinstein mattweinst...@gmail.com wrote: What I'd prefer is a zmq_abort(socket) that kills the most recent train of packets, as long as a SNDMORE == 0 packet has not been sent. These are likely to be sitting in a ypipe somewhere along the chain. I suspect

Re: [zeromq-dev] ZMQ_XREQ - assertion failed

2010-08-10 Thread Pieter Hintjens
Hi, You are running into a classic problem and yes, the solution is to use XREQ/XREP. However the necessary message format is not documented yet. You can look at the code for REQ and see how it constructs the request, then you can do the same in your client before calling XREQ. I hope to have

Re: [zeromq-dev] pub/sub topic matching on sender side

2010-08-10 Thread Pieter Hintjens
Jon, We know how to upstream the subscriptions from SUB to PUB but it involves a fair chunk of work internally to 0MQ. -Pieter On Tue, Aug 10, 2010 at 11:07 AM, j...@totient.demon.co.uk wrote: Hi Does anyone have any pointers/design sketch on what needs to be changed to get the pub/sub

Re: [zeromq-dev] Change to zmq_tcp(7) page

2010-08-10 Thread Martin Lucina
Pieter, p...@imatix.com said: Attached is a change I'd like to make to de-emphasize non-portable device names and point people rather towards binding to * for starters. Reason: to reduce avoidable mistakes. This change is fine, but the patch you sent also includes an extraneous change to

Re: [zeromq-dev] Change to zmq_tcp(7) page

2010-08-10 Thread Martin Lucina
p...@imatix.com said: On Tue, Aug 10, 2010 at 12:28 PM, Martin Lucina m...@kotelna.sk wrote: This change is fine, but the patch you sent also includes an extraneous change to builds/redhat/zeromq.spec. I presume that would be a separate commit. Ah, sorry, the lack of a robust procedure

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread gonzalo diethelm
COBOL on AIX... eyes glaze over, PTSD kicks in... Oops. Sorry about that; I am stuck with this POS. Gonzalo, sounds like a very interesting project. You'll have seen the discussion on reliability at http://www.zeromq.org/blog:requirements-for-reliability? Yes, and I am thinking

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread gonzalo diethelm
Why not port the COBOL to a real VMS platform instead of Charon VAX or whatever you are using? What kind of application is this and are the sources still available? It was this way initially, and we stepped away from hardware-based VMS, it was deemed too risky. Not that Charon is less risky,

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread Pieter Hintjens
On Tue, Aug 10, 2010 at 2:17 PM, gonzalo diethelm gdieth...@dcv.cl wrote: COBOL on AIX... eyes glaze over, PTSD kicks in... Oops. Sorry about that; I am stuck with this POS. Oh, not that, just that in the 80's I must have written half a million lines of Cobol. Yes, and I am thinking pretty

Re: [zeromq-dev] Eben Moglen's LibrePlanet 2010 Keynote

2010-08-10 Thread Peter Alexander
Yes. This along with net-neutrality concerns, are very troublesome. Ever since I read Martin's post, the word federation has been stuck in my mind. This one word accurately describes part of the vision I have for my data laboratory project. And naturally, thanks to 0mq it makes a federation of

[zeromq-dev] zmq_poll: timeout issue

2010-08-10 Thread ilejncs
Hello! I am observing rather strange zmq_poll behavior. It is triggered by timeout and works fine if -1. The client looks like == zmq::context_t ctx (1); zmq::socket_t s(ctx, ZMQ_REQ); // Connect to the server. s.connect (tcp://localhost:23001); for (int i = 0; i != 20;

Re: [zeromq-dev] zmq_poll: timeout issue

2010-08-10 Thread Martin Lucina
Hi, ilej...@narod.ru said: I am observing rather strange zmq_poll behavior. It is triggered by timeout and works fine if -1. This is a known issue with the current zmq_poll() implementation. The zmq_poll(3) documentation mentions this, albeit briefly: Important The zmq_poll()

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread Pieter Hintjens
On Tue, Aug 10, 2010 at 3:17 PM, Peter Alexander vel.ac...@gmail.com wrote: Sorry for this ot post, but I just had to say thanks for mentioning ditaa. I've been looking for a little gem like this for a long time and don't know why I had not found it myself earlier. Yes, it's elegant. For

Re: [zeromq-dev] pub/sub topic matching on sender side

2010-08-10 Thread Matt Weinstein
Does this have security implications, or is it _just_ for performance? If for performance, you can use hints to the upstream on a pub/sub channel from the endpoints to the upstream servers. There are lots of simple protocols, like using a GUID per client and sending an update or a delta to

Re: [zeromq-dev] zmq_poll: timeout issue

2010-08-10 Thread Martin Lucina
matt_weinst...@yahoo.com said: This is the same problem as pthread condition variables have, e.g.: http://www.justsoftwaresolutions.co.uk/threading/condition-variable-spurious-wakes.html Just think of the revents as condition variables to check... Does someone want to write a quick

Re: [zeromq-dev] zmq_poll: timeout issue

2010-08-10 Thread Matt Weinstein
ZMQ_FD and ZMQ_EVENTS appear to return the current status of a socket, am I right? I looked at the poll() code but it looks pretty vanilla, list of timers ... except for the cross-thread counter, which would be nice, is that what I'm seeing ...? On Aug 10, 2010, at 10:17 AM, Martin Lucina

Re: [zeromq-dev] zmq_poll: timeout issue

2010-08-10 Thread Ilja Golshtein
Martin, Matt, thank you very much for clarification and for speedy answering. To be honest I don't fill why spurious wakeups are unavoidable in 0mq ... though it doesn't matter. Here is a mockup of client application == // One I/O thread in the thread pool will do. zmq::context_t ctx

Re: [zeromq-dev] Vulnerability of devices to incoming messages

2010-08-10 Thread Pieter Hintjens
Hi Benjamin, Thanks for posting the test case, it makes it clear. At the least the documentation for zmq_device(3) should state what socket types are safe to use. Do any other socket types prepend an identity apart from XREP? -Pieter On Tue, Aug 10, 2010 at 10:25 AM, Pieter Hintjens

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread gonzalo diethelm
COBOL on AIX... eyes glaze over, PTSD kicks in... Oops. Sorry about that; I am stuck with this POS. Oh, not that, just that in the 80's I must have written half a million lines of Cobol. Poor you. So you want a reliable pipeline. What are your reasons for not using xreq/xrep and

Re: [zeromq-dev] zmq_poll: timeout issue

2010-08-10 Thread Matt Weinstein
Basically -- reverse the normal server paradigm, and use an XREP socket on the device side, then have each server send a single message when it wakes up on its REQ socket. This message identifies the server to the device side by UUID. The server will be back to alternative recv-send

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread Pieter Hintjens
On Tue, Aug 10, 2010 at 7:33 PM, gonzalo diethelm gdieth...@dcv.cl wrote: What would I gain from xreq/xrep, that could not be done with push/pull? Mind you, I have not yet used xreq/xrep, so my question is out of sheer ignorance. With push/pull there's no reply, so no way to tell the sender

Re: [zeromq-dev] 0MQ to the rescue

2010-08-10 Thread Matt Weinstein
XREQ/XREP are used if your requester or servicer needs to wait for a response or request, i.e. if you're in a threaded model. If you're in an asynchronous model, you're going to be doing all the housekeeping yourself and anything will work as long as it transports packets. On Aug 10, 2010,

Re: [zeromq-dev] Vulnerability of devices to incoming messages

2010-08-10 Thread MinRK
On Tue, Aug 10, 2010 at 10:14, Pieter Hintjens p...@imatix.com wrote: Hi Benjamin, Thanks for posting the test case, it makes it clear. At the least the documentation for zmq_device(3) should state what socket types are safe to use. Do any other socket types prepend an identity apart from

Re: [zeromq-dev] IPC REQ/REP socket unavailable to other users?

2010-08-10 Thread Steven McCoy
On 11 August 2010 03:00, Dana Leonard dleo...@gmail.com wrote: Is this a standard behavior for IPC sockets on Unix or does the socket need additional configuration to allow different users to use it? I have tried changing the permissions on the socket to 777 to no avail. Even root cannot