jsp/servlet中的聊天网站 [英] chat website in jsp/servlet

查看:71
本文介绍了jsp/servlet中的聊天网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用JSP/Servlet和Tomcat开发聊天网站.我有以下问题:

  1. 网站能否在不降低速度的情况下处理负载(一次可容纳1000人)?
  2. 这会导致网站变慢吗?这种网站的理想服务器配置是什么?请注意,我没有太多的托管费用.
  3. 如何实现服务器推送?
  4. PHP或JSP是否适合此类网站?

解决方案

  1. 完全取决于硬件/软件.显然,从2010年开始,它在Quadcore Xeon服务器上的运行将比从2000年开始的Octa Pentium Pro服务器运行得更快.如果有效地编写代码并将服务器配置为最佳状态,它显然也将运行并扩展得更好.

  2. 请参阅1.我建议使用 Tomcat中的NIO连接器.

  3. 您可以为此使用 Comet .在Tomcat中,可以通过 AIO(高级IO)使用.. p>

  4. 完全取决于您自己的技能.但是从技术上讲,JSP/Servlet可能会因此更好地扩展.

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

这篇关于jsp/servlet中的聊天网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