I am developing an application, which communicates with other applications with REST services, i.e. expose REST services of their own and consumes other REST services. In other words the application works as both an http server and client.
Currently I use Jetty
embedded web server and Apache HttpClient
. Now I wonder if it would not be easier to use one single-threaded component, which handles all inbound/outbound HTTP requests/responses in non-blocking mode using Java NIO
?
Does it make sense? Do you know about an open source library, which does that?