jsp/servlet 中的聊天网站

发布于 2024-08-25 17:53:07 字数 206 浏览 2 评论 0原文

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

  1. 网站能否在不减慢速度的情况下处理负载(一次 1000 人)?
  2. 会不会导致网站速度变慢?此类网站理想的服务器配置是怎样的?请注意,我没有太多的预算来主持。
  3. 如何实现服务器推送?
  4. PHP 还是 JSP 适合这样的网站?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谁与争疯 2024-09-01 17:53:07
  1. 完全取决于硬件/软件。显然,它在 2010 年的四核 Xeon 服务器上运行得比 2000 年的 Octa Pentium Pro 服务器上运行得更快。如果代码编写得高效并且服务器配置为最佳状态,它的运行和扩展显然也会更好。

  2. 参见 1。我建议使用 NIO 连接器< /a> 在 Tomcat 中。

  3. 您可以使用 Comet 来实现此目的。在 Tomcat 中,可通过 AIO(高级 IO) 获得。

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

  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.

蓦然回首 2024-09-01 17:53:07

为什么要重新发明轮子?只需使用 XMPP 客户端即可。这里有一些不错的客户端claros 尤其是一个很好的选择。

why re-invent the wheel? Just use an XMPP client. Here are some good clients and claros in particular is a good one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文