WebSockets is the way forward of pure web applications

January 28, 2009 · Posted in JavaScript, Web Development 

Today I attended the first day of the two-day JFokus conference in central Stockholm. In just three years it has become one of the major Java events in the Scandinavian region. The first day was composed of two half-day sessions. I decided to go for websockets before lunch and performance tuning after lunch.

The first session regarding the part of the upcoming HTML 5 specification, called WebSockets and Server Side Events, was really, really interesting. Everybody, that have tried various ways of pushing data from the server to the web clients, know how difficult it is.

For some period of time, people used fat clients (like JavaSwing@WebStart) to connect to the server and then keeping a full-duplex bi-directional socket stream open. However, as more and more internet threats have emerged security guys tend to block all incoming ports except 80 and 443 for applications to use - reasoning like HTTP is decent protocol and well-understood and the web servers (like Apache) are very robust as well. That have put a burden on us developers to invent protocol tranformers, typically performed by some servlet, used to act as gateways between some back-end system and the front-end browser. Everybody, that have tried this knows how intricate it quickly gets. Why, cannot the browser subscribe directly to a JMS topic and react on incoming messages?

This is exact the kind of question, people behind the WebSockets upcoming standard have been asking and decided to provide an answer for.

A web socket creates a bi-directional HTTP tunnel and within, it can transport application level protocols such as XMPP, STOMP, IMAP/SMTP and many more. From an internet technology point of view, this is the best thing happened since the the invention of sliced-bread.

The second session, after lunch, on the other hand was a little bit disappointing. It was presented by Kirk Pepperdine of JavaPerformanceTuning. However, he had many problems with the both the presentation device (not his fault) and the demoes (his fault). My impression was that he wasn’t really well-prepared. Having a background myself, in both training (10+ years) and performance tuning (2+ years), I must say this was below par. Never ever run a live demo without tripple-checking everything and keep some screen-shots up the sleeves, if running into disasters (shit happens indeed).

The first session was presented by Jonas Jacobi of Kaazing, which seems to have been heavily involved in the realization of the new standard. The point is, there are no browsers yet supporting HTML 5 or WebSockets. Kaazing provides an open-source emulation layer that fully implements the standard that can be used in the meantime. I’m really looking forward to get some time playing around with this new exiting technology.

Comments

2 Responses to “WebSockets is the way forward of pure web applications”

  1. Kirk on January 29th, 2009 02:38

    Yup, I agree, the presentation was not one of my bests. I had run all of those demos several times prior to the presentation. I think the combination of the cable problem and the strange JMeter corruption disturbed me enough that I never really recovered. Both of those problems were not my fault. In all the years that I’ve used JMeter, it had never done anything like that. The test plan was some how corrupted causes thread to exit silently. Unfortunately screenshots would not have saved that day as I needed that JMeter script for the next demo. I did have backup materials for other parts of the talk just in case. But like I said, I’ve been using JMeter for years and never had any real issues with it when using it like this.

    That said, I do accept your criticism. Your posting matches my own thoughts in that the problems made me look unprepared and really distracted from the main messages that I was trying to present, tuning from first principles.

    Regards,
    Kirk

  2. The Zinger » Kaazing Presents at JFokus on January 30th, 2009 01:01

    [...] out the great post from Jens Riboe about the session. Written by peter.lubbers in: Uncategorized | Tags: [...]

Leave a Reply