[Glass] Class Migration

Martin McClure via Glass glass at lists.gemtalksystems.com
Mon Feb 1 15:28:02 PST 2016


On 01/31/2016 10:24 PM, Otto Behrens via Glass wrote:
> But we like to control when and how the migrations take place, because
> we like to take the site down so that we do not have active users on the
> system while migrations take place. I don't know how it's possible
> anyway to be sure how your system will behave when migrations have run
> partially (you then have the situation with some objects migrated and
> others not: how will the system behave?)

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.

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. 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.

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

Regards,

-Martin


More information about the Glass mailing list