Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which NIO library (Netty, Grizzly, kryonet, ...) for simple backend server implementation in Java?

Tags:

Our frontend is simple Jetty (might be replaced with Tomcat later on) server. Through servlets, we are providing a public HTTP API (more or less RESTful) to expose our product functionality.

In the backend, we have a Java process which does several kind of maintenance tasks. While the backend process usually does it own tasks when it's time, now and then, the frontend needs to wake-up the backend to execute a certain task in the background.

Which (N)IO library would be ideal for this task? I found Netty, Grizzly, kryonet and plain RMI. For now, I am inclined to say Netty, it seems simple to use and it is probably very reliable.

Does any of you have experience in this kind of setups? What would your choice be?

thanks!

like image 487
Japer D. Avatar asked Nov 25 '11 12:11

Japer D.


2 Answers

Try to translate this document which answer to your question. http://blog.xebia.fr/2011/11/09/java-nio-et-framework-web-haute-performance/

This society, as french famous Java EE experts, did a lot of poc of NIO servers in the context of a french challenge sponsored by VmWare (USI2011). It was about building a simple quizz app that can handle a load of 1 million connected users.

They won that challenge with great results. Their implementation was Netty + Gemfire and they only replaced the CachedThreadPool by a MemoryAwareThreadPool.

Netty seems to offer great performances, and is well documented.

They also considered Deft, inspired by Tornado (python/facebook) but it's still a bit immature for them

Edit: here's the translated link provided in the comments

like image 150
Sebastien Lorber Avatar answered Sep 28 '22 04:09

Sebastien Lorber


My preference is Netty. It's simple yet flexible. Very fast and the community around Netty is awesome.

like image 25
Mike Heath Avatar answered Sep 28 '22 05:09

Mike Heath