Updates from Googlers Contributing to Open Source Projects
Wednesday, January 28, 2009
You may recall some of our previous posts about Google employee contributions to Open Source during their 20% time. While many engineers spend their 20% time on releasing code created internally at Google, many more spend their time contributing to external projects just to scratch their own itch. We're pleased to bring you some updates about what our engineers have been doing over the past few months:
For all you version control geeks out there, you'll be interested to know that Ben Collins-Sussman has been working on rewriting Subversion's HTTP protocol. While the rewrite will still be WebDAV compatible, he's busy removing all of the DeltaV formalities that cause numerous extra requests. Once complete, users should see much faster network traffic when speaking to an Apache server. For more details, check out the write up on Ben's blog.
Continuing his work on WHOPR, a scalable whole program optimizer for GCC, Diego Novillo reports that the complier can now build several Google applications with link-time optimizations enabled. Diego and the rest of the WHOPR team are handling code generation bugs and performance problems with generated code. They expect to be showing steady performance improvements over the next couple of months.
Frank Mayhar recently submitted a patch to remove the journaling dependency from ext4. The patch has been accepted and should be merged very soon. You can find more details and the actual patch submitted in the kernaltrap.org list archives.
Shiki Okasaka continued development on the ES Operating System, releasing some new source tarballs. Included in the latest release were a number of contributions made by Google Summer of Code students. The switchover to the new Web IDL standard from OMG IDL for the system interface definitions is in preliminary stages and some progress has also been made on the implementation of the project's TCP/IP stack. The latest release also contains the Web IDL based preliminary RPC runtime for x86 linux, allowing for testing and combination of multiple ES software components running in separate processes on Linux, a substitute for the ES kernel natively running on a PC.
Tim Hockin contributed to a number of different systems software projects. Work continued on the recently released prettyprint project. Tim has been exploring languages to use for prettyprint's runtime, Javascript being the top contender for now. He has also worked on improvements to ACPID, including a lot of code clean up and a minor release. Tim also has a patch in his review queue to add netlink support to this completely flexible, totally extensible daemon for delivering ACPI events. He's also done some more work to whip the MCE Daemon into shape and is looking at promoting it for various distros.
These are just a few of the many contributions that have taken place over the past few months, and we'll be bringing you regular news about what Googlers are up to in the wide world of Open Source. Happy Hacking!
OpenGSE Released
Tuesday, January 27, 2009
By Wenbo Zhu, Software Engineering Team
Something that may be of interest to Open Source enthusiasts is the recent release of the Open Google Servlet Engine (OpenGSE). Once upon a time engineers within Google developed their own fast, lightweight servlet engine which we inside Google refer to as simply the "Google Servlet Engine" or GSE. Many of Google's products, both internal and public facing, use the GSE, including GMail and Google Calendar. The OpenGSE code base conceptually consists of an inner-core which focuses on raw HTTP processing and a shell which wraps that inner core and implements the so-called "servlet container" abstraction. This approach was taken originally just because it made the coding easier, but it was found that this servlet container layer can wrap our internal corporate version, the Google Servlet Engine, and enable it to provide the same servlet container support as OpenGSE! While we weren't anticipating this outcome, it was an excellent unintended side effect and will help improving the functionality of our internal systems, as well.
While opening the code and removing all Google specific dependencies, it was necessary to ensure that the code base still behaved like a servlet engine: invalidated sessions are unable to store objects, etc.. We started with Watchdog, a then dormant test suite that only checks servlet spec 2.3 (to some extent). We decided to investigate how difficult it would be to add a few extra tests to test the features in the 2.5 spec. The tests were added and the code-base was tweaked further to pass those tests. The client-side of the original watchdog tests consisted of a custom ANT task which writes results to System.out. All of these client-side custom ANT task invocations were transformed into individual JUnit test methods which makes IDE development much, much easier and more pleasurable.
During a casual conversation with some of my fellow engineers, they suggested that perhaps the best way to think of OpenGSE is as a suite of servlet engine tests with a "reference servlet engine" that passes these tests. The "toy" servlet engine supplied with the test suites would have the same core http processing code (as far as possible) as the servlet engine which powers GMail etc. For folks outside of Google, there's really no compelling argument to drop Apache Tomcat/Jetty, etc. in favor of OpenGSE's reference servlet engine, but anyone interested in servlet engines would have a fantastic learning resource available to them. For Googlers, using a servlet-layer wrapped internal GSE for their project means that future Open Sourcing of their project becomes that much easier.
Special thanks goes to Mike Jennings who took the initiative, led this Open Source project throughout 2007-2008 and managed to get the first version of OpenGSE out in 2008, as well as Spencer Kimball and Peter Mattis, the two original authors of GSE.
We hope that you will find OpenGSE as useful as we have. Check out the code and send us your feedback in our Discussion Group.
Ed. Note: Updated post to clarify the terminology used.
Something that may be of interest to Open Source enthusiasts is the recent release of the Open Google Servlet Engine (OpenGSE). Once upon a time engineers within Google developed their own fast, lightweight servlet engine which we inside Google refer to as simply the "Google Servlet Engine" or GSE. Many of Google's products, both internal and public facing, use the GSE, including GMail and Google Calendar. The OpenGSE code base conceptually consists of an inner-core which focuses on raw HTTP processing and a shell which wraps that inner core and implements the so-called "servlet container" abstraction. This approach was taken originally just because it made the coding easier, but it was found that this servlet container layer can wrap our internal corporate version, the Google Servlet Engine, and enable it to provide the same servlet container support as OpenGSE! While we weren't anticipating this outcome, it was an excellent unintended side effect and will help improving the functionality of our internal systems, as well.
While opening the code and removing all Google specific dependencies, it was necessary to ensure that the code base still behaved like a servlet engine: invalidated sessions are unable to store objects, etc.. We started with Watchdog, a then dormant test suite that only checks servlet spec 2.3 (to some extent). We decided to investigate how difficult it would be to add a few extra tests to test the features in the 2.5 spec. The tests were added and the code-base was tweaked further to pass those tests. The client-side of the original watchdog tests consisted of a custom ANT task which writes results to System.out. All of these client-side custom ANT task invocations were transformed into individual JUnit test methods which makes IDE development much, much easier and more pleasurable.
During a casual conversation with some of my fellow engineers, they suggested that perhaps the best way to think of OpenGSE is as a suite of servlet engine tests with a "reference servlet engine" that passes these tests. The "toy" servlet engine supplied with the test suites would have the same core http processing code (as far as possible) as the servlet engine which powers GMail etc. For folks outside of Google, there's really no compelling argument to drop Apache Tomcat/Jetty, etc. in favor of OpenGSE's reference servlet engine, but anyone interested in servlet engines would have a fantastic learning resource available to them. For Googlers, using a servlet-layer wrapped internal GSE for their project means that future Open Sourcing of their project becomes that much easier.
Special thanks goes to Mike Jennings who took the initiative, led this Open Source project throughout 2007-2008 and managed to get the first version of OpenGSE out in 2008, as well as Spencer Kimball and Peter Mattis, the two original authors of GSE.
We hope that you will find OpenGSE as useful as we have. Check out the code and send us your feedback in our Discussion Group.
Ed. Note: Updated post to clarify the terminology used.
Surf the Earth
Thursday, January 22, 2009
By David Oster, Mac Engineering Team
For those of you not following the Google Mac Blog, you may be interested to check out one of our newest releases, Earth Surfer. The code for Earth Surfer, an application that allows you to use a Nintendo Wii Balance Board to travel over Google Earth in a milk truck, is based on Thatcher Ulrich's terrific Open Source Javascript Monster Milktruck demo, and runs in a webpage.
We always look forward to your feedback, so check out the code and send us your comments in our discussion group.
For those of you not following the Google Mac Blog, you may be interested to check out one of our newest releases, Earth Surfer. The code for Earth Surfer, an application that allows you to use a Nintendo Wii Balance Board to travel over Google Earth in a milk truck, is based on Thatcher Ulrich's terrific Open Source Javascript Monster Milktruck demo, and runs in a webpage.
We always look forward to your feedback, so check out the code and send us your comments in our discussion group.
Open Sourcing Google Desktop Gadgets
Wednesday, January 21, 2009
By James Yum, Developer Programs Team
The Google Desktop team has been steadily releasing our Desktop gadget (widget) creations as Open Source for the past few years. If you check out this list, you can see most of the official Google created gadgets are actively maintained by the Google Desktop developer community. We had many good reasons for opening this code for the community:
To summarize, I'd encourage community members to consider opening your projects, even smaller ones. These fancy search engines nowadays are quite good about picking up code, and your algorithms and graphics can help someone in need.
In the past few weeks, we released some pretty cool gadgets for YouTube, Calendar and Google Docs. While developing these gadgets, we tried something different and almost exclusively used Project Hosting on Google Code rather than internal Google repositories, as our goal from the outset was to open this code base to all who might benefit from it.

