Answer the question
In order to leave comments, you need to log in
Is it worth using the Netty library in Java?
Hello. I am faced with a choice, use the Netty library, or simply use a regular server on blocking IO with many threads. To be more precise, my server is the server of a small Android App, which must connect to the server to make a request, and the server must analyze this request, make a request to the database and give a response to the client. Everything is quite simple and, in principle, all the work should go to a database query. So, as far as I know (I'm a beginner), it's impossible to query the database in Hander-re Netty, because it will slow down the entire system, it turns out you need to create an additional thread ... But then what's the point in netty? In this case, if the main load of the server will be to work with the database, is it worth bothering with Netty at all?
Answer the question
In order to leave comments, you need to log in
public static final EventExecutorGroup group = new DefaultEventExecutorGroup(16);
pipeline.addLast(group, "handler", new MyBusinessLogicHandler());
Or take any implementation JAX-RS 2.0
there are asynchronous rest endpoint's
It strongly depends on the load. If the load is supposed to be low, then there is no need for netty and it's easier to do it because it's faster / easier / cheaper. When / if the load starts to increase, then the problem should be solved.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question