我们应该选择XMPP还是自制服务器?
我正在做一个带有 IM 功能的项目。我们建立了一个自制的服务器,支持聊天消息和通知。客户端(iPhone、Android 和 Web)与服务器建立长 HTTP 连接以获取 IM 消息和系统通知。我们使用 Apache 作为连接管理工具,但遇到了 CLOSE_WAIT 问题。 如果我们使用开源 XMPP 服务器如 openfire 或 ejabbered,我们可以获得完整的 IM 和通知功能。但我们需要努力与XMPP服务器集成并为Web IM提供设施。对我们的项目有什么建议吗?谢谢。
I'm working on a project with IM feature. We build a self-made server with chat message and notification support. The clients (iphone, android and web) make long http connection with server to get IM message and system notification. We use Apache as connection management facility but encounter CLOSE_WAIT problem.
If we use open source XMPP server as openfire or ejabbered, we can get full IM and notification functionality. But we need effort to integrate with XMPP server and make facilities for web IM. Any suggestion for our project? Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在构建基于互联网的系统时,您应该始终尝试使用标准化协议,这就是 IETF 存在的原因,以确保互操作性。
尽管偶尔有人评论说 XMPP 很难使用,但实际上一点也不难,它只是流式传输 XML,因此具有很强的可扩展性。查看已可用的库列表,我相信您将在短短几个小时内启动并运行 XMPP 聊天。
在服务器上,我的建议是用于高流量的 ejabberd、用于易用性的 Prosody 和用于商业解决方案的 Isode。
另一种选择是使用 XMPP 托管提供商,例如 ProcessOne、Cleartext。
When building internet based systems you should always try and use standardised protocol's, that's why the IETF is there, to ensure interoperability.
Despite the occasional comment that XMPP is difficult to use it's really not at all, it's simply streaming XML and therefore very extensible. Take a look at the list of libraries already available and I'm sure you'll be up and running with XMPP chat in just a few hours.
On servers, my recommendation would be ejabberd for high traffic, Prosody for ease of use and Isode for a commercial solution.
Another option is to use an XMPP hosting provider like ProcessOne, Cleartext for example.
取决于您的需求,XMPP 非常灵活,可以比 IM 做更多的事情。而且它是标准化的,这将使以后需要时更容易合并更多服务。但是,如果您只需要为登录用户提供一个简单的聊天室,那么这可能就有点过头了。另一种选择可能是非常轻量级的东西,例如 Faye 或类似的东西。
Faye 基于 Node.js 和 Ruby/Rack,但我相信如果其他平台不适合您,您可以找到类似的东西。
Depends on your needs, XMPP is very flexible and can do a lot more than IM. Also it is standardized, which should make it easier to incorporate more services if needed later on. But if all you need is a simple chatroom for your logged in users it may be overkill. An alternative may be something really light weight like Faye or similar.
Faye is based on Node.js and Ruby/Rack, but I'm sure you can find similar things for other platforms if those don't suit you.