使用哪种群组消息技术?

发布于 2024-07-13 21:03:19 字数 559 浏览 15 评论 0原文

我感到有点困惑——大约 24 小时以来,我一直在思考在我的项目中使用哪种群组广播技术。

基本上,我需要的是:

  • 创建组(通过某些后端进程)
  • 由任何客户端广播消息(1:N,N:N)
  • (可能)直接消息(1:1)
  • (重要)使用我自己的后端对客户端进行身份验证/授权(例如,通过某种 HTTP API)
  • 能够通过后端进程(或服务器插件)踢出特定的客户端

这是我将拥有的:

  1. Ruby 或 Haxe 中的后端相关进程
  2. JS+Haxe 中的前端( Flash9) — 在浏览器中,因此理想通过 80/443 进行通信,但不一定。

因此,这项技术必须能够在 Haxe for Flash(最好是 Ruby)中轻松访问。

我一直在考虑:RabbitMQ(或OpenAMQ)、RabbitMQ+STOMP、ejabberd、ejabberd+BOSH、juggernaut(需要为其编写一个Haxe lib)。

有什么想法/建议吗?

I feel a little bit kind of confused — for about 24 hours I have been thinking which group broadcasting technology to use in my project.

Basically, what I need is:

  • create groups (by some backend process)
  • broadcast messages by any client (1:N, N:N)
  • (potentially) direct messages (1:1)
  • (important) authenticate/authorize clients with my own backend (say, through some kind of HTTP API)
  • to be able to kick specific clients by backend process (or server plugin)

Here is what I will have:

  1. Backend-related process(es) in either Ruby or Haxe
  2. Frontend in JS+Haxe(Flash9) — in browser, so ideally communicating through 80/443, but not necessarily.

So, this technology will have to be easily accessible in Haxe for Flash and preferably Ruby.

I've been thinking about: RabbitMQ (or OpenAMQ), RabbitMQ+STOMP, ejabberd, ejabberd+BOSH, juggernaut (with a need to write a Haxe lib for it).

Any ideas/suggestions?

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

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

发布评论

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

