Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a Java equivalent to libevent?

I've written a high-throughput server that handles each request in its own thread. For requests coming in it is occasionally necessary to do RPCs to one or more back-ends. These back-end RPCs are handled by a separate queue and thread-pool, which provides some bounding on the number of threads created and the maximum number of connections to the back-end (it does some caching to reuse clients and save the overhead of constantly creating connections). Having done all this, though, I'm beginning to think an event-based architecture would be more efficient.

In searching around I haven't found any equivalents to libevent for Java, but maybe I'm not looking in the right place? Mina-statemachine from Apache was the closest thing I found, but it looks more verbose than I need and there's no real release available.

Any suggestions?

like image 519
JoelPM Avatar asked Feb 26 '10 00:02

JoelPM


2 Answers

I am a bit late but:

Have you looked at Netty? Or Grizzly.

like image 84
fedesilva Avatar answered Nov 03 '22 01:11

fedesilva


How about the Light Weight Event System? :) http://www.lwes.org/ and http://sourceforge.net/projects/lwes/files/

like image 1
Chris Dennett Avatar answered Nov 03 '22 02:11

Chris Dennett