Our experience has been great. We had to work closely with the Google Gadgets for Linux team, who typically work entirely in public Subversion repositories; using Project Hosting on Google Code helped us better integrate with their development process. We also asked expert users of Google products to consult with us on usability and design concerns. It was a great pleasure to add them as full-fledged project members during the development phase instead of waiting for this feedback post launch. We also worked with many contributors who are not Google employees, who helped provide development and graphic resources. These were the most enjoyable projects I've been a part of during my time at Google, primarily because of the cooperative atmosphere among many different people and teams.
The Google Desktop team has been steadily releasing our Desktop gadget (widget) creations as Open Source for the past few years. If you check out this list, you can see most of the official Google created gadgets are actively maintained by the Google Desktop developer community. We had many good reasons for opening this code for the community:
- Source code can be a valuable learning tool. The gadgets not only show you how to develop Desktop gadgets, integrate with Google APIs, but also provide other tidbits of knowledge such as how to calculate phases of the moon or StarDates.
- The images and graphics are also Open Sourced. Being an engineer, I know how frustrating it is to work hard on an application only to have it dismissed because of hand-drawn stick figures and shapes. We hope people can take advantage of our graphic designers' talents. If you're a fan of clocks, I have something right up your alley.
- We get warm fuzzy feelings by simply supporting the cause. It fosters a spirit of openness and collaboration between the team and developer community.
To summarize, I'd encourage community members to consider opening your projects, even smaller ones. These fancy search engines nowadays are quite good about picking up code, and your algorithms and graphics can help someone in need.
In the past few weeks, we released some pretty cool gadgets for YouTube, Calendar and Google Docs. While developing these gadgets, we tried something different and almost exclusively used Project Hosting on Google Code rather than internal Google repositories, as our goal from the outset was to open this code base to all who might benefit from it.

