Showing posts with label Firefox. Show all posts
Showing posts with label Firefox. Show all posts

Sunday, June 17, 2012

What is SPDY?

Lately there is a lot of talk about the SPDY protocol (pronounced as Speedy). The recent launch of Firefox 13 with SPDY available by default is very welcomed. Though created by Google, a lot of large entities (amazon, twitter, mozilla etc.) are interested in this protocol. Google has submitted this as a draft to IETF as the next gen replacement Http. Even microsoft is interested and they have also submitted a parallel proposal, which is very much inspired by SPDY.

Now that I have built up the interest on SPDY as the next gen http (hopefully), you might ask: "What is wrong with HTTP? Why should I care?"

Problem with HTTP

HTTP has served us well for a long time and in many ways it was never conceived to be used. Today the content which flows through the internet is very rich with images, dynamic scripts, videos. Some of HTTP's early decisions are not good enough any more in terms of performance. For example
  • One request per connection at a time - Everything a server has to send to the client comes in a serial manner - send one and then the other and then the next. Too slow. Browsers circumvent this by creating parallel connections to the server (creating new connections is not cheap at all).
  • Request always initiated by client only - HTTP works by the principle that client initiates the request and the server responds to it. Even if the server knows that the client would need these resources, it can't really do much about it (neither pushing content nor providing hints).
  • HTTP Headers keep sending redundant information and that too in uncompressed form.
All these mean that HTTP makes the web experience much slow (at least at the rate at which we want it today). That said, HTTP is very prevalent and it handles various kinds of content very nicely.

In comes the SPDY

SPDY as the name suggest is a protocol aimed at changing the performance aspect of HTTP. It preserves the application usage aspect of HTTP and tries to solve the performance issues. It sits on top TCP and provides a session layer. It tries to:
  • work with many concurrent HTTP requests in a single TCP session/connection in the form of streams. A new frame format helps doing this
  • reduce bandwidth usage by using compressed headers and removing unnecessary headers
  • create server initiated streams (push or hint)
SPDY also tries to ensure that content does not have to change to achieve this. This is important because with the amount of web content available in the world, this would just be unreasonable. The idea is to change the user agent (browser) and the content provider (server) to provide support for SPDY.
Another thing to note is that SPDY stays at the application protocol (HTTP is one) layer and does not move into the transport (TCP) layer. This is not because there is no optimization possible at that level. It is more to do with the fact that such changes would need the entire internet infrastructure to change and that will make the protocol a non-starter in terms of its acceptance. 
SPDY also prefers to work with SSL. This does cost on performance, but the idea is to promote a more secure way of interaction between client and server. 

SPDY Implementation 

Google has worked on implementing this protocol and testing it extensively. Their browser (guess which one) supports it and their server infrastructure supports it as well. That itself is a good testing bed for SPDY. A lot of details about their testing is provided in the SPDY white-paper if you interested to check out.
Of course other companies are getting involved as well as I mentioned before.

Development Support

The SPDY project page refers to a lot of frameworks and server software that support SPDY. Some interesting ones are

There are lot more servers and libraries supporting it - please refer the project page mentioned above.

Conclusion

SPDY is already there in the wild now. It makes the web interaction faster for consumers/producers like us. It has picked the interest of other big entities who are trying to improve it further. Google itself is very much involved and is doing a lot of testing. It also wants to involve the open community on it. May be its time we get to know more about it and contribute to it in whatever way we can. 

Wednesday, February 15, 2012

Firefox Roadmap for 2012

Lately Firefox has been in news for the wrong reason. They have been losing out to competitors especially Chrome.

I personally use both the browsers and like both of them. I really like the Firefox add-on system because it is quite rich (Chrome has caught up quite a bit on this too). One thing which I don't like is its bloated nature (the other day I saw Firefox was taking close 2 GB of my RAM!).

I got a chance to look at the Firefox Roadmap for 2012 which got updated very recently. There are some good things planned and I was able to categorize them into themes:

  • Catch up to Chrome:  One of the primary themes which I could make out (because they obviously won't say it that way) is Firefox trying to add a lot of Chrome features. For example: silent updates, web apps marketplace (like Chrome Web Store), add-on sync seem the most important ones. There are a few others as well.
  • Performance - There are a lot of items on this one and I am very glad about it. Firefox is looking at changes for better memory management, improving start up speed, faster session restores. They plan to introduce a next generation JavaScript engine 'IonMonkey' which is expected to have improved performance. They are other similar ones mentioned in the roadmap including a few obvious ones.
  • Social engagement - Firefox is planning to provide ways to share stuff. It is also going to have an id system (log on to Firefox with a password which hooks you to other things). One of the best things they are planning to introduce is an ability to monitor site tracking and control it (one of my friends would be thrilled with this feature). I would like to learn more about this and if I do, I will share it.
  • Firefox for Window 8 Metro: There is plan to release beta version of Firefox for Windows 8 metro. At this point in time we don't know how this will pan out and the kind of features that will come out. For the matter we don't even know how much Metro will catch on. Something to wait and watch.
  • Other catch up/good stuff: Reader mode similar to Safari. Language translation  etc.

Now these are significant features for sure. The one that can make Firefox standout and be counted as serious contenders is the social/privacy feature. If that is good then a lot of privacy conscious people (and that is a lot of people!) will take to Firefox. And to make them not regret that decision, Firefox performance improvements will help.

On the whole it looks like Firefox does not want to give up and die! I hope and want them to make it.