XMPP 客户端不兼容
我目前正在开发一个项目,该项目正在构建一个基于 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您正在构建一个专有解决方案,它可能不是完全从头开始,但这不一定是坏事。 但请不要将其称为 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.
不确定您的所有要求,但听起来您可能可以使用 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.