Our experience has been great. We had to work closely with the Google Gadgets for Linux team, who typically work entirely in public Subversion repositories; using Project Hosting on Google Code helped us better integrate with their development process. We also asked expert users of Google products to consult with us on usability and design concerns. It was a great pleasure to add them as full-fledged project members during the development phase instead of waiting for this feedback post launch. We also worked with many contributors who are not Google employees, who helped provide development and graphic resources. These were the most enjoyable projects I've been a part of during my time at Google, primarily because of the cooperative atmosphere among many different people and teams.
CSS Selector Shell Released
Tuesday, January 20, 2009
By Lindsey Simon, Google User Experience Team
Most web developers have felt the pain of discovering or remembering ways in which different browsers interpret and/or render their Cascading Style Sheets (CSS). Our newly released CSS Selector Shell is a simple Javascript tool for testing how a given browser parses CSS text by inserting a style element into the document and then reading the cssText back programmatically. You can already check out the CSS Selector Shell code base in action on Google AppEngine.
So far this tool has proven quite useful by showing what happens when developers try to make use of CSS selector syntax that may not be supported in a particular browser. Specifically, it can show how and perhaps why a particular CSS hack works in some browsers and how it is ignored in others. It can also demonstrate the potential for harm when using unsupported CSS syntax in some browsers. For instance, when testing a combined selector ".class1.class2" in Internet Explorer 6, it becomes active as ".class2", which may not at all be the goal of the CSS author. Another detail the CSS Selector Shell demonstrates is that shorthand property/values sometimes expand much further than you may have suspected. On the test page itself, there are two visible test elements that you can use to target and experiment. The code itself makes use of the Dojo Tooklit as well as the Django framework.
We hope this tool will be useful to you in diagnosing problems or understanding the differences between browsers when interacting with your Cascading Style Sheets. We always welcome your feedback, so check out the code and let us know what you think in our discussion group.
Most web developers have felt the pain of discovering or remembering ways in which different browsers interpret and/or render their Cascading Style Sheets (CSS). Our newly released CSS Selector Shell is a simple Javascript tool for testing how a given browser parses CSS text by inserting a style element into the document and then reading the cssText back programmatically. You can already check out the CSS Selector Shell code base in action on Google AppEngine.
So far this tool has proven quite useful by showing what happens when developers try to make use of CSS selector syntax that may not be supported in a particular browser. Specifically, it can show how and perhaps why a particular CSS hack works in some browsers and how it is ignored in others. It can also demonstrate the potential for harm when using unsupported CSS syntax in some browsers. For instance, when testing a combined selector ".class1.class2" in Internet Explorer 6, it becomes active as ".class2", which may not at all be the goal of the CSS author. Another detail the CSS Selector Shell demonstrates is that shorthand property/values sometimes expand much further than you may have suspected. On the test page itself, there are two visible test elements that you can use to target and experiment. The code itself makes use of the Dojo Tooklit as well as the Django framework.
We hope this tool will be useful to you in diagnosing problems or understanding the differences between browsers when interacting with your Cascading Style Sheets. We always welcome your feedback, so check out the code and let us know what you think in our discussion group.