Atomic loading of Monticello packages

Colin Putney cputney at wiresong.ca
Mon Nov 27 07:20:49 UTC 2006


On Nov 26, 2006, at 10:26 PM, Lukas Renggli wrote:

> Did you had a look at the work of Colin?
>
>   http://map.squeak.org/package/8830dcdc-9329-4190-80cc-dc614c55f3e0
>
> In the description it says:
>
> "SystemEditor is a mechanism for atomically loading a set of changes
> to the system. It's intended to be used by tools such as that move
> classes (or parts of classes) between images, such as Monticello,
> Monticello2, change sets, fileIns etc.
>
> It provides a familiar interface for making changes, but does not
> execute the changes until it receives a #commit message. This makes it
> easier to update existing tools to load their changes atomically."

I posted about this in response to Ralph's last message, but the  
message seems to have dissipated in the ether somewhere. Here it is  
again:

On Nov 24, 2006, at 9:32 PM, Ralph Johnson wrote:


> I am far from a Monticello expert, but I have been looking at the  
> code.
> It looks to me that class PackageLoader could be changed to load  
> atomically.
> Basically, instead of making one pass through MCDefinitions (such as
> MCMethodDefinition, MCCLassDefinition and MCScript) and loading each
> one, the PackageLoader should first make a pass doing a preload and  
> then
> a pass doing a load.  Classes will be loaded during the preload and
> methods will be compiled during the preload, but actually installed  
> during
> the load.This would mean that you wouldn't run the compiler during the
> actualy loading of methods.  Something similar would have to be done
> for unloading.
>
> Do people who know more about MC than I do think this  would work?
>

Yeah, sounds reasonable.

For MC2, I created a package called SystemEditor that uses roughly  
the same approach. It presents an "editing" interface with the same  
protocol as the real system. I'm sure it's not quite identical, but  
it's close enough that MC2 can have atomic loading turned on or off  
with a one-line change.

It probably wouldn't be much work to make MC1 load definitions  
through SystemEditor rather than SystemDictionary. More work would  
have to go into SystemEditor to make it solid enough for production  
use, but it's still probably less work than starting from scratch.

Colin




More information about the Squeak-dev mailing list