Re:How to get C like performance in Java
by peter_lawrey on Thursday July 21, 2011 @05:04AM
(#2788909)
> Terrible advice. Use NIO and do it properly. Creating 1 thread per connection is for unskilled programmers.
Sometimes the simple solutions are the best. Developing a complex and clever solution may your feel more skilled. Using a dispacther pattern often doesn't provides a real advantage and or the advantage it provides isn't needed.
I would agree with the suggestion that if you are going to use a dispatcher pattern with NIO, use a library like netty which does this for you. (In any case you don't write it youself)
Re:How to get C like performance in Java
by pkl on Thursday July 21, 2011 @12:34PM
(#2790162)
I have and if you use blocking IO or NIO its like twenty lines, code just about any one can read and maintain. Why make it more complicated than it needs to be?
I would agree with the suggestion that if you are going to use a dispatcher pattern with NIO, use a library like netty which does this for you. (In any case you don't write it youself)