Thursday, February 4, 2016

HTTP/2 is here! And Why the web needs it

We live in a world where performance and security play the biggest role on the web and the mobile world, but unfortunately the current HTTP version doesn’t help in meeting these high standards. Released in 1999, HTTP 1.1 has been serving the web for over 15 years and its update has been overdue. To overcome some of its shortcomings developers used several hacks like spriting, inlining and concatenating files to reduce the number of requests made. These techniques solved the problem to an extent, but the problem with the underlying protocol still existed. HTTP/2 attempts to solve many of the shortcomings and inflexibility's of HTTP/1.1.

HTTP/2: What makes it different
Termed as one of the biggest advancement in web technology, HTTP/2 is built on top of Google’s SPDY protocol, and its standard was approved earlier this year. It aims to make the web faster, more efficient and more secure. HTTP/2 improves speed by opening a single connection as opposed to a multiple connection thus reducing the additional loads on server. HTTP/2 is a binary, rather than text, protocol, making it more compact and efficient thereby reducing the overhead of translating information from text to binary.



HTTP/2 features:
Multiplexing: HTTP/1.x allows one request to be outstanding at a time on a given TCP connection. HTTP/2 overcomes this limitation by allowing several requests to be sent over the same TCP connection and receiving responses out of order, thus preventing one large response from blocking others.

Header Compression:  In HTTP/1.x, headers were always an overhead adding several bytes per transfer, which could go into KB's if cookies are being used. HTTP/2 comes with HPACK header compression which reduces header size substantially by encoding the transmitted header fields using Huffman code. Another additional benefit is duplicated headers are avoided which is a huge win on mobile.

Server Push: Allows servers to proactively send multiple assets to a single client request without the client explicitly requesting it. This helps in avoiding additional roundtrip to fetch resouces linked to the HTML. Resources are pushed directly to the browsers cache, which can be cached independently.

Prioritization: Allows requests to be prioritized to help browsers request the most-needed files first

Security: Supports both secure and non-secure connections; however Chrome and Firefox will only support HTTP/2 over TLS. This means to take advantage of HTTP/2 will need to be served over HTTPS. Fortunately, there are new initiatives such as Let’s Encrypt, Let’s Encrypt is a new certificate authority that is providing free security certificates for websites. It’s a great initiative towards a more secure web.

Impact on developers:
The good news is that the HTTP/2 retains HTTP/1.1's syntax such as http method names, headers and status codes, thus allowing existing applications to be delivered without any modification. Many "best practices" of today like spriting, inlining, concatenating files and domain sharding are no longer necessary with HTTP/2 and are considered as anti patterns.

HTTP/2 is a huge step toward making the web faster and more responsive. With major browsers like Chrome, Firefox and IE providing support, it’s definitely something to move on to.

Useful links:
Browser Support: http://caniuse.com/#feat=http2
Current Implementations: https://github.com/http2/http2-spec/wiki/Implementations

Sunday, January 30, 2011

Netbeans withdraws support for Ruby on Rails

I am not a RoR developer but was quite surprised to know that Netbeans 7.0 would no longer support Ruby on Rails citing low usage and lack of engineering resources.


Time for a competing tool to rise?

Wednesday, March 3, 2010

India readies for the cloud

I was thrilled to know that India would soon be the first country in the world to put its e-governence infrastructure on the cloud. This would include the most awaited Uniquie ID project led by Nandan Nilekani and the online railway booking system plus few other services. What this means is faster transactions on websites like IRCTC which already has more than a million registered users. Way to go India!

Wednesday, September 23, 2009

TED comes to India

TED conference will be held in India for the first time in Mysore between November 4-7, 2009.
Click here for more details

Few amazing innovations from the recent TED conference
Wireless electricity



Making filthy water drinkable

Thursday, September 17, 2009

Noop: A new programming language from Google

Technology giants Google have finally forayed into programming languages arena with their first language being called Noop. Noop is initially targetted to run on the Java Virtual Machine (JVM) with its source form looking similar to Java. Noop attempts to blend the best lessons of languages old and new, while syntactically encouraging industry best-practices and discouraging the worst offenses, according to a description of the language on the Noop language web site.

Though in the early stages of development, it promises a lot of features. Its goal is to build dependency injection and testability into the language from the beginning, rather than relying on third-party libraries as all other languages do. Other key characteristics of Noop include: "Readable code is more important than any syntax feature; Executable documentation that's never out-of-date; and Properties, strong typing, and sensible modern stdlib".

As new languages take time to mature and become a mainstream language, Noop's future will strongly depend on the feedback it will get.

Sunday, August 16, 2009

GM's Volt: Car of the future?


Being an enthusiastic car lover, I always dreamt of driving around the city without shelling out much on the fuel. Well here comes a car from the General Motors that not only breaks the 100 mark barrier in fuel economy rating but does so by a large margin. The Chevrolet Volt, a plug-in hybrid car is estimated to get a whopping 230 miles per gallon. It basically consists of an electric engine with Lithium batteries & a internal combustion engine. You can charge its batteries by plugging in to your household electricity when you're home. It operates as an electric car until its batteries start to get low, and then it starts running a small gas motor to power a generator and knowing that Google helped develop this technology makes it even more interesting.

A dream car to own right? Not exactly, as it carries a not too attractive sticker price of ~ $40,000 largely due to high manufacturing costs. Its battery itself costing $8000.

Expected to roll out in 2011, it seems to have got competition even before hitting the roads. Nissan recently announced the 2010 Nissan LEAF dubbed as the possible "Volt killer" claiming 367 mpg - wow!. As a consumer, its great to see competition growing towards greener technology & helping the environment.

So would you go for it? Well analysts say that you'd have to drive at least 200,000 miles—or 158,000 miles before you start saving money. Huh! probably you would be having a different car by then. Or if you dont wont to spend so much of moolah on this new super machine just wait for the technology to improve over the years which could eventually bring its price down.

Thursday, July 2, 2009

Google's answer to Yahoo’s YSlow

You cannot hold them back for long. Recently Google announced a new open source plug-in for Firefox called Page Speed which can be used to assess the performance of web pages and make recommendations on speeding up the delivery which sounded a lot like Yslow to me. I couldn't wait & got it test on the Citibank's homepage.

Below is the comparison between the tools (YSlow on the right)


For each rule, Page Speed gives you a general indication of how well you’re doing, in the form of a green tick (good), red circle (bad), or amber triangle. You can also hover over a rule to see your percentage score. Page Speed does not provide an overall percentage score, but it does arrange the results in order of importance.

For me the major differences that stood out were:
  • PageSpeed focuses a lot on CSS which YSlow doesnt. It'll tell you which CSS rules aren't being used by the current page, and identify some potentially overly-specific CSS selectors
  • It not only tells the percentage of savings done through minifying JS and how much overhead you can save, but also provides a direct link to a already minified version of the file which you can simply save over your current file
  • It also provide you with optimized images & the savings done by it (saving your time on using other tools like smush.it)
  • The Page Speed Activity feature lets you monitor real time browser activity such as network latency, DNS lookups, connection establishment, and JavaScript processing.
  • One thing found missing was to give some overall grade to assess your pages overall performance as YSlow does.
  • YSlow 2.0 gives you the flexibility to customize the rules that are applied. There are 3 default rulesets YSlow (v2), Classic, and Small Site or Blog. The Classic ruleset provides 13 rules while version 2 has added 9 additional rules.
Overall Page Speed adds a new dimension to building better web apps and wouldn't mind it using it after I am finished with YSlow.

....Well I am still pondering over why Google hasn't made this a Chrome plug-in rather.