[zeromq-dev] C# interface for Zmq 2.x

2010-03-17 Thread Yu, Alex (Equity Technology)
Hi Zmq dev, I am a new user for zmq and want to make use of the zmq 2.X in my C# project. I found that there is not c# wrapping for zmq 2.x. Is there any C# wrapping for 2.x just like that in 1.x? Please let me know! Thanks! Regards, Alex

Re: [zeromq-dev] Load balancing REQ/REP sockets

2010-03-17 Thread Jon Dyte
Brian Granger wrote: Hi, REQ/REP sockets have a load balancing feature. If you have 1 master with a REQ socket that binds: ctx = zmq.Context() s = ctx.socket(zmq.REQ) s.bind('tcp://127.0.0.1:') And multiple workers that connect REP sockets to the REQ: # Each worker does

Re: [zeromq-dev] Subtle zmq_poll bug #1

2010-03-17 Thread Martin Sustrik
Brian Granger wrote: What I wanted to see was whether the offending file descriptor is completely bogus or whether it was closed beforehand by 0MQ... I am not sure how to tell that from dtrace. But I can send the output if you want. Yes, please. The worse that can happen is that I won't

Re: [zeromq-dev] 0MQ version 2.0.6 (beta) released

2010-03-17 Thread Martin Sustrik
Hi Michael, You mentioned earlier that there was a number of fixes to zero-copy committed after 0MQ 2.0b2. Would you like me to re-run the Infiniband SDP tests with 0MQ 2.0.6? If so, would it be helpful if I did anything differently? I don't think anything changed performance-wise,

Re: [zeromq-dev] C# interface for Zmq 2.x

2010-03-17 Thread Martin Sustrik
Hi Alex, I am a new user for zmq and want to make use of the zmq 2.X in my C# project. I found that there is not c# wrapping for zmq 2.x. Is there any C# wrapping for 2.x just like that in 1.x? No, the C# binding wasn't yet ported to 0MQ/2.0. However, it's a couple of hours' work. Would

Re: [zeromq-dev] C# interface for Zmq 2.x

2010-03-17 Thread Yu, Alex (Equity Technology)
Thanks Martin, Of coz I would like to tried it. But I know nth about c++ so tried to use SWIG to generate the C# interface last night and failed last night. Could you send me the binding for 1.0 so that I can port it to 2.0? Kindly Regards, Alex -Original Message- From: Martin Sustrik

Re: [zeromq-dev] C# interface for Zmq 2.x

2010-03-17 Thread Martin Sustrik
Hi Alex, Of coz I would like to tried it. But I know nth about c++ so tried to use SWIG to generate the C# interface last night and failed last night. Could you send me the binding for 1.0 so that I can port it to 2.0? Here's the code for C# binding in 0MQ/1.0:

Re: [zeromq-dev] Socket connect status

2010-03-17 Thread Diablo 666
Hi, Ok. Fair enough. I believe more people are struggling with the same problem. What about writing a simple sync API implementation? for my use case, it would be sufficient to check if the underlying queue is empty. This should be very easy to implement by simply checking if begin_pos ==

Re: [zeromq-dev] Socket connect status

2010-03-17 Thread Martin Sustrik
Diablo 666 wrote: Hi, Ok. Fair enough. I believe more people are struggling with the same problem. What about writing a simple sync API implementation? for my use case, it would be sufficient to check if the underlying queue is empty. This should be very easy to implement by simply

Re: [zeromq-dev] Socket connect status

2010-03-17 Thread Diablo 666
Hi, The problem is that each end of the queue lives in a different thread. Writer thread cannot access read end of the queue and vice versa. This should not be a problem, I guess. The calling thread can see the current write position, so the positions differ after a write. Changes in the

Re: [zeromq-dev] Socket connect status

2010-03-17 Thread Brian Granger
Martin, I have thought about implementing something like this in the Python bindings using Python's builtin socket library, but having it in 0MQ itself would be nice.  Having a pure Python version would enable people to use 0MQ in situations where they can't or don't want to install libzmq.  

Re: [zeromq-dev] ZMQ 2.0.6 connect SUB socket error

2010-03-17 Thread Martin Sustrik
Hello, Matthew Giedt wrote: Hello -- I just upgraded from 2.0b2 to 2.0.6 -- (downloaded, ./configure -- make -- make install, verified new libraries and include) When running the following program with: ./test tcp://lo:5551 tcp://localhost:5551 data.txt I get: publishing on:

Re: [zeromq-dev] ZMQ 2.0.6 connect SUB socket error

2010-03-17 Thread Matthew Giedt
mgi...@ubuntu:~$ ./Tester tcp://127.0.0.1:5551 tcp://127.0.0.1:5551 test.xml publishing on: tcp://127.0.0.1:5551 success. subscribing on: tcp://127.0.0.1: terminate called after throwing an instance of 'zmq::error_t' what(): Invalid argument Aborted mgi...@ubuntu:~$ ifconfig lo lo

Re: [zeromq-dev] ZMQ 2.0.6 connect SUB socket error

2010-03-17 Thread Martin Sustrik
Matthew, The settings on your computer look OK. Your test program doesn't induce the problem on my box. Can you run it under debugger and step through zmq::resolve_ip_hostname function to see what's happening? Thanks. Martin Matthew Giedt wrote: mgi...@ubuntu:~$ ./Tester

Re: [zeromq-dev] ZMQ 2.0.6 connect SUB socket error

2010-03-17 Thread Mike Perik
I may be missing something obvious since I more of a lurker on this list then a user, but the 'subscribing' line below states that it is subscribing on port not 5551 which the original post did when 'localhost' was used. mgi...@ubuntu:~$ ./Tester tcp://127.0.0.1:5551 tcp://127.0.0.1:5551

Re: [zeromq-dev] C# interface for Zmq 2.x

2010-03-17 Thread Jeff Dik
Hi, I made some C# bindings a few weeks ago, but just committed it and pushed it: http://github.com/s450r1/zeromq2/blob/master/bindings/clr/Zmq.cs However, it's only been tested to work with the 0MQ from a few weeks ago, before the language bindings were kicked out of the core 0MQ repository :-)

[zeromq-dev] P2P updates or another method?

2010-03-17 Thread Jeff Dik
Hi, I've been wanting to use 0MQ at work, but can't quite get the behavior I want. I think I want P2P type connections, but run into the lack of auto-connect code[1]. What I'm trying to get is for an application to send lots of messages and have those stored on a queue until a client connects

Re: [zeromq-dev] Load balancing REQ/REP sockets

2010-03-17 Thread Brian Granger
Martin, The whole XREQ/XREP business is still messy. If you absolutely need it at the moment you can use XREQ to connect and load-balance messages to mutliple REPs. That way you'll get what you need without a need to do any special processing on the REP side. I have tried the XREQ - multiple

Re: [zeromq-dev] ZMQ 2.0.6 connect SUB socket error

2010-03-17 Thread Matthew Giedt
I traced the application to the point where it calls getaddrinfo which is failing on my linux machine. It's returning 1, with the error: Name or service not known I boiled down everything to: (copied straight from ip.cpp) int main( int argc, char *argv[] ) { addrinfo req; memset (req,