XMPP:向 pubsub 添加双向性?
我不确定 pubsub 或多用户聊天是否是正确的选择?
我认为我需要的是 pubsub,但还需要订阅者能够向 feed 广播消息。双向信息流,如果你愿意的话。
用例是订阅者平均订阅 1000 个不同的 feed,但每个单独的 feed 平均每周仅广播一次信息。因此,提要很多,但每个提要的活动都很低。然而,由于有 1000 个不同的活动订阅,订阅者每天可能仍会收到 100 条消息的通知,并且他们应该能够“回复”(即发布内容)到这些提要中的任何一个。
看来我需要的是一个 pubsub/多用户聊天混合体。但这并不存在,或者真的存在吗?有什么想法或指示吗?
非常感谢!
I am not sure if pubsub or multiuserchat is the way to go?
What I think I need is pubsub, but with the added ability for subscribers to broadcast messages to the feed as well. Bidirectional information flow, if you will.
The use case is such that subscribers will be subscribed to on average 1000 different feeds, but each individual feed only broadcasts information on average once per week. So, lots of feeds, but low activity in each one. However, b/c there are 1000 different active subscriptions, a subscriber might still be notified of 100 messages per day, and they should be able to "reply" aka post content to any one of those feeds.
It seems like what I need is a pubsub/multiuserchat hybrid. But that doesn't exist, or does it? Any ideas or pointers?
Thanks a bunch!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果订阅者正在发布数据,那么他们不仅仅是订阅者,而且是发布者。同一实体没有理由不能同时成为发布者和订阅者。
至于你关于 pubsub 与 MUC 的更普遍的问题,我发现这个问题现在经常出现。
显然乍一看MUC和pubsub非常相似,它们都是关于向一个组广播的。许多应用程序可以轻松地使用其中之一,没有任何问题。
为了帮助确定哪种协议最适合您的应用程序,让我们了解一下这两种协议之间的一些差异。
MUC:
Pubsub:
以上几点仅供参考。通常可以通过服务器配置来实现很多目标。例如,MUC 规范允许房间根据配置拒绝某些类别的占用者的存在广播。这里的问题在于实现......因为这是 MUC 的不常见用法,您会发现许多 MUC 实现可能不支持它。重点是,由于 MUC 是为聊天而不是通用的 pubsub 设计的,因此您会在很大程度上发现围绕 MUC 的所有实现和工具都专注于这种用法。
If a subscriber is publishing data then they are not just a subscriber, they are a publisher. And there is no reason the same entity can't be a publisher and a subscriber at the same time.
As for your more general question about pubsub vs. MUC, that's a question that I find comes up a lot nowadays.
Obviously at first glance MUC and pubsub are very similar, they are both about broadcasting to a group. Many applications could easily use one or the other with no trouble.
To help decide which fits best with your applications, let's go through some of the differences between the two protocols.
MUC:
Pubsub:
The points above are just a guide. A lot can typically be achieved through server configuration. As an example, the MUC specification allows for rooms withholding presence broadcasts for certain classes of occupants based on configuration. The catch here is in the implementations... since this is an uncommon usage of MUC, you will find it may not be supported in many MUC implementations. The point being that as MUC was designed for chatting and not generic pubsub, you will largely find all the implementations and tooling around MUC to focus on that kind usage.
不确定问题是什么。订阅者也只需是发布者即可。没有什么可以阻止他们发布和订阅(除非节点配置为禁止这样做)。
这似乎是一个非常典型的 pubsub 案例。
Not sure what the problem is. The subscriber simply needs to be a publisher as well. There is nothing stopping them from publishing as well as subscribing (unless the nodes are configured to disallow it).
This appears to be a very typical pubsub case.