Archive for September, 2008

Django + Orbited 0.6.x Tutorial

Friday, September 26th, 2008

Dark Porter posted a tutorial on using Orbited with Django. Michael Carter linked to it on Comet Daily, and said:

Obviously it makes sense to migrate to separate processes for a high-concurrency production deployment, but this method is perfect for developing applications and deploying small to medium instances.

The tutorial uses a different technique than the STOMP method I described. Dark Porter takes advantage of the fact that Django and Orbited are both written in Python, and puts everything in one process, including a custom threaded TCP server.

Heartbeats Handle Dropped Connections and Timeouts

Wednesday, September 17th, 2008

The 0.6.1 release of Orbited adds a feature called heartbeats that improves dropped connection handling and also decreases reconnects due to timeouts. Dropped connection handling is important because it affects the user experience of a web application. Heartbeats are better than the previous solution of reconnecting at a fixed interval because they do a better job at a lower network cost.

Dropped Connections

A web application can’t prevent most dropped connections. It can only handle them in the best manner possible. Dropped connections are a problem because unless there’s some notification mechanism, the browser won’t automatically try to reestablish the connection. Furthermore, the user will think that the application is operating in a connected state, and won’t realize that they are missing messages.

(more…)

Orbited 0.6.1

Saturday, September 13th, 2008

0.6.1 is a maintenance release that fixes a number of small problems. Everyone is encouraged to upgrade. 0.6.1 also adds a new feature that’s been under development for awhile called heartbeats, which improve dropped connection handling and reduce timeouts. I’ll be writing a post on that shortly.

If you’re using a version of Orbited lower than 0.6.x, this is a great time to make the change, because 0.6.0 marked the change from alpha to beta, with the corresponding stabilization in API and core functionality. Remember to stop by the mailing list, IRC channel (#orbited on freenode or use the LiveDemo), and Trac system to participate in the development process and/or get help with Orbited.

Integrating Orbited with Web App Frameworks

Sunday, September 7th, 2008

The simplest Orbited architecture is to have Orbited proxying messages between the TCP server and the browser using socket connections. Many people, however, choose to use web application frameworks like Django or Ruby on Rails because they helpfully abstract away certain cumbersome tasks. You can easily connect Orbited and frameworks using message queue brokers, and the 0.7 release will feature an integrated basic broker.

(more…)