Jeremy Hylton : weblog : April 2004 last modified Thu Mar 17 01:11:16 2005

Jeremy Hylton's Web Log, April 2004

Starting at Google next month

permanent link
Friday, April 16, 2004, 3:50 p.m.

I'll be starting a new job at Google in the New York City office next month. I can't wait.

Greg Stein, another long-time Python developer, just started at Google as an engineering manager. I found via an email sent to Greg's Orkut friends list. It was probably the first useful connection I've made via Orkut.

I think Orkut could be useful if it was better connected with my other communications -- email, IM, etc. -- instead of having its own closed world of messages. My friends list would be more useful if it could help me discover connections. When an email arrives from someone I don't know, it could show me friends we have in common or interest groups we both belong to. That way, it would be augmenting my existing communications and provide some incentive for participating.

ZODB 3.3 alpha 3

permanent link
Friday, April 16, 2004, 4:13 p.m.

Tim Peters and I spent the better part of this week getting ZODB into shape for another alpha release. It's the last release of ZODB that I'll be actively involved in. I wish we had been able to get a beta release done, but there's too much new development for that; we need a release for people to try it out before the APIs can be finalized.

There is a long list of changes and new features in the NEWS file. My biggest project has been the revised transaction API -- a little more like the one we were working on in ZODB 4. I think the new APIs will be easier to use and provide more flexibility for people that don't like ZODB's default policy of giving each thread an independent transaction.

The revised transaction API has a completely new implementation. Most of the implementation was straightforward, but subtransaction support was not. ZODB 4 had savepoints that were created independently of committing a transaction. An application could rollback to an arbitrary savepoint, while ZODB 3's subtransaction only allow you to rollback changes since the last sub-commit. The API is cleaner for savepoints, but there's a major implementation benefit I hadn't realized before: The abort and commit logic becomes much clearer, because it isn't tangled up with the subtransaction support; they're two mostly independent features.

There are some nice changes to Persistent that were backported from ZODB 4 by Fred Drake, including improved support for getattr and setattr hooks. Fred also realized that we should distinguish between deactivating objects and invalidating objects; the former occurs because of cache eviction, the latter because of updates by another client.

The new release also reflects a new approach to writing tests. There are several tests that are based on doctest. Jim Fulton and Tim had a paper at PyCon that described some of our experience mixing doctest and unittest. Most of the new tests I've written have been constructed as module-level docstrings, e.g. testmvcc.py. A key idea is that tests require the same care and attention that the rest of your code requires; they require the same evolution and maintenance that the rest of the code requires.

We've come a long way since the StandaloneZODB release in early 2002. The current version of ZODB has support for new-style classes and multi-version concurrency control to eliminate read conflicts. We fixed a ton of bugs in concurrency control, prevented deadlock in multi-database commits, and overhauled ZEO so it was stable under heavy load. It's been a lot of fun.