[Glass] Class Migration

Otto Behrens via Glass glass at lists.gemtalksystems.com
Mon Feb 1 20:36:44 PST 2016

Thanks, that's interesting.

> If you have the flexibility to take the site down while migrating, that
> is easier. For applications that cannot incur the downtime, migration is
> usually a two-phase process.

Fortunately, we've always had a window to take the site down.

> In a two-phase application update, the first phase modifies the
> structure of the objects, but leaves the behavior the same. This allows
> the system to behave predictably when some objects are migrated and
> others are not.

Your code cannot be totally ignorant of new structures, so perhaps
you'll have to write some code that can handle both old and new
structures? But you can do that in one commit though.

> Once all objects have their structure migrated, a second
> software update with no structural changes brings in the behavior that
> needed the structural change. The second phase can be done as a single
> commit, so the cutover to the new application version is essentially all
> at once.

A seaside application using stuff like "commitWhenAlmostOutOfMemory"
would certainly not work then.

> This takes more careful coding and is more work, but it does enable 24/7
> uptime applications to evolve.

I can imagine! A bit more careful planning too.

More information about the Glass mailing list