Issue
Currently for a class, I'm implementing a server which receives two types of connections, using TCP, and a custom application layer protocol. Though for the class, this is how the project needs to be done, I was wondering about the advantages/disadvantages of using something like Tomcat or a similar web server to receive all incoming communication, vs. using Java's NIO or a networking framework like Mina (which I'm using) or Netty (which I want to play around with at some point).
Though I'm asking about Java (because it's what I'm most comfortable with) specifically, you are more than welcome to expand this to any other languages.
I'm looking for comments on performance, ease of use, scalability (both in how well it scales development wise and usage wise), security, and any other base you think you may put information on.
Anyways, any input would be greatly appreciated.
Regards, Omar Ferrer
Solution
I think history sheds some light on the answer.
Tomcat predates Java NIO by many years. The thinking at the time that a queue for incoming requests and a pool of threads, one thread per request was best.
Data would suggest that Java NIO scales better, JBOSS maintains and uses it now.
I would not be surprised to learn that Tomcat was being refactored to use Netty.
Answered By - duffymo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.