[zeromq-dev] multiprocessing + testing with pyzmq

Sean Ochoa sean.m.ochoa at gmail.com
Mon Oct 3 09:16:19 CEST 2011


The issue here, it seems, is timing.  The children would like to communicate
as quickly as is possible, and then exit as soon as is possible.  I'm
finding that the parent process loses messages because the children exit too
quickly.  How might I resolve that problem?  I would like to avoid using
sleep.

I tried using a child req > parent reply pattern to force the children to
wait to exit until all the messages are processed, but that might not be the
best solution. I've attached a copy of my test script that doesn't work yet.


Let me know what you think.

Thanks,
Sean


On Sat, Oct 1, 2011 at 11:56 PM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> On 10/02/2011 01:22 AM, Sean Ochoa wrote:
>
>> Hey all.  I'm thinking of testing a design for our concurrent
>> application using zeromq, but I'm wondering what type(s) of sockets I
>> should use.  I need to communicate using IPC from multiple processes
>> back into one process so that I can track the number of processes doing
>> stuff in stages as work gets done.  Any ideas?
>>
>
> It's status monitoring. I would opt for PUB/SUB.
>
> Martin
>



-- 
Sean | (206) 962-7954
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111003/085bf078/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 3620 bytes
Desc: not available
Url : http://lists.zeromq.org/pipermail/zeromq-dev/attachments/20111003/085bf078/attachment.py 


More information about the zeromq-dev mailing list