[zeromq-dev] Proxy with inproc frontend

2014-02-03 Thread Cosmo Harrigan
Hi, I have a scenario where I want multiple simultaneous event handlers to publish ZMQ messages on one PUB socket. To do so, I used the following design: Create two sockets, call them sockA (XSUB) and sockB (XPUB) Bind sockA to the inproc endpoint Bind sockB to the tcp endpoint Start a proxy

[zeromq-dev] Oops! I broke pyczmq

2014-02-03 Thread Greg Ward
Oops: I submitted a pull request to pyczmq last week which broke isolated imports. Example: $ python -m pyczmq.zauth Traceback (most recent call last): File /usr/lib/python2.7/runpy.py, line 162, in _run_module_as_main __main__, fname, loader, pkg_name) File

Re: [zeromq-dev] Proxy with inproc frontend

2014-02-03 Thread Goswin von Brederlow
On Mon, Feb 03, 2014 at 06:57:11AM -0800, Cosmo Harrigan wrote: Hi, I have a scenario where I want multiple simultaneous event handlers to publish ZMQ messages on one PUB socket. To do so, I used the following design: Create two sockets, call them sockA (XSUB) and sockB (XPUB) Bind sockA

Re: [zeromq-dev] Proxy with inproc frontend

2014-02-03 Thread Brandon Carpenter
Cosmo, I didn't quite follow the entire description in your post, but the first couple of sentences sound like something I am doing. I have a scenario where I want multiple simultaneous event handlers to publish ZMQ messages on one PUB socket. To do so, I used the following design: In

Re: [zeromq-dev] Idea: Create sockets from existing FD

2014-02-03 Thread Brandon Carpenter
I like the idea and was wondering myself if/how ZeroMQ could be used with systemd socket activation. On 02/01/2014 04:32 AM, Goswin von Brederlow wrote: Hi, I've been thinking of using zmq for a little daemon. But I also want to support systemd socket activation. Now those two combined make

Re: [zeromq-dev] Oops! I broke pyczmq

2014-02-03 Thread Michel Pelletier
I have a branch which reverts your import changes and switches to cffi.verify(), which speeds up the import time significantly. -Michel On Mon, Feb 3, 2014 at 7:42 AM, Greg Ward g...@gerg.ca wrote: Oops: I submitted a pull request to pyczmq last week which broke isolated imports. Example:

[zeromq-dev] Using pyczmq for zcert/zauth only

2014-02-03 Thread Greg Ward
Hi all -- I'm back to playing around with pyczmq for secure messaging. I'm perfectly happy with the pyzmq interface. In fact, I could happily stick with 0MQ 3.2.x, and ignore CZMQ (and pyczmq) entirely, except for the need for authentication and encryption. A few weeks ago, I successfully

Re: [zeromq-dev] Using pyczmq for zcert/zauth only

2014-02-03 Thread Michel Pelletier
On Mon, Feb 3, 2014 at 9:30 AM, Greg Ward g...@gerg.ca wrote: Hi all -- But that doesn't work: $ cat shadow-ctx.py import zmq from pyczmq import zctx ctx1 = zmq.Context() ctx2 = zctx.shadow_zmq_ctx(ctx1) Arghghh. Impedance mismatch. Any idea how to make that wrapper work? Hmm, I

Re: [zeromq-dev] Using pyczmq for zcert/zauth only

2014-02-03 Thread MinRK
On Mon, Feb 3, 2014 at 10:57 AM, Michel Pelletier pelletier.mic...@gmail.com wrote: On Mon, Feb 3, 2014 at 9:30 AM, Greg Ward g...@gerg.ca wrote: Hi all -- But that doesn't work: $ cat shadow-ctx.py import zmq from pyczmq import zctx ctx1 = zmq.Context() ctx2 =

Re: [zeromq-dev] Idea: Create sockets from existing FD

2014-02-03 Thread Michael Haberler
Am 01.02.2014 um 13:32 schrieb Goswin von Brederlow goswin-...@web.de: Hi, I've been thinking of using zmq for a little daemon. But I also want to support systemd socket activation. Now those two combined make a problem. ZMQ has no way to create a zmq socket given an existing FD. And

Re: [zeromq-dev] Proxy with inproc frontend

2014-02-03 Thread Cosmo Harrigan
Hi Goswin / Brandon, On Mon, Feb 3, 2014 at 8:01 AM, Goswin von Brederlow goswin-...@web.dewrote: Don't create threads like that. Create a thread pool of handlers that keep their sockets connected and dispatch events to them. That solves your problem and also cuts down on the (rather long)