[zeromq-dev] Designing a new architecture

Michel Pelletier pelletier.michel at gmail.com
Thu Aug 2 20:09:12 CEST 2012


Specifically, check out cliff's cool interactive mode:

http://cliff.readthedocs.org/en/latest/interactive_mode.html

On Thu, Aug 2, 2012 at 11:07 AM, Michel Pelletier
<pelletier.michel at gmail.com> wrote:
> On Thu, Aug 2, 2012 at 9:50 AM, andrea crotti <andrea.crotti.0 at gmail.com> wrote:
>> I have to restructure a complex application and I would like to do this
>> with zeromq, I'm reading the doc and trying out things but I'm a bit
>> lost now, so some hints might be very useful..
>>
>> The application I'm writing is very parallel, there are many
>> long-running processes that do things, managed by a central daemon.
>>
>> I would like to be able to communicate with these processes to check the
>> current status, and interact with it, and these processes should write
>> the results on a common sink.
>>
>> So it looks like the multiple worker with a sink might be the right
>> choice, but I also want to be able to communicate with every single
>> process separately.
>
> I would suggest looking at the ROUTER socket in detail and
> specifically the LRU pattern in the guide.  You may only need the
> "back-half" of the LRU pattern to do what you need.  This allows you
> to have bidirectional communication with a bunch of workers.
>
>> Another thing which I'd like to do is to use Python Cmd class, and I
>> thought I could create a zmq class that behaves like a file, and thus be
>> passed in the Cmd object.
>
> I would avoid stretching the file abstraction over a zmq socket like
> that.   Maybe another library that is more flexible for command line
> and simple interpreters like cliff
> (http://pypi.python.org/pypi/cliff/) would be easier for you to
> integrate with zmq.  Cmd after all, is pretty archaic and file
> oriented.
>
> -Michel



More information about the zeromq-dev mailing list