[zeromq-dev] pyzmq behind pyramid/pylons REST endpoint -- inproc and not block?

Kevin Sapper kevinsapper88 at gmail.com
Thu Nov 17 12:08:11 CET 2016


Hi Michael,

In C (czmq) we use actors to distribute work across threads. Have a 
look at https://github.com/zeromq/czmq#toc2-8330 which explains the 
idea. This approach is used for example with zyre or malamute.

//Kevin

On So, Nov 13, 2016 at 2:01 , Mazzaroth M. <taomailings at gmail.com> 
wrote:
> Hi all, I'm still pretty new to zeromq but I'm pretty excited about 
> its possibilities. So I have a python class that binds a Router while 
> Dealer workers connect over tcp. It is pretty much the example found 
> at 
> http://www.hatchd.com.au/chookfeed/zmq-and-the-art-of-work-distribution/
> 
> I modified it such that the class will PULL from a client that is 
> doing a PUSH. Every time I get a PUSH I will pass the json along to 
> the Router which will distribute the task to a Dealer worker. So the 
> webapp REST endpoint does a 
> backend_socket.connect("tcp://localhost:5754") to send the json to 
> the Router/Dealer. This seems to work nicely.
> 
> Pardon my noob question here but what I'd like to know is, if I 
> incorporate a Router/Dealer in the webapp process(using inproc), how 
> do I architect it such that zeromq proxy between the Router/Dealer 
> does not block the entire webapp upon initialization? I am talking 
> about something like this example in the guide: 
> http://zguide.zeromq.org/py:mtserver
> 
> Is this possible or are most zeromq architectures in a separate 
> running process? Is there a better way?
> 
> regards,
> Michael
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20161117/3601b32f/attachment.htm>


More information about the zeromq-dev mailing list