Orbited 0.5.0

June 22nd, 2008 by Michael Carter

You may have noticed the lack of a 0.4.x release. We tried to make a number of improvements for 0.4.x, but ultimately we never thought that branch was stable enough to release. The 0.5.0 release, on the other hand, is the most stable and feature-rich version of Orbited yet. This is a pre-announcement that should give you a day or two notice and some information about porting your app to 0.5. You can expect the official release announcement over the next couple of days.

While we still support the old orbited protocol, there are a couple of differences when using Orbited 0.5.x with 0.3.x applications:

  • orbited.js still contains an Orbited.connect function, but this function now may takes only two arguments: event_cb and token. Orbited connections are now identified by a single token string. If you provide multiple arguments, the javascript client will simply concatanate them with commas in between.
  • when you use an orbit client to send data from your web application, the list of recipients should just be strings that exactly match the token used from the javascript
  • There is no proxy. Instead, Orbited.connect will just work in all browsers cross-port and cross-subdomain.
  • You need to specify where the orbited server is via javascript globals. ORBITED_DOMAIN = ‘127.0.0.1′; ORBITED_PORT = 8000; for example.

Porting an application from the previous version to the new one shouldn’t be hard. They should work out of the box after changes the include from /_/static/orbited.js to /static/orbited.js; adding ORBITED_PORT = 8000; and not using the proxy any more.

This backwards compatibility is a convenience only — Orbited has changed focus away from the 0.3.x architecture. Instead of acting as a simplistic message queue that can route messages to the browser, Orbited is instead a socket proxy. It exposes a TCPConnection to javascript, and relays packets via actual, raw TCP connections on the back end. This way you can use Orbited as a means to talk directly between an out-of-the-box IRC server and the browser. Indeed, in the /static/demos/chat directory you can see an example of connecting directly to an IRC server from javascript.

This new architecture is much better at integrating a browser with arbitrary network servers. Another benefit is that we can connect the browser directly to a message queue, such as ActiveMQ, and use the topic (publish/subscribe) and queue semantics provided out of the box. Furthermore, ActiveMQ comes with a configurable replication strategy out of the box. Take a look at /static/demos/stomp for an example of publish/subscribe with Orbited+ActiveMQ.

6 Responses to “Orbited 0.5.0”

  1. Comet Daily » Blog Archive » Orbited 0.5 Says:

    [...] Orbited blog recently provided information about improvements coming to Orbited 0.5. They’re skipping a 0.4 release, going straight from 0.3 to 0.5. There are a few notes about [...]

  2. Jason Says:

    It feels a bit premature to deprecate using JSON messages in favor of arbitrary text/byte streams. While having TCP functionality opens up some exciting possibilities, we’re still doing this in a browser and I suspect most apps really just want to send and receive JSON objects. Is orbited still going for the layered approach or do you expect people to build things on top of TCPConnection at the minimum, even for delivering JSON messages?

  3. malte Says:

    that’s great news. i recently tried the new orbited server, but is it possible that the old pyorbited library isn’t compatible to the new orbited server??

    greetz malte

  4. Michael Carter Says:

    Jason: We are still supporting the previous approach of the orbit dispatch protocol to send json messages. Think about it this way though: You can connect from the browser directly to ActiveMQ, for instance, which provides publish/subscribe style routing. You can still just send JSON messages around without a problem.

    malte: its a possibility and we’ll look into it. You should join the #orbited channel and work with us to track down the problems.

  5. ilya Says:

    Right now it is impossible to find any development info about orbited. I am complete newby and it is impossible to understand for me what i have to call and where…. orbited.org site does not contain anywhere info about functions in Orbited js library. It is quite frustrated, friends.

  6. Adrian Weisberg Says:

    @ilya: Orbited changed a lot with the 0.5 release, and 0.6 made some minor but consequential changes to the API. People have been working to improve the docs, so swing by again and see if you find what you need. If not, try asking in the IRC channel or the mailing list, and hopefully we can solve your problem as well as help improve the docs.

Leave a Reply