Re: [zeromq-dev] [PATCH] Add Zmq module namespace for ruby binding. Fix extconf.rb.

2010-02-08 Thread Chris Wong
manually using. ruby extconf.rb --with-libzmq-lib= Chris On Feb 8, 2010, at 5:46 PM, Chris Wong wrote: > From: Chris Wong > > --- > bindings/ruby/extconf.rb |4 +- > bindings/ruby/rbzmq.cpp | 73 +++-- > 2 files changed, 39 inserti

Re: [zeromq-dev] [PATCH] Add Zmq module namespace for ruby binding. Fix extconf.rb.

2010-02-11 Thread Chris Wong
hris P.S.: Surprised that there is not much more opinions on the ruby binding. On Feb 9, 2010, at 3:16 AM, Martin Sustrik wrote: > Chris Wong wrote: >> The ruby binding doesn't build correctly on Mac OS X Snow Leopard. This will >> fix the build. However, I haven't fixed

Re: [zeromq-dev] [PATCH] Add Zmq module namespace for ruby binding. Fix extconf.rb.

2010-02-16 Thread Chris Wong
I'm submitting the patch with MIT license. On Feb 12, 2010, at 6:05 AM, Martin Sustrik wrote: > Hi Chris, > >> The suggestion on extconf.rb looks great. I'd incorporate that. >> >> IMHO, the namespace is a must, which we both agreed. I'm open to >> name it ZMQ rather than Zmq if you prefer th

Re: [zeromq-dev] Language binding guidelines

2010-03-01 Thread Chris Wong
Here is my $0.02 on Ruby. 1. There is no need for the Factory pattern in Ruby. ;-) In Ruby, the class object is the factory. That said, I don't think the context object is the same as factory object though. One can have multiple ZMQ::Context objects, but you can only have one Class object in

Re: [zeromq-dev] Language binding guidelines

2010-03-01 Thread Chris Wong
On Mar 1, 2010, at 9:29 PM, Brian Granger wrote: > Chris, > >> 2. I prefer option 2. >> >>ctxt = ZMQ::Context.new >>sock = ctxt.socket(ZMQ::PUB) > > Other than the socket being named "create_socket" this is what I am > doing with Python bindings. > Different style in naming.

[zeromq-dev] udp not enabled on Mac OS X 10.6

2010-03-02 Thread Chris Wong
Try to build from HEAD in github for the first time on Mac OS X 10.6 and the summary of configure showed that udp transport is not supported. I don't have a Linux box at home to try that. Is UDP not supported on Mac? % ./configure --with-c --with-cpp --with-java --with-forwarder --with-streame

Re: [zeromq-dev] udp not enabled on Mac OS X 10.6

2010-03-02 Thread Chris Wong
Why is UDP support coupled with PGM? Isn't there use-cases where UDP is sufficient? Chris On Mar 2, 2010, at 11:04 PM, Steven McCoy wrote: > On 3 March 2010 12:37, Chris Wong wrote: > Try to build from HEAD in github for the first time on Mac OS X 10.6 and the > summary of co

Re: [zeromq-dev] udp not enabled on Mac OS X 10.6

2010-03-03 Thread Chris Wong
Sorry for the late reply. I didn't run configure --with-pgm. I was expecting udp to mean unicast UDP. On a related note, is there any plan to support unreliable multicast? Chris On Mar 3, 2010, at 4:53 AM, Martin Lucina wrote: > sust...@250bpm.com said: >> >> Interestingly, the configure si

Re: [zeromq-dev] udp not enabled on Mac OS X 10.6

2010-03-04 Thread Chris Wong
Yes, I would indeed like to have a look. Probably sometimes later this month. Like everyone else, there is always higher priority stuff waiting. On Mar 4, 2010, at 2:43 AM, Martin Sustrik wrote: > Chris Wong wrote: > >> On a related note, is there any plan to support unreliab

Re: [zeromq-dev] Language binding guidelines

2010-03-04 Thread Chris Wong
Hi Marin, I can provide patches for 2 and 3. Will put that on my list of to-dos. Chris On Mar 2, 2010, at 2:27 AM, Martin Sustrik wrote: > Chris Wong wrote: > >> 2. I prefer option 2. >> >> ctxt = ZMQ::Context.new sock = ctxt.socket(ZMQ::PUB) > > Yes. It l

Re: [zeromq-dev] udp not enabled on Mac OS X 10.6

2010-03-05 Thread Chris Wong
Actually i want support for unreliable multicast vs reliable multicast. Zeromq is a nice framework to allow me to transparently switch the underlying transport. There are applications that don't need the ordering and lossless guarantee of PGM. The unreliable multicast transport may or may n

[zeromq-dev] Patches for Ruby binding

