Archive for the 'WebSockets' Category

Introducing WaterSpout: A light weight, real-time communication server

Wednesday, May 12th, 2010

Over the last several months the development team at OnForce has been working a cutting edge web server, called WaterSpout, that will change the way OnForce is able to deliver information to our users. WaterSpout takes advantage of emerging standards in web communication to eliminate the delay between an event occurring on our system and the affected users being notified.

Traditional notification techniques require the browser to send background requests to the server at timed intervals to ask for updates. This approach comes with considerable overhead and has a delay which is dependant on the timed interval. Decreasing the interval increases the overhead; increasing the interval delays the information even more. A delicate balance is needed between scalability and timeliness.

WaterSpout utilizes the new HTML 5 websockets standard to provide a constant connection between the browser and the server. This allows for constant contact with the end user and a minimal amount of overhead. The reduced overhead as well as the specialized nature of the code running on the WaterSpout server make for extremely efficient communications between the user and the server.

Using WaterSpout, we can notify our users of events as they happen. Instead of waiting for the user to click into a work order, we can pop up a notification of the event the instant it happens. Service pros on the system will not have to wait for an email or a text message to know that they have been routed a new work order or that the buyer has approved a spend limit increase request. WaterSpout can notify pros of the new work order before the email even goes out. The support team can be notified about a cancelled work order as it happens allowing us to be the ultimate partner in service.

Chris Lewis and I  have been asked to present on the topic of real-time communications via the web at this years International PHP Conference in Berlin, Germany. We have also been selected to speak at this years LinuxTag conference. As part of the presentations they will be discussing WaterSpout.

The project is open source. Comments and contributions are always welcomed.

WebSockets Rule!

Monday, January 18th, 2010

Wow. It has been a ridiculously long time since I have posted anything. I used to post a lot about PHP-GTK, but in the last two years I have moved on to more exciting topics. What could be more exciting than PHP-GTK you say?! Well, WebSockets, of course.

WebSockets are part of the emerging HTML5 spec. They offer a full-duplex socket connection between the user’s browser and the web server. The server is able to talk to the browser instead of just answering questions. No more polling with Ajax, asking the server every 30 seconds if anything has changed. When something new and exciting happens, your site can tell the the browser about it instead of the browser having to ask for it. This means that communication between your site and your users is quick, easy and efficient.

I’ve been working on some secret projects at work that utilize WebSockets. I’ll blog more frequently about all the things we have come across while putting all the pieces in place for some really cool user experiences. In the mean time, read up on WebSockets. If you aren’t thinking about all the awesome things you can do with them, you are already falling behind.