[zeromq-dev] Trouble using ZMQ Ventilator/Worker/Sink paradigm with Python & C++
Kiran Karra
kiran.karra at gmail.com
Sun Dec 15 19:28:27 CET 2013
Real quick.. I'm using ZMQ 3.2, Python 2.7.5, on Mac OS-X Mavericks
Kiran
On Sun, Dec 15, 2013 at 1:25 PM, Kiran Karra <kiran.karra at gmail.com> wrote:
> Hi All,
>
> I am trying to replicate the ventilator/workers/sink paradigm described in
> the ZMQ guide. I have the same Python Ventilator, the same C++ worker as,
> and the same Python Sink as was described in the ZMQ examples. I want to
> launch the ventilator, workers, and sink from one main python script, so I
> created "class" wrappers around the ventilator & sink, and both of those
> classes subclass the Python module "multiprocessing.Process." Since the
> C++ is a binary, I launch it with Python's subprocess.Popen call.
>
> The order of starting all of this up is as follows:
> h = subprocess.Popen('test')
> time.sleep(1)
> s = sinkObj.start()
> time.sleep(1)
> v = ventObj.start()
>
> What I am finding is that no data is getting through the system when I
> start up the components like this. However, if I start the C++ binary in
> its own shell, and only start the sinkObj and ventObj from the main python
> script, it works fine.
>
> I apologize in advance if this is more of a Python question than a ZMQ
> question, but I haven't run into issues like this w/ Python's subprocess.
> I have also tried using os.system() instead of the subprocess... but same
> issue. I put all the code on this website:
> https://github.com/kkarrancsu/zmqtest
>
> Explanation of code files:
> Ventilator.py --> the ventilator code from the ZMQ guide converted to a
> "class"
> Sink.py --> the sink code from the ZMQ guide converted to a "class"
> test.cpp --> the C++ worker code from the ZMQ guide
> Makefile --> to make the test.cpp
> All.py --> file which attempts to run the workers, ventilator, and sink
> from one main file
>
> Again, sorry if this is a python question, but not sure who to get help
> from here .. Thank you very much.
>
> Kiran
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20131215/2c17134e/attachment.htm>
More information about the zeromq-dev
mailing list