2010-03-05 Thread Chris Wong
Per previous discussion on the list, included are two patches to the ruby binding. 1. Socket object is now created via Context#socket Attempt to create call Socket.new will result in exception TypeError thrown 2. Expose close method in Socket explicitly GC-based language like R

Re: [zeromq-dev] Unreliable multicast was: udp not enabled on Mac OS X 10.6

2010-03-05 Thread Chris Wong
On Mar 5, 2010, at 12:04 PM, Martin Sustrik wrote: > Martin Lucina wrote: > >> Yes, but once you introduce sequence numbers you're going to need a >> handshake to initialise those, which means a "virtual connection" of some >> sort, and if you want to do that using multicast I guess you'll end u

Re: [zeromq-dev] Patches for Ruby binding

2010-03-05 Thread Chris Wong
I'll try to fix the perf tests in the Ruby binding code later. Currently, I'm having issue getting zmq_bind to work on my Mac OS X box. It's giving the following error. error in zmq_bind: Can't assign requested address I tried binding to tcp://lo0: or tcp://en0:. None of them work. S

[zeromq-dev] Patch for bind error on Mac OS X

2010-03-05 Thread Chris Wong
This fixes the problem of bind failing on Mac OS X 10.6 with EADDRNOTAVAIL I'm submitting this patch with the LGPL license. 0001-sockaddr_in.sin_zero-on-Mac-OS-X-wasn-t-initialized..patch Description: Binary data ___ zeromq-dev mailing list zeromq-dev

[zeromq-dev] Patch for resolve_nic_name to get out as soon as it finds the first match

2010-03-05 Thread Chris Wong
While debugging the bind failure on Mac OS X, I stumbled across the code in resolve_nic_name where it's not breaking out of the for loop upon the first match. Here is a patch to fix that up... unless getting the last match is the intention. I'm not even sure that there is any guaranteed order

Re: [zeromq-dev] Patch for resolve_nic_name to get out as soon as it finds the first match

2010-03-06 Thread Chris Wong
ich is the case here - while the language bindings have > different licenses depending on the licensing model their authors > have chosen. > > Martin > > Chris Wong wrote: >> While debugging the bind failure on Mac OS X, I stumbled across the >> code in resolve_nic

[zeromq-dev] Signal handling in blocking zmq_recv

2010-03-07 Thread Chris Wong
When I'm playing around with ZMQ, I notice that once a process is block in zmq_recv waiting for incoming message, it won't respond to SIGTERM or SIGQUIT. I have to SIGKILL it in order to terminate a process that's block on zmq_recv. What's the signal handling model in ZMQ? I couldn't find a

[zeromq-dev] bind vs connect for ZMQ_PUB socket

2010-03-07 Thread Chris Wong
In the documentation of pub/sub multicast example, http://www.zeromq.org/area:docs-v20#toc13 Both PUB and SUB socket always have zmq_connect call. In perf/c/local_thr.c and perf/c/remote_thr.c, the SUB socket always call zmq_bind and the PUB socket always call connect. In the tcp PUB/SUB examp

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
Martin, thanks for the pointer to the zmq-camera example. It handles SIGINT/SIGQUIT etc by exiting the process. If I want to interrupt all the blocked zmq_recv calls when receiving a SIGINT, how would you suggest me approaching this problem? zmq_recv seems to be blocked forever. I tool a bri

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
Martin, If pthread_sigmask() is used to block any signals from interrupting the I/O thread, how do one unblock a blocked zmq_recv? What's the alternative if we need to do so? Chris On Mar 9, 2010, at 12:43 PM, Martin Lucina wrote: > Brian, > > elliso...@gmail.com said: >> This example is he

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
> Martin, I almost forgot, weren't we going to either change the default > behaviour of zmq_term() or add a flag to say "Please go away NOW!"? > That'd be a welcomed "feature" :-) > -mato > ___ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org >

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
Mato, That's the only case I can think of now also. Chris On Mar 9, 2010, at 12:52 PM, Martin Lucina wrote: > Cgris, > > ch...@chriswongstudio.com said: >> If pthread_sigmask() is used to block any signals from interrupting the I/O >> thread, how do one unblock a blocked zmq_recv? What's the

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
>> When would you want to unblock a blocked zmq_recv()? The only time I can >> think of doing that legitimately is when the entire application/component >> is going away, in which case we want to change the behaviour of zmq_term() >> as discussed in my other email. > > I agree that most of the tim

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
How deep down the pipeline is this feature at? :-) If I beg nicely, will it float to the top of the priority list? Chris > > Yes. Sane termination of blocking calls in case of zmq_term is in the > pipeline. > > The idea is that once you call zmq_term on the context, all blocking > calls wit

Re: [zeromq-dev] Signal handling in blocking zmq_recv

