HTTP/2.0 Draft
HTTP/2.0 Draft
Written by Ian Elliot   
Tuesday, 30 July 2013

The latest upgrade on HTTP has been issued by the IETF. What does is offer the eager programmer?

If you think that HTTP/2.0 looks familiar then you have probably encountered it before in the form of Google's SPDY protocol which is already supported by a number of web servers and browsers including IE11. 



The reason for the upgrade is mostly a matter of speed. HTTP/1.1, which was introduced in 1999 but isn't being retired, has some protocol issues that make data transfer slower than it could be. The idea is that both protocols will continue to work for the foreseeable future and clients will negotiate with servers to use the faster protocol. 

The biggest change is that HTTP/2.0 is a binary, rather than ASCII, protocol. What this means is that using command line tools to manually generate HTTP requests like GET or PUT is going to be more difficult. Using binary makes the protocol more efficient, but it can be argued that the payload is generally much bigger than the control protocol. 

Another big change is the ability to send multiple streams over the same connection. In HTTP/1.1 you need a GET for each resource and each GET opens a new HTTP connection. Using HTTP/2.0 multiple resources can be transferred over the same connection and you can prioritize the transfer. It will also be the default that connections remain open for the lifetime of the page. A client should only make a single connection to each origin. 

Also new is the ability to push data from client to server and server to client. This provides an alternative to web sockets, long polling or repeated data requests. 

How will this affect programming?

If you are implementing a Rest-style API then you won't have to reorganize your use of GET and POST etc, but you will either have to write new low-level HTPP protocol handlers, or, more likely, upgrade to a library or language that supports them. For example, if you are using Node.js you will need to use a module like spdy in place of http and use its server calls. Also, if you want to make use of new facilities like server push, you will have to code this into your app. 

It is still early days, and libraries are in short supply and incomplete. Microsoft is one of the first across the starting line with the Katana server stack in C# - but even it doesn't support server push as yet. 


More Information

Hypertext Transfer Protocol version 2.0 Draft


Related Articles

It Is Official - IE 11 To Support WebGL        


To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, FacebookGoogle+ or Linkedin,  or sign up for our weekly newsletter.




blog comments powered by Disqus



Android Instant Apps Enter Live Testing

Last year at Google I/O the one of the most interesting announcements was the idea of an instant app. A sort of crossover between a native app and a web app. Now they are almost here with the start of [ ... ]

Android Things Dev Preview 2 Could Be What We Need!

Android Things is Google's attempt to get into the IoT world. The first preview wasn't impressive, but now we have Developer Preview 2 and it seems to fix many of the problems. This could be the IoT O [ ... ]

More News

Last Updated ( Tuesday, 30 July 2013 )

RSS feed of news items only
I Programmer News
Copyright © 2017 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.