<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    "Spoon's remote messaging support doesn't use ReferenceStream to<br>
    serialize, it uses a minimal proxy-aware framework (with a bias
    toward<br>
    sending references, not copies). See class MessagingSession, and the<br>
    implementors of storeOnProxyStream:for: and storeOnProxyStream:."<br>
    <span class="Apple-style-span" style="color: rgb(0, 0, 0);
      font-family: Times; font-style: normal; font-variant: normal;
      font-weight: normal; letter-spacing: normal; line-height: normal;
      orphans: 2; text-indent: 0px; text-transform: none; white-space:
      normal; widows: 2; word-spacing: 0px; background-color: rgb(255,
      255, 255); font-size: medium;">
      <pre>


A Message instance is isolated and sent #storeOnProxyStream:for:. This begins an encoding of that object, which is to say, the object is 
described with tags. That tags are here:

<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Times; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; background-color: rgb(255, 255, 255); font-size: medium;"><pre>MessagingSession class &gt;&gt; #initialize
        "Initialize myself."
        "self initialize"

        SpecialVariableSignatories := (
                (Dictionary new)
                        at: true put: trueTag;
                        at: false put: falseTag;
                        at: nil put: nilTag;
                        yourself).

        EncodingClasses := (
                (Dictionary new)
                        at: symbolTag put: Symbol;
                        at: stringTag put: String;
                        at: messageSendTag put: MessagingSession;
                        at: counterpartRequestTag put: CounterpartRequest;
                ... snip ... 

All manner of object can be described with these encoding tags. It's a stream of this tag information that goes over the wire. With this
information the objects can be recreated on the other size. That's interesting. Unlike Noury's solution we are not copying the object on 
other side; we are sending lots of information about it. 

I can see how this would replace a Changes file, because you have stored the state of the code with these encoding tags. You're storing
the state of the source code without using text. 

And maybe it's a little more versatile than that, too. I understand Viewpoints Research has created something called Worlds, where versions
of a single object be stored in a single image. This version information seems like a way to do something similar. Different 
versions can be stored and re-instantiated. 

The Object&gt;&gt;storeOnProxySTream:for: has a class comment that seems to sum it up:

storeOnProxyStream: aStream for: aMessagingSession 
        "Store myself on aStream in such a way that I may be reconstructed by the peer connected to aMessagingSession."
        "By default, store a reference to myself, not a copy."

        (
                (self respondsTo: #storeOnProxyStream:)
                        ifTrue: [self]
                        ifFalse: [self otherVia: aMessagingSession]
        )
                storeOnProxyStream: aStream


To conclude, objects are described by encoding. The encoding is done by a series of tags in MessagingSession. These are stored in 
the history image. 

The only thing I don't understand is how encoding data can "re-animate" an object on the other side, if the subject image does 
not have a compiler. I used to think Spoon sent serialized compiled methods to the subject memory, but we are encoding the 
specifications of compiled methods and sending that over the wire. But what agency is building fresh objects with this data? Is this 
something the modified vm does?

Chris 


</pre></span>
</pre>
    </span>
  </body>
</html>