XMPP 客户端不兼容

发布于 2024-07-18 05:25:23 字数 301 浏览 2 评论 0原文

我目前正在开发一个项目,该项目正在构建一个基于 java 的桌面应用程序以与网站交互。 我们想要整合 IM 功能,因此我们决定使用 XMPP。

问题是我们的应用程序具有其他功能,任何使用其他客户端连接到我们的 XMPP 服务器的人都会导致我们的网站出现问题(例如,我们的客户端将能够使用用户无法发送的特定消息类型发送我们的消息)使用,但对于另一个客户端,他们可以发送这些消息类型)。

是否有人只允许我们的客户端访问 XMPP 服务器或阻止其他客户端使用某些功能? 我知道这违背了开放标准的理念,但我们不想从头开始构建专有的 IM 解决方案。

I'm currently working on a project that is building a java-based desktop application to interface with a website. We want to incorporate IM capabilities, so we decided to use XMPP.

The problem is our application has other features, and anyone using another client to connect to our XMPP server will cause problems with our website (e.g. our client will be able to send our messages with a certain message type that the user won't be able to use, but with another client they could send those message types).

Is there anyone to either allow only our client to access the XMPP server or prevent other clients from using certain features? I know this is against the idea of open standards, but we don't want to build a proprietary IM solution from scratch.

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

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

发布评论

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

评论(2

多彩岁月 2024-07-25 05:25:23

正在构建一个专有解决方案,它可能不是完全从头开始,但这不一定是坏事。 但请不要将其称为 XMPP 服务,除非您要支持 XMPP 客户端。 您将得到与访问需要专有浏览器的“网站”相同的反应。

对于可以协商的功能,请查看功能协商,您也许可以获得不要说你的服务器对其他客户端没有特定的功能,但你自己的服务器却秘密地支持它。 这实际上并不会阻止某些事情被尝试,所以这是一个非常糟糕的解决方案。

您无需构建桌面应用程序即可获得即时消息传递功能(以及随之而来的所有平台支持问题)。 考虑一下 Orbited,它可以为您提供所需的即时消息交互性,并使您更容易集成到服务器上。

顺便说一句,不应该有任何消息导致您的网站出现问题,就像不应该存在导致网站出现问题的 URL 或查询组合等一样。

You are building a proprietary solution, it just might not be completely from scratch, and that's not necessarily a bad thing. But please don't call it a XMPP service unless you are going to support XMPP clients. You will get the same reaction as you get with a "web site" that requires your proprietary browser.

For features that can be negotiated, look at Feature Negotiation and you might be able to get away with saying your server doesn't have a specific feature to other clients, but secretly supporting it in your own. That won't actually block something from being attempted, so it's pretty poor solution.

You can get instant messaging capabilities without building a desktop application (with all of the platform support headaches that entails). Consider Orbited which can give you the instant messaging interactivity your looking for and would make it much easier to integrate on the server.

And just as a side point, there shouldn't be any messages that cause problems with your web site, any more than there could be a URL that causes it problems, or a query combination, etc.

酒中人 2024-07-25 05:25:23

不确定您的所有要求,但听起来您可能可以使用 XMPP 的 pubsub 或 pep 功能。 这些是 XMPP 的扩展,允许您创建可以在用户到用户级别访问的专用有效负载(个人事件协议 XEP-0163)。 如果只是向每个感兴趣的人发出一般通知,那么 PubSub (XEP-0060) 可能就是您想要的。

这些协议允许保护对 pubsub 节点的访问,并且不会受到标准聊天消息的影响,因为它们是不同的协议。

Not sure of all your requirements, but it sounds like you could probably use the pubsub or pep features of XMPP. These are extensions to XMPP that allow you to create specialized payloads that can be accessed on a user to user level (Personal Eventing Protocol XEP-0163). If it is simply a general notification to everyone who is interested, then PubSub (XEP-0060) may be what you want.

These protocols allow for securing access to the pubsub nodes and will not get affected by the standard chat messages, as they are a different protocol.

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