Live data from Hacker News

XMPP over websockets [HTML5]

blog.superfeedr.com

1–10 of 31 posts

Re: XMPP over websockets [HTML5]

#3
post #2

I wonder if it would at all be possible to do the reverse - do html over xmpp? With the advantages xmpp may or may not have over http/html, this could be interesting.

XMPP can carry anything, but it can more easily carry XML-based formats like XHTML. But given that, yes. Formatted IM messages are already specified as a subset of XHTML and you can trivially create your own messages that do whatever custom thing you want with XHTML on your page, or float your custom addition on top of existing messages as a namespaced addition.

The most interesting obvious usecase to me would be using XMPP and ejabberd as a message backplane for your website, hanging various components off of ejabberd that can integrate with your web connection.

Re: XMPP over websockets [HTML5]

#4
post #3
post #2

I wonder if it would at all be possible to do the reverse - do html over xmpp? With the advantages xmpp may or may not have over http/html, this could be interesting.

XMPP can carry anything, but it can more easily carry XML-based formats like XHTML. But given that, yes. Formatted IM messages are already specified as a subset of XHTML and you can trivially create your own messages that do whatever custom thing you want with XHTML on your page, or float your custom addition on top of existing messages as a namespaced addition. The most interesting obvious usecase to me would be usi…

> using XMPP and ejabberd as a message backplane for your website

Why not 0mq and json ? Something like Mongrel2 perhaps?

Re: XMPP over websockets [HTML5]

#6
post #4
post #3

Earlier quoted context omitted.

XMPP can carry anything, but it can more easily carry XML-based formats like XHTML. But given that, yes. Formatted IM messages are already specified as a subset of XHTML and you can trivially create your own messages that do whatever custom thing you want with XHTML on your page, or float your custom addition on top of existing messages as a namespaced addition. The most interesting obvious usecase to me would be usi…

> using XMPP and ejabberd as a message backplane for your website Why not 0mq and json ? Something like Mongrel2 perhaps?

Because then you'd have to implement your own presence, discovery, and routing mechanisms. You get all of that (and more) for free with an XMPP backplane like ejabberd. Even if you decide it's better to roll your own, you'll then have to come up with a consistency and clustering model in order to scale it.

Re: XMPP over websockets [HTML5]

#8
As a big fan of and small contributor to ejabberd (I run im.wordpress.com), one who has used Jack's excellent strophe.js, and one who is anxious to see websockets in more use cases, I was pleased to read this news.

However, I still consider XMPP as the protocol of last resort when designing apps for the browser that don't map perfectly onto XMPP. I would sooner write a new protocol than set up a new ejabberd cluster. (This opinion is based on the quality of documentation available a year ago and may be out of date.)

Re: XMPP over websockets [HTML5]

#10
post #8

As a big fan of and small contributor to ejabberd (I run im.wordpress.com), one who has used Jack's excellent strophe.js, and one who is anxious to see websockets in more use cases, I was pleased to read this news. However, I still consider XMPP as the protocol of last resort when designing apps for the browser that don't map perfectly onto XMPP. I would sooner write a new protocol than set up a new ejabberd cluster.…

Don't confuse the protocol and the server! It may be tricky to setup and ejabberd cluster, but you can't blame XMPP for that!

Also, I wish people were more adventurous with XMPP in general and stop thinking that it's just a chat protocol.

Post reply on HN