[zeromq-dev] Designing a new architecture

andrea crotti andrea.crotti.0 at gmail.com
Fri Aug 3 14:13:52 CEST 2012


2012/8/2 Michel Pelletier <pelletier.michel at gmail.com>:
> Specifically, check out cliff's cool interactive mode:
>
> http://cliff.readthedocs.org/en/latest/interactive_mode.html
>
>>
>> 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
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev




So far I haven't found much more in the InteractiveClass to help me
putting zeromq and cliff together actually:

class cliff.interactive.InteractiveApp(parent_app, command_manager,
stdin, stdout)

it still takes a stdin and stdout objects, so it expects files..
Instead of making a zeromq object behave like a file we could make it
write and read from a file which is written and read by different
processes, could that be a solution?



More information about the zeromq-dev mailing list