4 ms·
How is orbited different from BOSH+XMPP?
by Tawheed 17y ago
How is orbited different from BOSH+XMPP?
- jacobolus 17y agoAs far as I remember, BOSH is just built on long polling, and uses an XML-based syntax to define its protocol. The general idea is the same. The main differences: (0) perhaps most importantly it’s not immediately obvious how to send messages that aren’t XML-based over BOSH, because the protocol is defined in terms of XML payloads, meaning that if you have some protocol that wants to send arbitrary messages you’ll have to do something like putting your messages inside a CDATA block or escaping special characters, and your server-side code will need to come up with some way to do that, (1) Orbited’s design is a bit more general, accommodating transports other than long-polling, (2) Orbited has a bit less overhead, even in long polling mode, because it doesn't include a bunch of extra XML, (3) everything on the client end related to the particularities of Comet communication is designed to be treated as a black box by client-side JavaScript, which can just load Orbited’s JavaScript and then deal with its API – your in-browser code can roughly pretend it has a TCP socket, (4) Orbited operates as a proxy, speaking actual TCP out the back end, which means that your server code can just be written against a TCP socket and doesn’t need to implement anything special to communicate with browsers, or import any libraries, etc.