jsp/servlet 中的聊天网站
我想使用 JSP/Servlet 和 Tomcat 开发一个聊天网站。我有以下问题:
- 网站能否在不减慢速度的情况下处理负载(一次 1000 人)?
- 会不会导致网站速度变慢?此类网站理想的服务器配置是怎样的?请注意,我没有太多的预算来主持。
- 如何实现服务器推送?
- PHP 还是 JSP 适合这样的网站?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
完全取决于硬件/软件。显然,它在 2010 年的四核 Xeon 服务器上运行得比 2000 年的 Octa Pentium Pro 服务器上运行得更快。如果代码编写得高效并且服务器配置为最佳状态,它的运行和扩展显然也会更好。
参见 1。我建议使用 NIO 连接器< /a> 在 Tomcat 中。
您可以使用 Comet 来实现此目的。在 Tomcat 中,可通过 AIO(高级 IO) 获得。
完全取决于您自己的技能。但从技术上讲,JSP/Servlet 可能会更好地扩展。
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.
为什么要重新发明轮子?只需使用 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.