IRC Log

Wednesday September 14, 2011

[Time] NameMessage
[06:46] khigia mysql
[06:47] khigia hi, sorry, typed in wrong window.
[07:26] CIA-121 rbzmq: 03Brian Buchanan 07master * rce2f948 10/ rbzmq.c : Merge pull request #12 from skaes/silence ...
[07:27] CIA-121 rbzmq: 03Brian Buchanan 07master * r2534629 10/ zmq.gemspec : gem version 2.1.4 - http://git.io/PuXXwg
[08:05] MickeM I am trying to implement the lazy pirate pattern, but for some strange reason I get no reply in my client... everything works fine and the queue process the request, send it off to the work, gets it back and then send it to the client... but the client never gets anything...
[08:05] MickeM anyone have any ideas on where to start?
[08:05] MickeM to me it looks correct, right address and everything...
[08:06] MickeM but I am unsure how the client actually "subscribes" but maybe theat is automagic?
[08:46] sustrik MickeM: what socket types are you using?
[08:53] MickeM tcp
[08:53] MickeM for the client I mean... using inproc for workers though...
[08:56] MickeM (one might add that the poller "returns" directly if I set a timeout, but I assumed that was related to some bug, if I set timeout to -1 it hangs "forever")
[09:34] sustrik i meant, what socket type
[09:34] sustrik pub/sub?
[09:34] sustrik req/rep?
[09:48] MickeM aha, same as in the sample Client is so should be req/rep... "client" is ZMQ_REQ and "server" is ZMQ_XREP...
[10:20] sustrik MickeM: try to create a mimimal test case to reproduce the problem
[10:20] sustrik then post it on gist (or similar) and ask here
[10:21] sustrik alteratively, ask on the mailing list
[10:33] MickeM sustrik: ok... but is there some method to debug issues like this?
[10:33] MickeM ie.can I see where a message goes and/or if there are messages waiting somwhere or something like that?
[10:33] MickeM so I am more trying to understand how to figour out what the problem is then a solution...
[10:34] sustrik right
[10:34] sustrik you can check the network traffic using tcpdump for example
[10:34] sustrik to see whether the message crosses the network
[10:35] MickeM ok... but no "logging" or something like that in zeromq?
[10:36] sustrik you mean like logging every outgoing message?
[10:48] MickeM sustrik: that would be one option, another would be to logg all "missing messages" ie. messages which gets "lost"...
[10:52] sustrik how would you know which message is missing?
[10:54] MickeM sustrik: presumably zeromq would know that right? (so I was looking for some debug zeromq feature which could help)
[10:54] sustrik how can it possibly know?
[10:55] sustrik you can timeout
[10:55] sustrik that's best that you can do
[10:55] sustrik if no message is received in 10 secs, then consider it lost
[10:55] sustrik that, obviously, doesn't mean you aren't going to get it one second later
[10:55] MickeM sustrik: well, this was a debuggning feature ie... have zeromq stdout "whoops, got a message noone subscribe to: this will be discarded".. or something like that...
[10:56] sustrik ah, i see
[10:56] sustrik no, there's no such logging
[10:56] sustrik you can add it though
[10:56] sustrik let me check the code
[10:56] sustrik which version are you using?
[10:57] MickeM sustrik: 2.1.9 and an old 2.0.something.. I guess 2.1.9 is the interesting one...
[10:57] sustrik ok
[10:57] sustrik wait a sec
[10:57] MickeM sure...
[10:58] sustrik you can add a printf at src/xsub.cpp:118
[11:00] MickeM ahh, cool... thank you....
[12:23] CIA-121 libzmq: 03Martin Sustrik 07master * r42737f0 10/ .gitignore : test_invlid_rep added to .gitignore ...
[12:36] CIA-121 libzmq: 03Martin Sustrik 07master * rcf499ee 10/ src/dist.cpp : Bug in message distribution algorithm fixed (issue 251) ...
[13:17] CIA-121 libzmq: 03Martin Sustrik 07master * r78b02d1 10/ src/dist.cpp : Minor optimisation in message distribution algorithm ...
[14:43] someone-noone1 hello! I'm trying to write 0mq binding on c++ for some framework where is impossible to use lib0mq. And i have some protocol questions:
[14:45] someone-noone1 Basically, i'm running ZMQ_REP hello_world server that is sending "hello world" on every received request. (This part is for testing and using lib0mq)
[14:46] someone-noone1 Now, i'm connecting to this server from another application. And my steps are next: send greeting, send test message
[14:47] someone-noone1 i've read this rfc http://rfc.zeromq.org/spec:15 and don't understand how to fill greeting correct
[14:49] someone-noone1 what value should be socket_type? Why there is "more flag" in the end of challenge?
[14:49] someone-noone1 Can anyone help with this?
[14:55] someone-noone i'm here for now..
[15:02] sustrik someone-noone: what version of 0mq are you using?
[15:03] someone-noone sustrik: hm... how can i check it? I was installing it from ports...
[15:03] sustrik look at zmq.h
[15:04] sustrik it's there
[15:04] sustrik also, there's a zmq_version() function
[15:04] someone-noone kk, 1 min
[15:07] someone-noone sustrik: major, minor, patch: 2, 0, 10 (zmq_version)
[15:08] sustrik ok
[15:09] sustrik the doc you've referenced is wrong
[15:09] sustrik there's no version in the protocol
[15:09] sustrik simply send an empty message as a greeting from each side
[15:10] sustrik and then you can exchange request and replies as normal
[15:10] someone-noone thanks
[15:11] someone-noone sustrik: uint8_t empty_msg[2]; empty_msg[0] = 1; empty_msg[1] =0;
[15:11] someone-noone is this an empty msg?
[15:12] sustrik yes
[15:12] someone-noone sustrik: thanks, a lot. I will go and play with it
[15:12] sustrik sure
[15:13] sustrik feel free to ask if you run into a problem
[15:13] someone-noone thanks
[15:29] someone-noone sustrik: i'm gettin assertion viloation ( fetched (rep.cpp:232) ) when i'm sending empty packet and string packet after it. If i send only empty packet everything seems to be ok. Here is a code of how i'm doing it: http://pastebin.com/y37YV2nz
[15:30] sustrik let me check
[15:32] sustrik ok, i see
[15:33] sustrik the thing is that req/rep has a routeback stack in the messages
[15:34] sustrik here's the explanation: http://www.zeromq.org/tutorials:xreq-and-xrep
[15:34] someone-noone thanks *reading*
[15:35] sustrik however, if what you aim at is simple req/rep with no intermediate nodes
[15:35] someone-noone my aim is to make a basic req/rep and then extend it for intemediate nodes and so on
[15:35] someone-noone untils my boss will tell that it's enough :)
[15:35] sustrik simply prepend both request and reply with empty message part with MORE flag set and followed by the actuall message body
[15:36] sustrik the whole thing would look like this:
[15:36] sustrik when sending a request, prepend it by empty message part
[15:37] sustrik when receiving a request, store all the initial message parts up to the empty message part -- what follows is the body
[15:37] sustrik when sending a reply, attach the stored message parts to the reply
[15:37] sustrik when receiving a reply, strip the initial empty message part
[15:37] sustrik that's it
[15:39] someone-noone thanks, let me think about it
[15:40] sustrik btw, what are you working on?
[15:40] sustrik some kind of native client?
[15:41] someone-noone i want to add 0mq support for crtmpserver... this framework has own event-subsytem and single-threaded
[15:43] someone-noone basically i want to proof a concept... and then we will see if there any reason to complete full compability or just only some features
[15:48] sustrik i see
[15:51] shales someone-noone: if you can give crtmpserver's event-subsystem an FD to wait for it to become readable then you can probably use libzmq
[15:52] someone-noone shales: does libzmq single-threaded?
[15:53] shales It starts at least one io thread
[15:53] shales Can you have no threads at all, or do you just want an API that doesn't block?
[15:54] someone-noone shales: i must work only in 1 thread for whole application. If i don't this, i will break idealogy of crtmpserver
[15:55] someone-noone shales: so i can use with libzmq only if i will control sending\recving data from epoll and friends
[15:56] someone-noone and after that sending it to libzmq. But, afaik, it's impossible
[15:56] shales maybe I misunderstand the requirements of crtmpserver, but I think it could work
[15:57] someone-noone shales: definetely, it could. But the question is: can it be done without spawning additional threads?
[15:58] shales yeah, none of the code you write rungs on libzmq's io thread. The zmq context you create is associated with your one crtmpserver main thread and all calls the libzmq are made on this thread. Inside it will pass the messages to the IO thread where they are actually send. The io thread sends events back to the context's thread (your main thread) through a pipe.
[15:59] shales You can add that pipe read side's FD to your epoll so that you know when to do a non-blocking send or recv on the 0mq socket
[15:59] shales rungs = runs
[16:01] someone-noone shales: Sounds promising. I'm sorry, but my work-day ended hour ago. Can we continue this talk tomorrow?
[16:01] shales look at the ZMQ_FD and ZMQ_EVENTS options of zmq_getsockopt
[16:01] someone-noone okay, i will do that
[16:01] someone-noone sounds really promising
[16:01] shales sure
[16:02] someone-noone shales,sustrik: good bye, thanks for help!
[16:03] sustrik see you
[16:03] shales bye
[16:07] shales zedas: incidentally, have you seen the eventlet fork trying to fix the race conditions integrating with 0mq without polling?
[16:08] zedas shales: i think i wrote that.
[16:08] shales ya :) I meant the patch I posted about on the eventletdev list
[16:09] shales trying to support multiple senders and receivers
[16:09] zedas shales: nope i'm not on the list. i only use eventlet at work. got a link?
[16:11] shales ya, I'll forward you the email I sent to the list if you don't mind
[16:50] calvin If I update my server to version 3.0 do I need to update my client as well? Is there any backwards compatibility?
[16:51] pieterh calvin_: you need to upgrade all peers, 2.1 and 3.0 don't interoperate
[16:53] calvin Do you know if there's a C# binding that uses 3.0? I don't see a clrzmq3 and the README in clrzmq2 is blank
[16:54] calvin I'm guessing I could just have clrzmq2 use a 3.0 version of libzmq but i'm not sure if that's supported behavior
[17:05] pieterh calvin_: the binding will probably need some changes to work with 3.0
[17:05] pieterh the version of the binding is NOT the version of 0MQ it supports
[17:05] pieterh this was simply the second C# binding
[17:05] calvin hmmm ok
[17:22] calvin hmm yeah it seems like it hasn't been updated since may
[17:30] calvin is there a way to know if there's a plan to update the binding for 3.0?
[17:33] calvin i could do it myself but i want to make sure it isn't already in progress
[17:38] cremes calvin_: post a question to the ML and ask here; that's probably all u can do
[18:27] mikko jamon serrano <3
[20:09] MickeM Sorry for bothering you again... But I am giving this one more go...
[20:09] MickeM I have a req/rep setup ala lazy pirate: C => Q => W. But nothing gets sent from the queue back to the client. (but works, from client to queue to worker and back to queue, then send "does nothing")
[20:09] MickeM have checked with ethernet sniffer and send(frontend) does NOT send anything...
[20:09] MickeM any ideas on how to debug would be aprechiated...
[21:44] MickeM Is there a reason for all the ...just silently ignore the message ?