评论(5

紫南 2024-07-20 21:03:19

Yurii、

RabbitMQ、Haxe 和 as3:http://geekrelief .wordpress.com/2008/12/15/hxamqp-amqp-with-haxe/

RabbitMQ、Ruby 和 ACL:http://pastie.org/pastes/368315

您可能还想考虑使用 Nanite 与 RabbitMQ 来管理后端组:http://brainspl.at/articles/2008/10/11/merbcamp-keynote-and-introducing-nanite

您说您需要:

* broadcast messages by any client (1:N, N:N)
* (potentially) direct messages (1:1)

您可以使用 RabbitMQ 轻松完成这两件事。 RabbitMQ 支持两种情况,即 1:N pubsub 和 1:1 消息传递,以及“直接”交换。

直接交换模式如下:

任何发布者(组成员)使用“路由密钥”(例如“yurii”)向代理发送消息。 RabbitMQ 将此密钥与路由表(也称为“交换”)中的订阅绑定相匹配。 每个绑定代表队列的订阅,表达对具有给定路由键的消息的兴趣。 当路由和绑定键匹配时,消息将被路由到队列以供客户端(组成员)后续使用。 这适用于 1:N 和 1:1 情况; N:N 建立在 1:N 之上。

路由模型介绍:http://blogs.digitar.com /jjww/2009/01/rabbits-and-warrens/

一般介绍:http://google-ukdev.blogspot.com/2008/09/rabbitmq-tech-talk-at-google-london.html

您还需要:

* (important) authenticate/authorize clients with my own backend (say, through some kind of HTTP API)

请请参阅 ACL 代码(上面的链接)。 RabbitMQ 还有一个 HTTP 接口,但我们尚未将 HTTP 前端与 ACL 代码结合起来。 但这不应该阻止奥尤。 请访问rabbitmq-discuss列表,那里最近讨论了这个话题。

您还需要:

* create groups (by some backend process)
* to be able to kick specific clients by backend process (or server plugin)

我建议看看 Nanite 和 Workling 等工具是如何做到这一点的。 组创建通常不是消息传递系统的一部分,相反,在 RabbitMQ 中,您可以使用订阅创建路由模式。 您可以通过使用客户端用于将其消费队列绑定到交换器的密钥向其发送消息来踢出特定客户端。

希望这可以帮助!

亚历克西斯

Yurii,

RabbitMQ, Haxe and as3: http://geekrelief.wordpress.com/2008/12/15/hxamqp-amqp-with-haxe/

RabbitMQ, Ruby and ACLs: http://pastie.org/pastes/368315

You might also want to look at using Nanite with RabbitMQ to manage backend groups: http://brainspl.at/articles/2008/10/11/merbcamp-keynote-and-introducing-nanite

You say you need:

* broadcast messages by any client (1:N, N:N)
* (potentially) direct messages (1:1)

You can easily do both using RabbitMQ. RabbitMQ supports both cases, 1:N pubsub and 1:1 messaging, with 'direct' exchanges.

The direct exchange pattern is as follows:

Any publisher (group member) sends a message to the broker with a 'routing key' such as "yurii". RabbitMQ matches this key with subscription bindings in the routing table (aka "exchange") for you. Each binding represents a subscription by a queue, expressing interest in messages with a given routing key. When the routing and binding keys match, the message is then routed to queues for subsequent consumption by clients (group members). This works for 1:N and 1:1 cases; with N:N building on 1:N.

Introduction to the routing model: http://blogs.digitar.com/jjww/2009/01/rabbits-and-warrens/

General intro: http://google-ukdev.blogspot.com/2008/09/rabbitmq-tech-talk-at-google-london.html

You also require:

* (important) authenticate/authorize clients with my own backend (say, through some kind of HTTP API)

Please see the ACLs code for this (link above). There is also a HTTP interface to RabbitMQ but we have not yet combined the HTTP front end with the ACL code. That shouldn't hold oyu back though. Please come to the rabbitmq-discuss list where this topic has been talked about recently.

You also require:

* create groups (by some backend process)
* to be able to kick specific clients by backend process (or server plugin)

I suggest looking at how tools like Nanite and Workling do this. Group creation is not usually part of a messaging system, instead, in RabbitMQ, you create routing patterns using subscriptions. You can kick specific clients by sending messages to them by whichever key they have used to bind their consuming queue to the exchange.

Hope this helps!

alexis

情泪▽动烟 2024-07-20 21:03:19

如果您打算进行 Flash 开发,您看过 SmartfoxServer 吗? 它拥有您想要的一切,并具有本机 Flash 客户端库。 我在一个项目中使用它来管理数十万个连接的用户。

http://www.smartfoxserver.com/

If you are going to be doing Flash dev have you looked at SmartfoxServer? It has everything you want and has native Flash client libraries. I used in on a project to manage 10s of thousands of connected users.

http://www.smartfoxserver.com/

ㄖ落Θ余辉 2024-07-20 21:03:19

嗯,群组通信与简单的消息传递/排队略有不同。

大多数群组通信系统都是商业的,但有两个(据我所知)开源/免费的您可以看看:

不过,这两个可能很难找到 Ruby 绑定。 Spread(可能还有 OpenAIS)将客户端视为可信的,因此基于浏览器的客户端没有意义。 您需要让浏览器前端与后端的组客户端进行通信。

Well group communication is a slightly different beast than simple messaging / queuing.

Most group communication systems are commercial but there are two (that I know of) open-source / free you can take a look at:

Both of these might be tough to find Ruby bindings though. Spread, and probably OpenAIS, view clients as trusted so a browser based client doesn't make sense. You'd need to have your browser front-ends talk to a group client(s) on the back-end.

过度放纵 2024-07-20 21:03:19

我们一直在使用ActiveMQ。 我们的 HR 系统供应商正在使用 Ruby/ActiveMQ 来广播和接收更新。

http://activemq.apache.org/cross-language-clients.html

We've been using ActiveMQ. Our vendor who supplies our HR system is using Ruby/ActiveMQ to broadcast and receive updates.

http://activemq.apache.org/cross-language-clients.html

好听的两个字的网名 2024-07-20 21:03:19

支持 Stomp 协议的其他开源消息代理有 OpenMQ,它包含在 GlassFish V3 和 GlassFish 2.1.1 中,但也可以独立工作,很快就会出现 JBoss 消息代理 HornetQ V2.1。
OpenMQ 支持临时队列,这对于 RPC 风格的通信很有用,但 ActiveMQ 在 Stomp 适配器中也提供了一些有趣的功能。

Other open source message brokers which support the Stomp protocol are OpenMQ, which is included in GlassFish V3 and GlassFish 2.1.1 but also works standalone, and soon the JBoss message broker, HornetQ V2.1.
OpenMQ supports temporary queues which are useful for a RPC style communication, but ActiveMQ offers some interesting features in the Stomp adapter too.

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