[e-lang] Should local promises respond to __whenMoreResolved on resolution?

Mark Miller erights at gmail.com
Sun Sep 9 13:42:50 EDT 2007


On 9/9/07, Kevin Reid <kpreid at mac.com> wrote:
> Should a local promise respond to __whenMoreResolved messages (as
> CapTP remote promises do) rather than forwarding them when it becomes
> resolved? E-on-Java and E-on-CL don't do this.

There are many patterns that assume it's lightweight and generally
invisible for local promises to resolve to other local promises. For
example:

    def foo() { return when ... }

    ... foo <- () ...

With eventual control structures, often these partial resolutions
happen in tail recursive loops. It would seem excessive if each of
these steps might generate a remote notification that, typically, no
one will care about anyway.


> If they did, then two promises exported from a vat, one of which then
> resolves to the other, will then be externally visible as the same.

I had never considered this case, but you're correct.


> Currently, if I understand correctly, they will remain different
> until the remaining promise resolves to a resolved-ref or a remote
> promise which itself resolves and responds to __whenMoreResolved at
> that time.

I would have said "or a remote promise" without the "which itself
resolves". The second clause seems incorrect to me.


> It also seems to break shortening: if the latter promise in the above
> scenario is a proxy, then it might be a candidate for 2 or 3-vat
> shortening, but the local comm system won't be notified of the
> resolution.

I don't understand this scenario. Can you expand? Thanks.

-- 
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM


More information about the e-lang mailing list