[zeromq-dev] Full-Dublex communication, some questions.

artemv zmq artemv.zmq at gmail.com
Wed Jul 9 12:52:25 CEST 2014


Greetings from Ukraine.

I think I have what you want. Recently I implemented actor system on jzmq.
Take a look on
https://github.com/artem-v/jzmq-sdk/blob/master/src/main/java/org/zeromq/messaging/service/Worker.java
.
Worker is just a generic name of actor. Worker is bound to the thread.
Workers can be tied together into a graph  according to principle
master<--slave. I.e. you connect slave to master (not wise versa). Traffic
can go in both directions: from masters to slaves and backward.

What u need -- N masters, and M slaves connected to them. And according to
the framework alphabet u need to implement Processors for master and for
slave.



BR
artemv


2014-07-09 13:40 GMT+03:00 Kurt Degiorgio <kurt.degiorgio at gfi.com>:

> Hi,
>
>
>
> I am looking to implement a system, where the server controls a number of
> agents and send them processing tasks, the agents will then update the
> server (asychnrously) of the progess of the task and finally send the
> result of the task to the server.
>
>
>
> Each server can have multiple agents, and each agents can have multiple
> servers.
>
>
>
> I was looking at a dealer/router, the server won’t just randomly push
> tasks on to the clients  (hence why pub/sub won’t work)it needs to route
> them to agents according to how busy the agents are and the task at hand
> (some tasks require specific agents to be completed)
>
>
>
> Some questions:
>
>
>
> 1.       Is this the right approach? (using dealer/route)
>
> 2.       Will the agent be able communicate with the server
> asynchronously? (full dublex)
>
> 3.       Regarding recv, is there some possible event-based system in
> place? (i.e I give zeroMQ a callback and every time data is received zeroMQ
> calls that callback) because from my perspective constantly polling zeroMQ
> for data is not very efficient and will require  a dedicated thread.
>
>
>
> Thanks!
>
>
>
> Kurt.
>
>
>
>
>
>
>
>
>
> <http://gfidisc.gfi.com>
>
> *DISCLAIMER*
> The information contained in this electronic mail may be confidential or
> legally privileged. It is for the intended recipient(s) only. Should you
> receive this message in error, please notify the sender by replying to this
> mail. Please do not read, copy, forward or store this message unless you
> are an intended recipient of it - unauthorized use of contents is strictly
> prohibited. Unless expressly stated, opinions in this message are those of
> the individual sender and not of GFI. While all care has been taken, GFI is
> not responsible for the integrity of and that of the contents of this
> electronic mail and any attachments included within.
>
>
>
> <http://gfidisc.gfi.com>
>
> _______________________________________________
> 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/20140709/adc43e57/attachment.htm>


More information about the zeromq-dev mailing list