Sunday: still on the same kick
- Underestimating complexity
- Not knowing how to ask for help
- We write/generate way too much code
- We pretend everything will be alright
- Security matters.
Tom got a spontaneous round of applause for an extended riff on
when others then nullwhich ended "if it's okay for all of your code to not run some of the time then it's okay for it to never run. So take it out." I think if he had included a "Can I get a 'Amen'?" in there he would have got one those too.
My session went pretty well. I think. It was standing room only, which was nice. Both Steven Feuerstein and Bryn Llewellyn were in the audience, which was a bit daunting. I opted for the lectern microphone, which was a mistake; I occasionally misjudged the distance, so the sound levels on the recording will probably be wild. The annoying thing was a problem with the projectors, which washed out the slides. Some were virtually invisible. Fortunately they were mainly there as supporting wallpaper for my talk but it was still frustrating after all the effort I had put in to them. There were no questions at the end, which worries me slightly. But on the other hand hardly anybody walked out, so I hope they got something from it.
I stayed with the Design Patterns thing by going to hear Robin Smith and Shailendra Mishra talk about Design Patterns for Complex Event Processing. As it turned out there were not really any design patterns as such, just an introduction to Oracle's CEP implementation. They have extended ANSI 92 SQL to include a temporal component. This means we can query a STREAM of events using a SELECT ... FROM statement just like a database table. Furthermore we can use WHERE clauses and even join the out put from a stream with regular database tables. Plus the demo included a Google Maps plug-in which the changed colours of the pins in real time. Cool!
Then I went to hear Bryn Llewellyn's talk on Edition-Based Redefinition. This is a very exciting new feature of 11gR2 It will allow us to apply changes to database code and structures online, in production, invisibly to the users. The key to this is running the old code and the new code in parallel. This is achieved with Editions. An Edition is basically a copy of a set of database objects. We can change some of them in the new Edition. Items such as tables are not editionable, so they need to have structures which support both the old and the new edition. DML changes are applied transparently to both using Cross Edition triggers and the data is retrieved using Editioned Views.
We can run both Editions in parallel for as long as we like, in a period rather sexily called Hot Rollover. But eventually we switch all our users over to the new Edition and we can drop the remnants of the old edition in slow time. Oracle are marketing this as a High Availability feature but I think the main attraction for developers will be the chance to put an end to Upgrade Failure Misery. Editions give us the opportunity to get the code in place, migrate the data and generally make sure everything is working properly before we announce the release of 2.1 to our users.
There are some interesting limitations. There is no ability to reference an object by Edition. We can set the Edition for a session, programmatically, but all the objects we see are determined by the set Edition. Tables are not - and never will be - editionable. A non-Editioned item cannot depend on an Editioned item. That means that tables cannot use an Editioned Type and function-based indexes cannot use an Editioned function.
I thought Edition-Based Redefinition is such a cool feature that it would be a Chargeable Optional, like all the other recent cool features (yes, RAT, I'm talking about you). But in fact the opposite is true. Not only is Editions not an option it is mandatory: when we install 11gR2 our database has a default Edition. But if we want to make use of the Redefinition capability we have to do some work to re-jig the schema (rename all the tables, put in Editioned views with the old table names). That has to happen offline. But Bryn promises us it will be the last offline upgrade we'll ever do.