[zeromq-dev] Question for java users

Yu Dongmin miniway at gmail.com
Fri Feb 8 23:33:40 CET 2013


ZLoop is a just wrapper of ZMQ poll facility which can provide multiplexing on ZMQ sockets (and raw sockets). 

If you see the example lbbroker, lbbroker2 and lbbroker3, you would know they solve a sample problem differently. 

Actually I like using ZMQ poller directly :)


The problem could be seen as a work distribution between threads.

But what if the workers should be run on multiple machines? Can the java concurrent package solve the problem easily? A worker should be written in a different language?

Most of ZMQ pattern doesn't care and doesn't have to rewrite code whether it is run on same process, machine or other machine but socket type. Even same language.

For the best optimised multithread application within a process, the concurrent package and disruptor would give better solution. But it would not scale well.

The Storm uses disruptor for in-process communication disruptor and jzmq for inter-process communication. (Even it tries to replace the jzmq, sigh...)


If an application doesn't have to use ZMQ poll, it would not require ZLoop also.

Thanks
Min

On Feb 9, 2013, at 2:30 AM, John Watson <jkwatson at gmail.com> wrote:

> I think maybe my question was too vague.  I do understand the facilities that ZLoop provides.  I am curious as to why people have chosen it.  What kind of applications?  What kind of architecture?  There are generally many ways to go about solving problems (especially in the JVM world), and I'd like to understand the problems that have been optimally solved using ZLoop.
> 
> Thanks,
>   John
> 
> 
> 
> On Thu, Feb 7, 2013 at 11:10 PM, Min <miniway at gmail.com> wrote:
> jzmq ZLoop is missing now and I'm working on it.It requires some JNI stuff. Use dase would be exactly same with jeromq.
> 
> Thanks
> Min
> 
> 
> 2013년 2월 8일 금요일에 Ivan Pechorin님이 작성:
> 
> Hi John,
> 
> 2013/2/7 John Watson <jkwatson at gmail.com>:
> > Quick question for those of you out there who use 0mq from java.
> >
> > Do you use the jzmq ZLoop, and if so, what is an example use case?
> 
> I use JeroMQ ZLoop for polling 0mq sockets (PollItems with
> IZLoopHandlers) and for timers.
> Single thread.
> 
> > (This is specific to the java users, because I'm trying to figure out when
> > one might use ZLoop, rather than any of the built-in java.util.concurrent
> > facilities, such as a fork-join pool and simple Executors).
> 
> How are they useful for polling 0mq sockets?
> And as for the timers, it was very handy for me that ZLoop supports them too.
> 
> Regards,
> Ivan
> _______________________________________________
> zeromq-dev mailing list
> 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
> 
> 
> _______________________________________________
> 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/20130209/051ace3c/attachment.html>


More information about the zeromq-dev mailing list