chat website in jsp/servlet

六眼飞鱼酱① 提交于 2019-12-12 06:39:36

问题


I want to devlelop a chat website using JSP/Servlets and Tomcat. I have following questions:

  1. Can the website handle load (1000 people at one time) without slowing down?
  2. 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.
  3. How can I implement server push?
  4. Will PHP or JSP be ideal for such website?

回答1:


  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.

  2. See 1. I'd suggest to use the NIO connector in Tomcat.

  3. You can use Comet for this. In Tomcat, it's available by AIO (Advanced IO).

  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!