On October 16th 2012 I sat on a HTML5DevConf WebSocket panel along with Ilya Grigorik from Google, Matt DeBergalis from Meteor and Peter Moskovits from Kaazing - the panel was chaired by Frank Greco, also of Kaazing.
Here are the notes, in a pretty raw format, from the event. A more curated write-up can be found on the Pusher blog.
Where does WS affect current web infrastructure the most?
- The potential for many more persistent connection to be held open.
- As apps move away from polling this is a good things as it probably works out as less resource usage.
- But as we see WebSockets used more and more we'll see more peristent connections. I'm not sure what the overall result would be of this.
- Some parts of the Web infrastructure are playing catch-up:
- Some proxies are troublesome. Whilst the majority of WebSocket connections get through over WSS/SSL on port 443 there are some cases where they don't.
- Not really web infrastructure as such, but some anti-virus packages that offer "web shields" are blocking WebSockets. We're waiting on companies like Avast! to catch up. It's impacting user experiences and productivity.
Why use WS when HTTP2.0/SPDY is soon pervasive?
HTML5 represents a move to empower developers with the tools required to build rich interactive applications in the web browser. HTML5 WebSockets are a core element in enabling that interactive functionality. For me, WebSockets are a tool for developers - they're an API. SPDY is a protocol for the web browser to improve the efficiency of web content distribution.
What's the real advantage of WS to web servers (and app servers)?
- Bi-direction communication is they key benefit; instant interaction between client and server.
- For apps that have been 'faking' realtime bi-directional functionality using Comet they can now do this in a standardised, and more efficient, way.
What new types of applications does WS unlock?
It makes applications that we've previously been hacking more easily achievable:
- Instant notifications of activity about things we are interested in. IT'S NOT JUST ABOUT PUSH NOTIFICATIONS. These notifications can then be used to kick-off more interactive experiences. That's where WebSockets really stand out.
- Live content
- Live blogging
- Realtime news
- Realtime social feeds/activity streams
- But these can be achieved using EventSource/SSE
- Interactive experiences
- Realtime communication with colleagues and customers
- Collaborative applications like Google docs - you don't need Google's infrastructure to build this sort of things now. It doesn't have to be text - there's a real opportunity to hook into some of the amazing features in HTML5 and build dynamic collaborative experiences.
- Because WebSockets is a standard it's not restricted to web browsers - I'm starting to see a lot more cross device interaction; one to one and one to many.
- We're seeing quite a few Arduino applications built which is a great sign that we are moving towards the Internet of Things
- If you merge all this together - live content from different sources, interactive functionality between users, systems and devices, there's really very little limit to what can be achieved other than our imagination. This is why I think Creative Technologists are having a lot of fun with this technology - they are pushing the boundaries.
- In terms of application types in browsers - WebSockets most definitely fit the move to Single Page Applications (SPAs).
Doesn't WS present new types of security issues?
- The protocol deals with security considerations. It's then up to the runtime to ensure that an application doesn't do anything naughty - that's no different from any other technology.
Why isn't WS just a slightly better Comet?
- WebSockets are a technology answering the need for realtime bi-directional communication that was previously answered by Comet solutions - there's no escaping that. But a lot of the HTML5 features are things that let us achieve things we were previously having to jump through hoops to achieve.
- It's standardised so the functionality works the same way cross browser
- It's not restricted to browsers (nor was Comet) so it means we have a standardised way of achieveing realtime bi-directional communication on the web.
- WebSockets work over a single connection so it's much more efficient that comet solutions which required two connections for bi-directional communication.
Why is WS important for cloud services and apps?
- The fundamental reason why WebSockets are important is they are a core component in a move to make the web an interactive communication platform. HTML5 gives us a set of tools that let developers build much richer experiences than we could previously but without a realtime interactive aspect we would just be creating static RIAs.
Where are we going next?
- WebSockets are not just a browser technology. As I said before, I believe they are a key component for realtime communication on the Web between any client and any server. The Web is now a communication platform and realtime is a massive part of that. There are so many areas where realtime communcation saves time, money, increases user experiences, improves engagment and offers great opportunity that we've only just scatched the surface of the possibilities.