实时活动提要 - 代码/平台实施?

发布于 2024-10-09 19:18:29 字数 387 浏览 2 评论 0原文

我正在为我的网站上的实时活动源定义规格。我已经完成了数据模型的后端,但开放区域是实际的代码开发,我的开发团队在其中迷失了使提要工作的最佳方法。这纯粹是通过编写自定义代码来完成还是我们需要使用现有框架来使提要实时工作?向我提出的一些建议是为此使用反向 AJAX。有人提到让客户端每隔 x 秒轮询一次服务器,但我不喜欢这样做,因为如果没有更新,这是不需要的服务器流量。我还提到了像 light Streamer 这样的推送引擎,可以从服务器推送到浏览器。

那么最后:路在何方?是不是代码相关,纯粹推送SQL请求,使用框架,使用平台等。

我的平台是用PHP codeignitor编写的,DB是MySQL。

活动流将有很多活动。我正在开发的社交网络上有 42 个组件,每个组件都有大约 30 种可以流式传输的独特活动。

I am defining out specs for a live activity feed on my website. I have the backend of the data model done but the open area is the actual code development where my development team is lost on the best way to make the feeds work. Is this purely done by writing custom code or do we need to use existing frameworks to make the feeds work in real time? Some suggestions thrown to me were to use reverse AJAX for this. Some one mentioned having the client poll the server every x seconds but i dont like this because it is unwanted server traffic if there are no updates. I was also mentioned a push engine like light streamer to push from server to browser.

So in the end: What is the way to go? Is it code related, purely pushing SQL quires, using frameworks, using platforms, etc.

My platform is written in PHP codeignitor and DB is MySQL.

The activity stream will have lots of activities. There are 42 components on the social networking I am developing, each component has approx 30ish unique activities that can be streamed.

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

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

发布评论

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

评论(2

寒冷纷飞旳雪 2024-10-16 19:18:29

我一直在使用 superfeedr.com 和 Rails,我可以告诉你它运行得非常好。以下是有关它的一些事实:

优点

  • Julien,首席开发人员在您遇到问题时非常有帮助。
  • 立即推送支持 PubSubHubHub 的新提要条目。
  • JSon 响应非常适合解析您想要的任何人。
  • 检索 API,以防更新回调失败并且您需要检索给定提要的最新条目。

缺点

  • 文档不符合我想要的标准,因此您可能最终会在网络上搜索以找到晦涩的实现细节。
  • 您无法控制 superfeedr 获取每个 feed 的频率,他们使用秘密算法来确定这一点。
  • Web 界面允许您管理您的提要,但当您订阅大量提要时,它会变得难以使用
  • 订阅验证机制同步工作,因此您需要确保对象 URL 已准备好供 superfeedr 回调命中(它们确实提供了异步选项似乎效果不佳)。

总的来说,我会推荐 superfeedr 作为满足您需求的良好解决方案。

I have been using superfeedr.com with Rails and I can tell you it works really well. Here are a few facts about it:

Pros

  • Julien, the lead developer is very helpful when you encounter a problem.
  • Immediate push of new feed entries which support PubSubHubHub.
  • JSon response which is perfect for parsing whoever you'd like.
  • Retrieve API in case the update callback fails and you need to retrieve the latest entries for a given feed.

Cons

  • Documentation is not up to the standards I would like, so you'll likely end up searching the web to find obscure implementation details.
  • You can't control how often superfeedr fetches each feed, they user a secret algorithm to determine that.
  • The web interface allows you to manage your feeds but becomes difficult to use when you subscribe to a loot of them
  • Subscription verification mechanism works synchronous so you need to make sure the object URL is ready for the superfeedr callback to hit it (they do provide an async option which does not seem to work well).

Overall I would recommend superfeedr as a good solution for what you need.

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