The advantage of using NIO versus BIO in a berth?

Any compromise experience regarding nio vs bio when working with heap and computationally intensive process for each request with execution time in the range (100 ms-900 ms)?

+3
source share
3 answers

The real problem is how many concurrent open connections you want to scale for each physical server (say, to support push ala Comet pattern messaging with the server - and who doesn't want to do this these days?), NIO will provide you with realism ranging from 10,000 to 20,000. Streams are an extremely expensive resource in terms of OS implementation (for thread memory consumption and overhead for context switching). Thus, thousands of NIO connections can be supported using a modest thread pool.

Use an NIO infrastructure like MINA, and rolling out NIO is not bad at all. (This is actually quite simple.) I rolled up my own NIO and then turned on MINA. MINA is a good way to go.

http://mina.apache.org/testimonials.html

EURid MINA .eu 7- 2006. 700 000 4 . MINA 0,5 . SSL .

MINA . MINA 0.8.1, API .

+2

, . java.nio , java.io( - JDK 7 - ). , - .

+1
source

All Articles