WebSockets versus REST: a Kaazing Perspective

There’s a great discussion going on over at InfoQ about the role and future of REST in light of WebSockets. Mark Little’s article collects a handful of quotes and opinions around the topic, giving a well rounded view. With a few exceptions there is a consensus that while WebSockets may not completely take over Web Services and REST, there is a paradigm shift going into that direction. Here are a few of the interesting opinions:

Nathan Evans:

The true bi-directional capability offered by WebSockets is a first for any HTTP-borne protocol. It is something that neither SOAP nor REST have. And which Comet/push/long-polling can only emulate, inefficiently. The bi-directional capability is inherently so good that you could tunnel a real-time TCP protocol such as Remote Desktop or VNC over a WebSocket, if you wanted.

Speaking of VNC over WebSocket – check out the demo below along with this blog post: VNC over WebSocket:

Some like to suggest that REST over WebSocket is the way to go, offering somehow best of both worlds. Given that REST is heavily HTTP based, this doesn’t sound like a good idea. Frank Greco from Kaazing offered his view in the form of a comment to Shay Banon’s Rest and WebSockets article:

REST and WebSocket communication seems to be two different types of distributed computing plumbing. REST is the old-school, sit on top of HTTP, synchronous style of web rpc. WebSocket is the newer, sit along side HTTP, usually asynchronous style of web communication. Imho, in the long term, WebSocket will dramatically reduce the need for REST for WAN computing. With WebSocket, all the protocols we’ve known and loved for the past few decades can now be extended over the web without the clumsy and performance-sucking mapping to HTTP.

And Kaazing has implemented many of the protocols and APIs over WebSocket that Frank talks about.

Finally, an observation to Mark Little’s collection: in a similar way to the WebSocket wire protocol, Kaazing has contributed big time to the InfoQ article: three article links in the intro section and a quote in the body of the article are authored by Kaazing engineers: