Friday, September 19, 2008

My Google Developer Day 2008 at Wembley Stadium

I recently attended the Google Developer Day 2008, Tuesday 16th September at Wembley Stadium (London). I went to the following sessions:

  • Keynote - Tom Stocky, Mike Jennings (Android bit), Sumit Chandel (GWT bit)
  • The State of AJAX - Dion Almaer
  • A Deeper Look at Google App Engine - Mano Marks
  • What's New in Geo - Jean-Laurent Wotton (Google), Russell Middleton (Google) and Angela Relle (Met Office)
  • V8: the Chrome engine - Kevin Millikin

What follows are my rough notes from my memory - by that I mean brain memory not USB memory. Also there liable to be some flaws in my understanding!


Tom Stocky (Google's Director of Product Management) began the day with his keynote speech. This touched upon many of Google's latest and greatest offerings; Chrome, App Engine, Android, GWT and Open Social. The first European demo of an Android device (HTC dream?) was apparently the most newsworthy. The salient points for me where concerning Chrome and GWT. Concerning Chrome - a little bit of hype, some justification. Some explanation of what makes Chrome different, multiprocess architecture (therefore increased stability), high performance V8 javascript engine and something about re-invigorating the browser arms race. I have been aware of GWT (apparently pronounced "GWIT" as in twit) but never used it - it could be described as a superior high performance AJAX applications development tool, producing obfuscated JavaScript for people happier debugging their JavaScript in Java IDEs!

The State of AJAX

Dion Almaer (of fame) gave a very entertaining and detailed talk concerning the current AJAX landscape (not just what Google are doing but more general). Some of the thing this presentation touched on included:

  • Cloud computing; Amazon [E2/S3 etc], Google App Engine and Aptana Cloud.
  • GWT, jQuery(+ UI), prototype(+ Scripticulous), dojo: The convergence of JavaScript libraries and how they are ALL great, use them!
  • Mozilla Prism (although no reference of Mozilla Prism's similarity to Google Chrome)
  • Various Mozilla Monkey projects, of particular interested was Screaming Monkey, a project which can install a Mozilla JavaScript engine into IE.
  • A fun demo of using a Wii controller with a browser based game (using AJAX, applet and wiiusej).
  • Brenden Eich says "Threads suck" so why not use Google Gear's worker pools for thread-like functionality?

A Deeper Look at Google App Engine

Mano Marks lead a guided tour of some the things Google App Engine has to offer and he encouraged audience interaction. He was somewhat cagey on the topics of SLAs and future language support despite receiving numerous audience queries on these subjects. The audience seemed to be very well acquainted with this technology already, for example there was no explanation given about what Sharding was and the audience didn't ask (I could only assume everybody knew already, which I was very impressed with!). After fending off the SLA and future language questions the remainder of the talk highlighted numerous Google App Engine shortcomings and some workarounds for these. Limitations highlighted:

  • Limitations of BigTable:
    • fast hashtable - access by key (up to 512 chars) should be really fast
    • little in the way of referential integrity can have equivalent to foreign keys
    • exercise all your queries in the developer environments to ensure the appropriates indexes are created for production
    • sharding, expensive to perform an object count after the fact
    • use memcache to reduce use of resources
  • File upload/download/storage limitation of 1Mb
  • FetchUrl limit of 4 seconds (there was something that had a 10 second limit but I forget what)

What's New in Geo

After lunch, there was another very detailed and interesting review of the recent Google Geo developments, including:

  • New ajax loading mechanism
  • Geocoding
  • directions
  • integration with local search
  • StreetView
  • Google Maps API for Flash®
  • Google static maps - useful for mobile apps
  • Google Earth plugin
  • MET office Outreach climate change example - with world temperature map changing over time

V8 - the Chrome engine

Probably the most deeply technical session of the day, scarily so in places, in fact several people left the talk quite early, I'm glad that I stayed. I didn't quite understand all of it. Some of the audience looked in a trance like state for this talk (it was late in the day!), I was very surprised that so many non-Googlers seemed so casually conversant with the finer details of creating optimised JavaScript compilers! The take home message that I extracted was something along the lines of:

  • JavaScript is compiled into native machine code and not interpreted
  • Up to 200% faster than previous engines but there are areas that mess this up (e.g. usage of eval() and with)
  • It works on Windows, Linux and Macs, it is Chrome itself that doesn't as yet!
  • JavaScript is an intrinsically dynamic language but most of the time developers use it just like a statically typed language. Therefore, optimisation technique from statically typed languages can be applied (at least most of the time)
  • Functions are only complied when they have been used
  • Functions used more that once are cached for future use, unless they "change"
  • Functions go through numerous states and their state determines the V8 caching approach.
    • unitialised
    • pre-monomorphic - the function has only been used once - don't do anything yet, it could be use one time init code
    • monomorphic - fast - 90% of the time this is the case - e.g. objects are used in a single way
    • megamorphic - blast the developer is actually using the more dynamic features of the JavaScript language resort to the slower uncached approach
  • JavaScript standard libraries are written in JavaScript! So any improvement in performance for the compiler will improve the performance across the board.
  • Currently, no improvement in DOM accessing technologies

Related links