Wednesday July 21, 2010

[Time] NameMessage
[02:38] manveru heya
[02:38] manveru does anyone know of a simple 0mq implementation that runs in a browser on websockets?
[12:42] quatrix heya
[12:43] quatrix i'm looking for docs regarding xreq/xrep, can't seem to get it working.
[12:54] quatrix if anyone could take a look what i'm doing wrong:
[12:58] sustrik quatrix: what problem do you experience with the code?
[12:58] quatrix the error i'm getting is at the top of the paste
[12:58] quatrix Assertion failed: msg_->flags & ZMQ_MSG_MORE (xrep.cpp:147)
[13:00] quatrix i have worker threads that request work/send result to producer thread, some of their request could block, so i want to use xrep/xreq so i could handle other producer requests in the meantime.
[13:00] quatrix i've also tried zmq from git, but i think i'm just not using it correctly.
[13:01] quatrix (very cool library btw)
[13:01] sustrik thanks
[13:01] sustrik ok
[13:01] sustrik when using xrep
[13:02] sustrik you have to send the requester's identity first, then the message itself
[13:03] sustrik as a two-part message
[13:04] quatrix i do this by send()ing two msgs or is there a special method?
[13:08] quatrix socket.send(msg, ZMQ_SENDMORE) ?
[13:37] sustrik quatrix: yes
[13:37] sustrik use the flag for the first part of the message
[13:37] sustrik no flag for the second one
[13:41] quatrix thanks. what do i do on the XREP side? i stopped getting the error, but can't seem to send a reply
[13:44] quatrix i'm getting 3 parts for some reason. sec, i'll paste the relevent code
[13:54] quatrix
[13:55] quatrix "got request" prints the correct request, and producer's s.send(reply) doesn't block. but workers block on s.recv(), as if the msgs get lost somewhere.
[13:55] sustrik ok, what you get is:
[13:55] sustrik 1. ID of the REQ socket
[13:55] sustrik 2. empty message part
[13:55] sustrik 3. your data
[13:56] sustrik when you want to reply, you have to send:
[13:56] sustrik 1. ID of the REQ socket
[13:56] sustrik 2. empty message part
[13:56] sustrik 3. your data
[13:57] quatrix oh! now it works!
[13:57] quatrix thanks!
[13:57] quatrix btw, will this work regardless of tcp/inproc/ipc ?
[14:01] sustrik yes, it works with any transport
[14:04] quatrix great, awesome work, thanks for your help :)
[14:48] ispot hello,how to get sample code with zeromq
[15:34] CIA-17 zeromq2: 03Martin Lucina 07master * r5b1a6a4 10/ src/ip.cpp : Issue 42 - getaddrinfo() fails -
[16:59] showstopper hey
[17:00] showstopper how do I find out how many messages there are in the message queue?
[17:04] showstopper Say I have a thread pool
[17:04] showstopper I pass messages to each thread by an inproc-connection
[17:05] showstopper now, I want to introduce some sort of dispatcher
[17:05] showstopper the thread having the fewest messages waiting to be worked on should get the next task
[17:06] showstopper I want to collect the numbers and then decide which thread to take
[17:07] showstopper In short form: I need some sort of API-call to find out the number of messages waiting in a socket queue
[17:18] guido_g there is no such thing
[17:20] showstopper Any arguments against it? Otherwise i'll try to write a patch
[17:21] guido_g ask sustrik, he's the guy
[17:22] showstopper okay
[17:23] guido_g btw, the mailing list is a better place for this kind of questions
[17:23] showstopper Probably, but I thought I just missed a function in the manual
[17:25] guido_g ØMQ is notoriously short on this kind of functionallity
[17:25] guido_g keeps the beast small and fast, i'd say
[17:26] showstopper Sure, i don't like bloated software either
[17:26] showstopper but that sort of problem seems to be a "common" one
[17:27] showstopper I don't think that an information like this is too heavy to be provided
[18:02] peano2
[18:02] peano2 there's a typo here
[18:02] peano2 This package contains Python bindings for 0QM.
[18:02] peano2 0QM
[18:10] ispot when I launch zmq_forwarder , it said "waht (): no such device". how?
[18:56] ispot why get "what (): no such device" ?
[18:59] ispot who can help me?
[18:59] ispot why get "what (): no such device" ?
[19:04] ispot hellooooo...
[19:04] ispot why get "what (): no such device" ? I launched "zmq_forwarder ...xml"
[19:40] ispot peano2: can u help me?
[20:07] ispot why get "what (): no such device" ? I launched "zmq_forwarder ...xml"
[20:07] ispot hellooooo...