实时应用程序:Socket.io 与 Pusherapp

发布于 2024-09-26 20:55:25 字数 189 浏览 0 评论 0原文

Socket.ioPusherapp?重要的考虑因素包括:与rails/django等现有系统的集成、易于设置、易于开发。

What are the factors you would consider when choosing between Socket.io and Pusherapp? Important considerations include: integration with existing systems like rails/django, ease of setup, ease of development.

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

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

发布评论

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

评论(1

颜漓半夏 2024-10-03 20:55:25

有一些差异化因素,这些是:

  1. 您想要管理实时基础设施的扩展和托管吗?
  2. 您想实时接收来自客户的数据吗?
  3. 您希望能够与客户端之间的数据进行交互吗?

Websocket 基本上有几种不同的用例,目前没有托管解决方案可以为您提供其中两种功能。我能想到的当前用例是:

  1. 服务器 --[ WebSocket ]-> 客户端
  2. 服务器 <-[ WebSocket ]-- 客户端
  3. 服务器 <-[ WebSocket ]-> 客户端

像 PusherApp 这样的服务针对第一个用例,因为支持另外两个选项带有托管服务。 (请阅读:虽然这很困难,但有点不切实际,并且无法让您充分享受使用 websockets 的好处。)

There are a few differentiating factors, these are:

  1. Do you want to manage the scaling and hosting of your realtime infrastructure?
  2. Do you want to receive data from your clients in realtime?
  3. Do you want to be able to interact with the data between clients?

There's basically a few different use-cases for websockets, and at present no hosted solution can offer you two of those things. The current use cases I can think of are:

  1. Server --[ WebSocket ]-> Clients
  2. Server <-[ WebSocket ]-- Clients
  3. Server <-[ WebSocket ]-> Clients

Services like PusherApp target the first use-case, as it's fairly difficult to support the other two options with a hosted service. (Read: while it's difficult, it's just a bit impractical and doesn't give you the full benefits of using websockets.)

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