[prev in list] [next in list] [prev in thread] [next in thread]
List: e-lang
Subject: Re: [e-lang] JOSS PBC works between rune instances,
From: Kevin Reid <kpreid () mac ! com>
Date: 2007-01-30 17:49:03
Message-ID: A5899FD5-1726-4838-B632-B7C9BE3B3A36 () mac ! com
[Download RAW message or body]
On Jan 30, 2007, at 11:08, Martin Scheffler wrote:
> I have some Java geometry classes: Quaternion, Vector3D. These classes
> implement JOSSPassByConstruction. I pass objects of these classes
> happily between my client and server, and they arrive as :near.
> Now I tried to create a Vat with makeVat. When I pass a vector to that
> vat, it arrives as a proxy!
> def makeVat := <unsafe:org.erights.e.elib.vat.makeVat>
> def seedVat := <elang:interp.seedVatAuthor>(<unsafe>)
>
> def vat := makeVat.make("headless", "testvat")
> def scriptObj:= seedVat(vat, scriptSource)
This is because seedVat uses, by default, the boot-comm system, which
does not do general PassByConstruction, but only special cases
sufficient to bootstrap communication between local vats (the objects
must be DeepPassByCopy and thread-safe).
To start proper communication, use the 'virtualized' seedVat, which
uses boot-comm to set up CapTP communication.
introducer.onTheAir()
def virtualSeedVat := seedVat.virtualize(introducer)
(MarkM has said he will fix the confusing naming: http://www.eros-
os.org/pipermail/e-lang/2007-January/011776.html .)
(If you're using persistence, perform the virtualize only after you
have restored the persistent vat identity.)
Notes unrelated to getting your code working:
1. It would be simpler to seed and create the vat together:
def [scriptObj, vat] := virtualSeedVat(scriptSource)
2. I would think that now that we have uncall-based PBC, JOSS PBC
should not be used by new code. However, I don't see a way for
arbitrary Java classes to claim to be approved by the
PassByConstructionAuditor. MarkM?
--
Kevin Reid <http://homepage.mac.com/kpreid/>
_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic