Friday, July 27, 2012

When? Where? For How Long?


The article posted by Dino Esposito in the latest issue of MSDN Magazine (Understanding the Power of WebSockets) centered on the topic of the fast and furiously coming new technology of the WebSockets brings up a dilemma I confronted with ever since my beginnings as a professional software developers (a dilemma which I still face today): Where to? For how long? Let me explain. Based on the information in this article, WebSockets are the technology of choice for all web artifacts that need quick, fast response (among them the social media sites which seem to spread with the speed of the mushrooms after heavy rain.) This is the technological newcomer that pulls us out from the age of the steam locomotion and places us (hopefully gracefully) in the realm of the modern high octane gas locomotion. The HTTP requests that so far were broken and stayed at the mercy of the servers performance and resource capabilities, will be leveraged to a new type of connection (new in the world of the web because otherwise they are as old as the IP history) that engages continuity in the client-server communication through the use of WebSockets protocol. Let’s return the floor back to Dino, for a minute:


The new WebSocket Protocol aims to overcome a structural limitation of the HTTP protocol that makes it inefficient for Web applications hosted in browsers to stay connected to the server over a persistent connection. The WebSocket Protocol enables bidirectional communication between Web applications and Web servers over a single TCP socket. Put another way, the protocol makes it possible for a Web application hosted in a browser to stay connected with a Web endpoint all the time while incurring minimal costs such as pressure on the server, memory and resource consumption. The net effect is that data and notifications can come and go between browsers and Web servers with no delay and no need to arrange for additional requests. As emphatic as it may sound, the WebSocket Protocol opens up a whole new world of possibilities to developers and makes polling-based tricks and frameworks a thing of the past. Well, not exactly.


Revolutionary, right? Enticing, isn't it? Very interesting, eh? What’s more interesting is the dilemma that every software professional may face at moments like this: I have no clue about this new technologies, I used years to get the best in the HTTP realm and now I have to quickly get back to the drawing board. What am I saying here? To go back to the drawing board means you know what you do,. No, that’s not the case. What I need to do is going back to my school manuals, start studying again. For how long can I do that? And why would I keep doing that? I, of course, have no answers to these questions. As I guess you don’t have either. Sometimes, many times, I feel like a seasoned surgeon (maybe a neurosurgeon) who, when’s almost ready to declare his competency into a pretty complex area (wouldn’t you agree to that?) is being told that starting next week he will receive a new batch of patients with their brains having 5 lobs instead of two, and that he will have to operate on those. Pretty spooky, eh? But this, my friend, is the fascinating world of a software developer. With or without WebSockets.