Squat progress 2 August 2004: "imprinting"

Craig Latta craig at netjam.org
Mon Aug 2 23:08:36 UTC 2004


Hi--

	I've implemented the more brute-force means of transferring behavior on
demand, as mentioned in my 3 July message. I have successfully
transferred, from one snapshot to another, all the methods run in the
first million sends of an application, without using the compiler, and
without any special consideration for which methods those were. I call
this process "imprinting".

	The main benefit of this approach, as I'm using it now, is making an
application smaller by leaving unused behavior behind. (This is useful
because I want to minimize the download time of the resulting
snapshot.)  I can see other interesting uses as well; for example,
"behavior broadcasting", in people "tune in" to a running system (e.g.,
at a demo during a conference), and come away with all the behavior
needed to run the demo again for themselves. It's also a good way of
transferring unmodularized behavior from one place to another without
having to understand its architecture or dependencies.

	[This reminds me a little of the first Matrix movie, where characters
have martial-arts or helicopter-flying skills imprinted onto them. :) 
But notice they didn't start fighting or flying before the imprinting
was finished. That'd be similar to the first on-demand transfer approach
I tried, and later shelved (see the Squat mailing list archive). I
suppose for reference I'll call the previous approach "active
imprinting", and the current one "passive imprinting".]

	The process works by running the application in a copy of the source
snapshot (the "input" snapshot), which reports the ID of each method run
to the original source snapshot (via a special virtual machine); the
source then ensures that the corresponding methods are installed in the
target. The communication between the input and the source, and between
the source and the target, is done with remote message-sending (a
message-event server in the input sends messages to a message-event
client in the source, which then sends messages to a Squat module in the
target).

	In my current sessions, the source is a 3.6 snapshot, and the target is
a 2.2 snapshot. This encourages me that the technique will work between
snapshots of any likely vintage.


-C

--
Craig Latta
improvisational musical informaticist
craig at netjam.org
www.netjam.org
[|] Proceed for Truth!




More information about the Spoon mailing list