适用于服务器端网络的 javascript 框架?

发布于 2025-01-04 23:03:49 字数 328 浏览 0 评论 0原文

我即将开始编写一个“服务器端”(如不在浏览器中运行)软件,该软件将使用 UDP 进行大量网络通信。

我目前倾向于在 Node.js 上运行服务器,主要是出于表面动机,因为它“新颖而闪亮”。

由于我对 Javascript 相当陌生,因此我正在考虑使用某种类型的 JS 框架,以帮助我避免初学者经常犯的一些最明显的错误。我正在寻找网络和 JavaScript 方面的经验。是否有任何特定的框架使 UDP 网络真正变得简单/方便?

Mootools 和 Dojo 看起来都很有趣,因为它们都维护得很好,而 Prototype/script.aculo.us 似乎已经变得停滞不前,因此不是很有趣。

I'm about to start writing a "server-side" (as in not running in a browser) software that will do a lot of network communication with UDP.

I'm currently leaning towards running the server on Node.js, mostly with the superficial motivation that it's "new and shiny".

As I'm fairly new to Javascript, I'm looking into using a some type of JS-framework, to help me avoid a few of the most obvious mistakes one often makes as a beginner. I'm looking for experiences with networking and Javascript. Does any particular framework make UDP-networking really easy/convenient?

Both Mootools and Dojo look interesting as they are both well maintained, while Prototype/script.aculo.us seems to have become stagnant, and aren't very interesting because of that.

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

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

发布评论

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

评论(1

若沐 2025-01-11 23:03:49

MooTools Server 因其实用方法和 OOP 层而可以成为任何 JS 软件的一个很好的附加组件。然而,它对于专门管理 UDP 没有任何帮助。

实际上,您提到的所有框架都源自客户端,因此没有任何理由以任何方式管理传输层(或下面)的网络。

这不是一个非常常见的用例,因为 JS(即使使用 Node)也非常面向 Web 应用程序,几乎总是使用 HTTP over TCP。除了 Node 的 dgram API。它似乎提供了足够的数据报抽象以供使用,而且我真的不知道您需要什么才能使 UDP“更容易”:如果您搞乱了传输层,那么您无论如何都会要求您的手会弄脏  ;)

MooTools Server could be a nice add-on to any JS software for its utility methods and OOP layer. However, it would not help in any way to manage specifically UDP.

Actually, all the frameworks you mentioned take their origin from the client-side, and therefore don't have any reason to manage networking at the transport layer (or beneath) in any way.

It is not a very common use-case since JS, even with Node, is very oriented towards webapp that almost always use HTTP over TCP. I don't have any references to give regarding such usage, beyond Node's dgram API. It seems to offer enough abstraction over the datagram to be usable, and I don't really know what you would like to have to make UDP “easier”: if you're messing with the transport layer, you're anyway asking for your hands to get dirty  ;)

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