[zeromq-dev] Can't make router router work will use Malamute

Douglas Petican dpetican at gmail.com
Sat Jun 11 17:12:42 CEST 2016


Thanks. Malamute looks really cool.  Nice doggy.  And I don't have to 
keep trying to reinvent the wheel ;)  I also like the idea of persistent 
storage.  Could be useful for storing logfiles and data coming from a 
datalogger attached to the system.

So, I've read the whitepaper and it seems like direct messaging is what 
I want to do.  This is how I think I should proceed.  Note that all my 
"servers/workers" process only one request and respond with one reply.  
Either success and data, or error and error message, then terminate 
normally.

1) Client spawns a worker and passes the worker its identity as a parameter

2) Client sends a direct message to the broker using its own identity 
addressed to the worker identity

3) When worker spins up it checks its mailbox and receives the message 
(request)

4) Worker does its work, sends a message (response) addressed to the 
client and terminates

5) Client receives the message (response) and does what it has to do

Q1) Should I be using something like uuids so that mailboxes have unique 
names?

Q2) Unlike req-rep which blocks will I have to keep polling the broker 
to see if there is a message?

Q3) If malamute dies can I request that when it starts up again say 
using a watchdog like monit that it starts fresh.  This is because the 
INT and TERM signals are processed by all my clients and workers as 
well.  So if one process dies.  They all die.


<-Douglas Petican->

On 2016-06-10 8:32 AM, Kevin Sapper wrote:
> Sorry messed up the link: https://github.com/zeromq/malamute
>
> 2016-06-10 14:32 GMT+02:00 Kevin Sapper <kevinsapper88 at gmail.com 
> <mailto:kevinsapper88 at gmail.com>>:
>
>     Hi Douglas,
>
>     have a look a malamute (https://github.com/zeromq/malamulte) which
>     should work for your use case.
>
>     //Kevin
>
>     2016-06-08 16:07 GMT+02:00 Douglas Petican <dpetican at gmail.com
>     <mailto:dpetican at gmail.com>>:
>
>         I want to enforce a one to one relationship between client and
>         dynamically spawned worker.  I asked before on the list and
>         was told to use a router router broker.  However, I can't get
>         my code to work in anyway with a router on both the frontend
>         and backend of the broker.  Nothing happens.  It only works
>         (almost) with a dealer backend.
>
>         The first client connects okay and the worker is spawned
>         dynamically.  When the second client connects a new worker is
>         spawned and the second client and worker talk to each other
>         exclusively, but the first client talks to both workers which
>         is not what I want.
>
>         My broker code is here: http://pastebin.com/eKVQ7VwR
>
>         The client/worker code is here: http://pastebin.com/5tU9BZRn
>
>         -- 
>         <-Douglas Petican->
>
>         _______________________________________________
>         zeromq-dev mailing list
>         zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
>         http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160611/d9d5902a/attachment.htm>


More information about the zeromq-dev mailing list