WebSockets looks set to revolutionise the internet over the next few years.
It's a shame there aren't more contributors to this project. It would be great for Drupal to have a solid API to handle Websockets.

In the project homepage you list the following examples:
Examples

Examples of the use of PUSH updates include:

Chat rooms - Messages sent be other users are displayed immediately on screen.
Collaborative editing - Similar to how Google Docs allows you to see the text that another user is typing.
Email - The moment an email is received on the server, it is displayed in the clients webmail - no need to refresh.
Stocks/Shares - Prices change on the users web page without having to reload/refresh the page. Prices are also realtime, meaning there is no delay between the price actually changing, and the user seeing the change.

Example modules are included that implement the two highlighted examples above. They are both very simple modules, and should not be used on a production site.


The existing examples given are quite simple tasks that can currently be done through ajax.
Let's not show websockets as a new way of doing old tricks..... can we highlight new things that are only possible through websockets.

Such as:

Instant interaction between client / server
Live streaming/broadcast of data with limited server resources.

I can't thing of any others, but turns websites into full PUSH/PULL environments, not the refresh/update model we are all used to.

It would be great if this could all be baked into Drupal.

Comments

sdrycroft’s picture

Thanks for the positive reaction medden, I'll update the front page shortly, possibly next week, there's a tennis match on at the moment!

medden’s picture

Enjoy your strawberries and cream!

JohnnyX’s picture

Any use cases/ examples to test it?
Something like updating views or online members block without refresh?

Following here

aggentle’s picture

Folks, this is very interesting and I wish I could help more in the development.

For real-time systems this module is a deal-maker. As you say medden, the webserver/browser is fundamentally limited in that the server cannot push data to the browser; the browser must go asking, most likely through a periodic AJAX refresh. Web Sockets enables full two-way comms without delay.

Here's a scenario that illustrates the power of this module: we are developing a real-time content sharing application where multiple users are coordinating their work through the comments that they place on a node. They want to see the latest updates from all users as soon as the updates are made.

Currently, User B has to refresh his page or wait for the periodic AJAX refresh (say, every 15 seconds) to see the latest update from User A. With Web Sockets he will see the update from User A without delay, leading to full real-time interaction.

In time-critical environments, this is a key improvement.

medden’s picture

That would be a perfect use case for WebSockets.

In the mean time, have a look at http://etherpad.com/ and http://drupal.org/project/etherpad

It uses ajax, but provides a pretty fast update, better than every 15 seconds anyway.

Good luck

aggentle’s picture

Thanks medden,

I looked at the etherpad and it's not quite what we are aiming at, but interesting all the same.

I'm still earning my Drupal spurs; what sort of progress could I expect for this module? Is it under active development or has it paused? If you do need some testing assistance I could offer some limited help. I could certainly help to define the fiunctional requirements around such a feature.