Is it worth customizing an XMPP server? (vs. having client workers)

I've been asked about the possibilities for writing an ejabber module for an internal application. I am opposed to the idea, but I'm not sufficiently familiar with xmpp to support my response, and perhaps I'm wrong.

When google did wave they chose xmpp; and I understand that choice; real time communication between multiple people. Same goal here.

...but it feels to me like a customized server plugin isn't the right answer.

The issues I see are:

1) You lose sync with the server development and have to go through merge hell to ensure security updates, patches, etc. on the server are patched.

2) Any heavy customization of the server means you're probably expecting to be passing special mark up messages to interact with the server plugin; that means you'll have to do heavy client customization as well.

There is an alternative route:

Standard XMPP server. two customized xmpp clients; one for the client and one for the server.

The server client opens a connection to the XMPP server and sits and waits.

Multiple front end clients open connections to the XMPP server and then use xmpp to open connections optionally: 1) to each other and 2) to the server client user.

The front end can then perform real time updates by talking to the server client. It can even subscribe to multiple server client users and have incoming 'activity streams' for multiple different concurrent tasks.

This has the advantages of:

1) You only need to solve the XMPP problem once (client library)

2) Your application server is never externally visible; only the XMPP server is externally visible, which is massive security win.

3) You can use whatever XMPP server infrastructure you want without any issue.

4) You will never have a server update that causes your application server to become 'legacy' and unable to use those apis any more (short of a complete XMPP protocol update).

Downside:

You application server client needs to be complicated enough to handle multiple requests, or have multiple workers or something (but this scales using resource fields and have multiple application servers from different machines connecting to the XMPP network).

...but, I'm not that familiar with the technology.

Is there any reason why the alternative I've suggested would be worse than a customized xmpp server?


XMPP is used in Google Wave/Wave in a Box only for Federation, ie only for server to server communications. This is in order to take advantage of existing XMPP capabilities like discovery protocol. The messages are transported in binary form between servers inside XMPP packets. The Web clients use WebSockets/Socket.IO to communicate with the server. Actually that was the reason to argue about developing an alternative pure HTTP based Federation protocol.

链接地址: http://www.djcxy.com/p/61290.html

上一篇: 基于XMPP的聊天工具使用PHP和JQuery?

下一篇: 值得自定义一个XMPP服务器吗? (与拥有客户工作者相比)