I wrote a high-performance server that processes every request in its stream. For requests coming into it, sometimes you need to do RPC for one or more back-end. These internal RPCs are processed by a separate queue and thread pool, which provides some limitation on the number of threads created and the maximum number of connections to internal content (it does some caching to reuse clients and save overhead by constantly creating links). However, having done all this, I begin to think that event-based architecture will be more efficient.
While searching around, I did not find the libevent equivalents for Java, but maybe I'm not looking in the right place? Apache's Mina-statemachine was the closest I found, but it looks more verbose than I need and there is no real release.
Any suggestions?
source
share