Thursday, May 29, 2008

Google IO 2008 Day One

Keynote by Vic Gundotra
3 areas that Google is concentrating on are Client, Connectivity, Cloud.

The client from Google's perspective is the browser. Google Gears is spearheading to improve the browser capabilities. The Gears team is a major contributor in HTML 5.

Alan, Vice President of engineering from myspace showed an interesting usage of Gears by utilizing the local computing power of the PC. When a user with Gears performs a search on myspace, the results are served in realtime by the gears server on the local machine and using it's power and not having to make a trip to myspace's servers. Better experience for the user, lesser load for myspace. This is an interesting usage as Gears was initially designed to solved the disconnected client problem.

Nice to findout that Webkit browser built into android. And, yes it is embeddable into Android applications. When cell applications and bandwidth of the mobile phone industry mature enough, browser will play a major part in how we deploy and run applications on the mobile. Nice to note that google is working on Gears support for Android. Next was an Android demo. Browser, Maps, Notification, Games, built in Compass et al. Can't wait to get my hands on an Android powered phone !!!

Kevin Gibbs the Tech Lead of App Engine gave a talk about the current capabilities of the App Engine platform (checkout my previous blog about App Engine) and the future direction for the project. One of the features that google is working on is offline processing for AppEngine. The ability to import and export data and to perform batch processing. Oh yes, App Engine now supports memcache. Google released a pricing for AppEngine and oh yes, AppEngine is public now. So, go and sign up if you already haven't. But, no Java/Groovy support yet. I spoke to a few Googlers about Java support for AppEngine. As we all know it is in the works. But, they were pretty tight lipped about it.

GWT: Bruce Johnson - Engineering Manager GWT
For me, being able to use GWT on mobile phones is the ultimate. Development in GWT is quite nice but, some things are not as productive as they could be. For example, having to define an interface for each component, using an custom Interface to access resource bundles. After looking at the buttoned down approach that Rails and Grails take for web development, I think GWT will really fly if it supports a scripting language(jvm based obviously) to develop.

Introduction to Android - Jason Chen
Looks like there are 1.1 billion PC based internet users and over 3 billion mobile users. And, most of the mobile market is fragmented with more than a dozen platforms to develop applications on. Jason discussed the android application stack which you can find here.

Anatomy & Physiology of an Android Application
Linux Kernel: Android built on linux kernel but it is not linux. All android specific functionality is built as drivers that run on top of the kernel. Thanks to the power of microkernel architecture. Android has custom linux drivers like Alarm, Ashmem (shared memory), Binder (IPC), low memory killer, power management, kernel debugger and logger modules.

Binder: Reduces IPC(Inter Process Communication) overhead and manages security issues. Uses shared memory (data between applications is shared). Manages per process thread pool. Performs Reference counting and mapping of object references so that shared objects are tracked and cleaned up. It also supports synchronous calling between applications to enable IPC. When process A calls method foo on service stub, binder driver proxies the object and sends it to the service. Since there is no serialization, there is no overhead that is encountered by a typical IPC.

Power Management:
Mobile devices run on battery power which have limited capacity. So, Android builds on linux's power management to manage power better. It does not replace linux power management. Android uses wake locks (partial, full) which expose the platform' power management to the developer. An Application requests a wake lock, PowerManager makes sure that the device is powered on until the application releases the wakelock. Alternative way of implementing wakeness is userActivity which takes a time period and keeps the application processing part of android alive.

Sitting on the linux kernel are libraries written in C++. Like Bionic (the custom libc implementation) Function libraries like Webkit browser, SQLlite and Native libraries like the SurfaceManager. Applications write to surfaces and the surface manager coalesces the different surfaces and outputs it to the frame buffer (display). Audio Manager works similarly. Audio Flinger routes different audios to different audio devices like speaker, headset, ear piece etc.

Hardware Abstraction Library: These are native libraries that sit above the linux kernel. This layer defines APIs for developers to port android to different hardwares.

Android Physiology:
When the Android platform starts, it starts the linux daemons like USB, Debug Bridge etc. It them starts the Zygote process which is basically a template for future processes. Next, it starts the service manager as the default binder. Overall, this talk rocked.

Under the covers of App Engine Datastore - Ryan Barrett

The AppEngine datastore is powered by BigTable. BigTable is basically a sharded sorted array. Supports sort of test and set operations. They call it single row transactions (read-update)

All entities are stored in a single table called Entities table. Entity keys have a field name:value format(hierarchial). The entities table is ordered by key. So, accessing an entity with a key or iterating on adjacent keys is easy. Although, the only way to re-parent an entity is to delete it and re-create it.

Composite Index:
You define the index yourself in index.yaml Or, when the app runs in the dev area, app engine looks at it's queries and creates indices by default. The flip side of auto-index is if a query has not been hit in dev mode, the prod refuses to handle it, and throws an exception. So, run all ur code paths in dev mode.

Transactions: AppEngine datastore supports atleast read-committed using a last committed timestamp embedded into the data.

Oh yes, there was a 4 hour party at the end of the day. Good music, good food and got to network with Geeks and Higher-ups alike.

1 comment:

Android app development said...

This is one of the reliable post.I like your content.This is one of the valuable and developed post.This is one of the user friendly post.Android app developers