08 September 2008

Avoid NIO, Get Better Throughput?

Avoid NIO, Get Better Throughput | Javalobby
However, in most instances, maybe non-blocking I/O is not necessary at all? In fact, maybe it is detrimental to performance?... The characteristics of JVMs and threading libraries change as new advances are made. Good advice often becomes bad advice over time... Paul’s experiments show that higher throughput is achieved with blocking I/O, that thread-per-socket designs actually scale well, and that the costs of context-switching and synchronisation aren’t always significant.

Hmmmmm, I guess its worth trying both? Hopefully using existing libraries for network applications allows you to do this simply.