2010-03-09 Thread Chris Wong
If you replace Python's sig handler, aren't you removing all the logics in Python's sig handler, whatever Python may have to do. Chris On Mar 9, 2010, at 1:37 PM, Brian Granger wrote: > A correction... > >> Thus, I think the only way of resolving this if 0MQ is making out >> signals in the IO

[zeromq-dev] zmq_send and zmq_close synchronization

2010-03-09 Thread Chris Wong
When zmq_send is called, it returns immediately which is good. AFAIK, the message will be eventually sent out by the IO thread. If zmq_close is called on the socket before the message got sent out from the IO thread, the pending message seem to get removed without getting sent out. Is there an

Re: [zeromq-dev] Problem with libtool --version in autogen.sh

2010-03-14 Thread Chris Wong
I assume you're using MacPorts' build of libtool? the autogen.sh step is a one-time thing. So, if you create a symlink in /opt/bin/libtool to glibtool and /opt/bin/m4 to /opt/bin/gm4, that should solve your problem. Remove the symlink after you're done. Chris On Mar 12, 2010, at 8:35 PM, Bri

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

2010-03-16 Thread Chris Wong
Kudos to the 0mq team. On Mar 16, 2010, at 2:21 PM, Martin Sustrik wrote: > Hi All, > > I am happy to announce the release of 0MQ version 2.0.6 (beta). > > The new release can be downloaded on the website, here: > http://www.zeromq.org/area:download-v20 > > News since version 2.0 beta 3: > > Dis

[zeromq-dev] Disable message batching

2010-04-15 Thread Chris Wong
I have an application that needs to send out a message as soon as possible without waiting for the optimistic batching. Latency is more important than message throughput. Is there a switch I can use with zmq_setsockopt to disable batching? I looked at the man page but couldn't find anything t

Re: [zeromq-dev] Disable message batching

2010-04-15 Thread Chris Wong
Ah shoot. I really need that. I'll try to resurrect it. What would be a good alternative name for it? Maybe it should come back as a socket option? Thoughts? Chris On Apr 15, 2010, at 5:44 PM, Martin Lucina wrote: > ch...@chriswongstudio.com said: >> I have an application that needs to se

Re: [zeromq-dev] Disable message batching

2010-04-15 Thread Chris Wong
I was stumbling around the code and found a out_batch_size in config.hpp. I wonder what would happen if I lower that value. :-) A hint is better than nothing, I suppose. I don't mind that it's getting sent out in the background I/O as soon as possible without a hard guarantee at the app threa

Re: [zeromq-dev] Proposal for 2.0.7: Cleaning up the ZMQ_* constants

2010-04-15 Thread Chris Wong
I agree with mato. Let's bite the bullet now when it's still in beta rather than later. Having consistent naming is more valuable than the extra savings in typing. In Python/Ruby, you can always save typings by importing the nested constants. With flat constants, you don't have that option.

Re: [zeromq-dev] Recovering POSIX errno

2010-04-15 Thread Chris Wong
There is an example in the man page of zmq_strerror. Basically, it uses the same thread-local errno variable. Not sure if it's thread-local on Windows though. Chris On Apr 11, 2010, at 9:36 PM, Derek Developer wrote: > From the docs: > > " The ØMQ library functions handle errors using the st

Re: [zeromq-dev] Disable message batching

2010-04-19 Thread Chris Wong
Hi Martin, I found out that it was a stupidity on my part. Here is how I got into this confusing situation that misled me to speculate batching was causing the delay. A publisher process outside the firewall needs to publish message via a ZMQ_PUB socket. The subscribers are within the firewal

Re: [zeromq-dev] Subscribing in JAVA api

2010-05-11 Thread Chris Wong
Martin, I think Robin meant that the subscriber wants to subscribe to messages of topic "animals.mammals" and not receiving message of topic "animals.mammals.cats" In C, we'd call setsockopt with "animals.mammals\0". What's the Java way of doing that? Chris On May 11, 2010, at 2:11 PM, Marti

Re: [zeromq-dev] Subscribing in JAVA api

2010-05-13 Thread Chris Wong
On May 12, 2010, at 2:40 AM, Martin Sustrik wrote: > Hi Chris, > >> I think Robin meant that the subscriber wants to subscribe to >> messages of topic "animals.mammals" and not receiving message of >> topic "animals.mammals.cats" >> >> In C, we'd call setsockopt with "animals.mammals\0" > > No

Re: [zeromq-dev] NEWS: Git 'master' is now 2.1.x development

2010-11-02 Thread Chris Wong
Hi, Hi, I'm starting a project to migrate existing messaging code to ZeroMQ. The new zmq_close/term() semantic in 2.1 is important for this project. Do we already have a rough roadmap on approximately when 2.1 will be out of beta? Any guesstimate is better than nothing. :-) Thanks Chris On