问题
I want to devlelop a chat website using JSP/Servlets and Tomcat. I have following questions:
- Can the website handle load (1000 people at one time) without slowing down?
- Will it cause the website to slow down? What is the ideal server configuration for this kind of website? Note that I don't have a huge budget to host.
- How can I implement server push?
- Will PHP or JSP be ideal for such website?
回答1:
Depends entirely on hardware/software. It will obviously run faster on a Quadcore Xeon server from 2010 than an Octa Pentium Pro server from 2000. It will also obviously run and scale better if the code is written efficiently and the server is configured to an optimum.
See 1. I'd suggest to use the NIO connector in Tomcat.
You can use Comet for this. In Tomcat, it's available by AIO (Advanced IO).
Depends entirely on your own skillset. But technically, JSP/Servlet will likely scale better with this.
回答2:
why re-invent the wheel? Just use an XMPP client. Here are some good clients and claros in particular is a good one.
来源:https://stackoverflow.com/questions/2477135/chat-website-in-jsp-servlet