保持网站活力的技术堆栈

发布于 2024-11-02 07:42:48 字数 866 浏览 1 评论 0原文

网站最常见的技术堆栈是 Lamp,部分原因是它随处可用,部分原因是编程模型非常简单:对服务器的每个请求都会生成对代码的单个调用和发回的单个 HTML 块。

但请考虑需要保持活动功能的 Web 程序的要求,即向 Javascript 前端提供连续的实时数据流。我从服务器响应中的 “连接:保持活动” 中得到的印象, http://ajaxian.com/archives/mibbit-ajax-based-irc-clienthttp://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/ 的原因是 Lamp 并不是为这种类型的工作负载而设计的。

所以我的问题是,对于保持活动的工作负载(这是最好的术语吗?),最好的技术堆栈是什么?

或者更准确地说,根据可靠性可扩展性标准,什么是最好的堆栈(我不关心节省几个CPU周期,但我确实关心不当您添加更多用户时,即使在良好的高端硬件上,情况也会陷入崩溃的境地)和无处不在(能够开始使用廉价的 GoDaddy 风格托管)?

The most common technology stack for websites is Lamp, partly because it's available everywhere, and partly because the programming model is so simple: every request to the server generates a single call to the code and a single chunk of HTML sent back.

But consider the requirements for a Web program that needs keep-alive functionality, a continuous live stream of data to a Javascript front-end. The impression I get from e.g. "Connection: Keep-Alive" in server response, http://ajaxian.com/archives/mibbit-ajax-based-irc-client and http://www.mysqlperformanceblog.com/2006/11/12/are-php-persistent-connections-evil/ is that Lamp is just not designed for this type of workload.

So my question is, for a keep-alive workload (is that the best terminology?), what's the best technology stack?

Or to be more precise, what's the best stack by the criteria of reliability, scalability (I don't care about saving a few CPU cycles, but I do care about not getting into a situation where the thing falls over when you add a few more users, even on good high-end hardware) and ubiquity (being able to get started on cheap GoDaddy style hosting)?

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

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

发布评论

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

评论(1

雨后彩虹 2024-11-09 07:42:48

nodejs 是为这种类型的工作负载而设计的,它速度很快并且可以很好地适应这种类型的工作负载(比 LAMP 快得多) AJAX 回调 apache/mod_php + mysql)。已经有相当多的库,甚至一些框架已经存在,但是没有理由不能根据您的要求将 lamp 与节点混合和匹配。

nodejs is designed for this sort of workload, it's fast and scales well for this type of workload (much faster than LAMP with AJAX calls back to apache/mod_php + mysql). There are already a decent number of libraries and even some frameworks already out there for it, but there isn't a reason you can't mix and match lamp with node depending on your requirements.

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