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. 

ietflogo

 

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. 

ieflogo2

More Information

Hypertext Transfer Protocol version 2.0 Draft

Katana 

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.

 

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info

 

Banner


Can C++ Be As Safe As Rust?
10/04/2024

Herb Sutter is a well known and respected C++ champion and he thinks that the language only needs a few tweaks to make it as safe as Rust. Can this be true?



Java Version 22 Released
04/04/2024

JDK 22 is not a Long Term Support release, but is one of the regular releases that are scheduled to arrive every six months. Still, it has got a lot to show for itself.


More News

Last Updated ( Tuesday, 30 July 2013 )