New technology is always fun to play with, even if it is just new to you. So recently I decided to build a mini web application that took advantage of Websockets.
Websocket is a web technology that allows two-way communication between a client browser and a web server. The conventional way to access data on a web server is for the browser to request it. That is to say that the browser needs to keep asking the server for information and once it is available it can retrieve it. Websockets change this by allowing the server to send data to the browser as soon as it is ready. For a more detailed description of Websockets see here.
Lets come back from the future for a moment and have a look at what Websockets can do for us now. Here are a couple of interesting example applications that use Websockets. If you have any other sites that you think are interesting let me know.
The examples above just require the user to use one client browser. Multiple users but all using one client. What if this wasn’t the case? What if you had multiple devices all connected to the same web application but performing different tasks? I thought it would be interesting to explore this concept so I built a slide show controller. Here is a simple demo of the concept:
I used reveal.js for the HTML 5 slides and glued it together with the rest of the application. To develop Websocket apps you need a server technology that supports Websockets and a client side library like socket.io can make things easier. Server side I used Tornado with Tornadoio2. The mobile site was built using jQuery mobile.
Websockets can be used to push data to client browsers enabling users to interact with web applications from multiple devices at once. Can you see many applications of this concept? Let me know your thoughts and comments on this idea below.