[e-lang] Should local promises respond to __whenMoreResolved on resolution?
Kevin Reid
kpreid at mac.com
Sun Sep 9 18:12:26 EDT 2007
On Sep 9, 2007, at 14:21, Mark Miller wrote:
> On 9/9/07, Kevin Reid <kpreid at mac.com> wrote:
>> 1. Alice and Carol have local promises. Alice has a CapTP
>> reference to Carol's promise.
>>
>> 2. Alice sends her promise to Bob. Her local comm system sends
>> __whenMoreResolved to the promise with the redirector as reactor.
>> The message is queued in the local resolver.
>>
>> 3. Alice resolves her local promise to (her proxy for) Carol's
>> promise; the WMR message is forwarded to her proxy-for-Carol.
>
> In step #3, when Alice's proxy for Carol's promise receives the WMR
> message, it sees that its reactor argument is a proxy for an object
> of Bob's. So, rather than forwarding the WMR message to Carol, the
> proxy instead sends a notification to (Alice's proxy for) Bob's
> reactor, with the argument on the notification being (Alice's proxy
> for) Carol's promise. This is serialized as a Promise3Desc sent to
> Bob's redirector.
>
> But I know you already know all this, so I'm probably confused
> about something. What am I missing?
That I don't know all this. I've never before heard of any hint of a
WMR handler making a decision based on the nature of the reactor. I
see that doing so will solve the problem, but it seems (from my
current perspective) a bit epicyclic -- piling on patches until it
works. That's probably just because this is new to me.
Additionally, it violates the expectation I had formed that for all
x, x <- __whenMoreResolved(fn y { ... }), it is always the case that !
(sameYet(x, y)).
Also, you write:
> So, rather than forwarding the WMR message to Carol,
My understanding had been -- and I was working on this code when I
noticed this problem -- that WMR is never sent over over the wire
(except for delayed redirection purposes) for a remote promise;
rather, reactors are buffered locally, and invoked when the
redirector for the proxy is invoked.
Am I wrong about this?
Related question for unrelated reasons: when __whenMoreResolved is
sent to a far ref proxy, is it sent over the wire always, never, or
only if not fresh?
--
Kevin Reid <http://homepage.mac.com/kpreid/>
More information about the e-lang
mailing list