4 ms·
"NIO/MINA is the right answer on Java." I think my point, which admittedly is only informed by the work of some brilliant people, is that your point is not sup
by KirinDave 16y ago
"NIO/MINA is the right answer on Java."
I think my point, which admittedly is only informed by the work of some brilliant people, is that your point is not supported by data gathered on modern hardware with modern operating systems running a modern JVM. At least, not in all cases. With care and some tuning, people can get extremely good performance out of the thread-per-connection approach. Please check the document linked in the parent to this thread (http://paultyma.blogspot.com/2008/03/writing-java-multithreaded-servers.html http://paultyma.blogspot.com/2008/03/writing-java-multithrea...)
What's more, even the systems that are very good at this do not use something like NIO, epoll, or select (as anything other than a very buried implementation detail). Erlang, for example, doesn't restrict you to the kind of model that raw NIO does. NIO is a fine thing for what it is, and a potential building block for many things, but it's not a very compelling as a server framework. MINA is a better suggestion, but still not a universal catch all for these sorts of problems.
I'm not trying to say, "NIO is never right, tpp is never wrong." I'm just saying your categorical statement is not always correct. Making that statement is wrong, and it's misleading, and I don't think the problem you found was really due to the unavoidable overhead of the threading.
- MostAwesomeDude 16y agoOkay. I concede.
- KirinDave 16y agoI didn't even know a person COULD enter these words into an internet text box. I thought the internet itself would reject them. ;) I salute you, sir.