David Rosenstrauch wrote:
Mark Webb wrote:
This was discussed in length on this mailing list back when the
article was posted. I vaguely remember the discussion, other than it
happened.
Checking the archives should give you what you are looking for.
--Mark
Ah, didn't realize. Will go RTFM. Sorry for the noise.
No problem.
This is a really interesting post. In fact, it was somehow the first
time someone did such a extensive comparison, and it's quite a valuable
piece of work.
So why choose NIO over BIO ? There are many reasons. Here are some of them :
- You need scalability. BIO will scale less easily than NIO (but you
will have to go above the 10 thousands connections
- You need to handle many thousands connections, like 100 000. No way to
do that with BIO, as you won't be able to launch more than 32 000
threads. NIO does not suffer from such a limt.
You also have to put that in perspective : when MINA started, the new
JVM was 1.4, and creating tens of thousands threads was not an option at
all back then.
Now, I think that we should consider offering the very same API, but
extend it to BIO (if possible without a lot of work).
Of course, this is not something we can target for 2.0, but may be for
3.0 (we have started to think about the future, and it's available here :
http://cwiki.apache.org/confluence/display/MINA/MINA+3.0+design
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org