我需要实施 XMPP 服务器吗?
(新手警报)
我需要为课程项目编写多方通信服务,我正在考虑使用 XMPP。
该服务需要以下消息传递语义:
1) 服务器将提供注册和取消注册地址的方法,例如 [电子邮件受保护]/SomeResource
。 (现在我将手动完成)。
2) 服务器将提供一种转发传入消息的方法,例如 [email] protected]/SomeResource
到 [电子邮件受保护] /someOtherResource
,假设后者已注册,以及移除此转发的方法。 (现在我将手动完成)。
3) 匿名客户端可以将消息发送至[email protected]/someresource
(仅限单向流量)。如果有转发设置,则消息将被转发。最后,如果地址是 [email protected]/someresource 已注册,消息将被存储以供以后传送(或者如果检索客户端在线,则立即传送 - 见下文)。如果没有转发和未注册,消息将被静默丢弃。
4) 客户端可以从注册地址连接并检索消息。验证客户端的确切方法(例如密码?)尚未确定。
- 最终,我想添加对客户端从 Web 浏览器连接的支持,以便他们可以自行注册/取消注册以及设置/删除转发。
因此,服务器将不得不进行一些非标准的切换。我需要为此实现 XMPP 服务器吗?我想其中一些(或全部?)也可以使用 XMPP 客户端机器人来完成
(newbie alert)
I need to program a multiparty communication service for a course project, and I am considering XMPP for it.
The service needs following messaging semantics:
1) server will provide a method of registering and unregistering an address such as [email protected]/SomeResource
. (for now I will do it manually).
2) server will provide a method of forwarding incoming messages from, say, [email protected]/SomeResource
to [email protected]/someOtherResource
, assuming that the latter is registered, and a method for removing this forwarding. (for now I will do it manually).
3) anonymous clients can send messages to, say, [email protected]/someresource
(one way traffic only). If there is any forwarding setup, the message will be forwarded. Finally if the address is [email protected]/someresource
is registered, the message will be stored for later delivery (or immediate if a retrieving client is online - see below). If no forwarding and unregistered, message will be silently dropped.
4) clients can connect and retrieve messages from a registered address. Exact method of authenticating clients (e.g., passwords?) is yet to be determined.
- Eventually, I want to add support for clients to connect from a web browser so they can register/unregister and set/remove forwarding themselves.
Thus, the server will have to do some non-standard switching. Will I need to implement an XMPP server for this? I guess some (or all?) of this can also be done using a XMPP client bot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以调查 Pub/Sub 是否比自定义消息传递语义更适合您的问题。如果是这样,您可能会在现有的 XMPP 服务器中找到它的实现。
You might investigate whether Pub/Sub is a better fit for your problem than custom messaging semantics. If so, you may find an implementation of it in your existing XMPP server.
您可能可以使用 ActiveMQ 之类的消息队列进行通信,并使用 Apache Camel 用于路由/转发/处理。
You could probably get away with using a message queue like ActiveMQ for the communication and Apache Camel for the routing/forwarding/processing.