Tuesday, October 24, 2006

Sausages, Eggs and Biscuits

To my disappointment the Monday tutorial on Dynamic Programming at the Model Level was no longer on the program. I have contacted the presenters to find out why…

Instead I went to Refactoring Databases : Evolutionary Database Design with Scott Ambler and Pramod Sadalage and it was quite good but there was too much agile propaganda.

Data is important and since it is it should not be treated as a second class citizen, but should be included in the normal development and refactoring process. The current state in the database world is not good. There are no tests and no evolutionary process of caring for the data.

The main issue of evolutionary database design is to let every developer have his own database allowing him to make changes without disturbing the flow of everyone else. Scripts to setup the database and populate it with with base data should be available for every developer. These scripts are the database schema and should be updated and versions as development goes along. An article by Martin Fowler discussed this issue about three years ago.

While updating the database scripts migration scripts should also be added to enable transitions from one version of the database to another. Tools for simplifying migrations are: MIGRATEdb and Sundog Refactoring Tool. The migration scripts should be checked into the repository along with the code changes and be run by the continuous integration tool.

For migrating production databases a strategy of adding additional columns and tables for a transitory period should be employed. The redundant data should be kept in sync by database triggers. After the transition period has past the redundant columns should be removed.

The afternoon tutorial was Concurrent Object-Oriented Programming for Modern Architectures. It is about a second generation OO language called X10. It is a new language but it reuses most of the Java language to facilitate the transition from Java and to use some of the advantages of Java. The language is designed to perform well on clusters and parallel hardware. X10 takes Java and remove threading and dynamic class loading and adds asynchronous constructs:
  • async stmt – runs stmt asynchronously.
  • finish stmt – waits for statements started by stmt.
  • foreach stmt – runs stmt in different threads.
  • atomic stmt – performs stmt inside a transaction.

X10 uses a global address space where object reside in places that never move. The places may reside locally or globally.

I ended the day with “Data Refactoring for Amateurs” by Avi Bryant creator of the continuation based web framework for Smalltalk. Avi had a number of refactorings that end users are in need of doing while working in a spreadsheet like environment: They are: Assign Type, Limit Options, Extract Table, Move field to related table, Merge fields and Invert relation.

2 comments:

Winzell said...

This X10 language sounds very interesting. Really like to hear more about that approach. Like to hear more on the approach of using a global adress space, i.e what this means to a concurrent programmer.

Anders Janmyr said...

You can find more information here: http://www.saraswat.org/x10.html
http://grothoff.org/christian/x10.pdf
Also IBM is planning to Open Source X10 in decembers this year.