[e-lang] CapTP in E progress report #2: ping test, source now public

Kevin Reid kpreid at mac.com
Sun Jul 29 22:58:44 EDT 2007


On Jul 27, 2007, at 23:25, Kevin Reid wrote:

> I have started work on a CapTP implementation in E.

My work so far has now been committed to E-on-CL (revision 855). I  
have CapTP protocol implementations which can transfer simple messages.

svn://www.slimy.com/cl-e/cl-e/trunk/lib/net/captp

Among the things left to be implemented: distributed GC, 3-vat  
introductions, correct far-ref identities, SturdyRefs. I plan to work  
on distributed GC next.

I do not yet have any byte-stream serialization or encryption layers,  
so it won't connect over networks yet.

Here is an example communication from my updoc tests. "rnlR" is the  
NonceLocator for the "left" side as seen from the "right".

   ? def leftObj {
   >   to ping() { println("pinged"); return "pong" }
   > }
   # value: <leftObj>

   ? def swissL :int := swissTableL.getNewSwiss(leftObj); null
   ? swissTableL.lookupSwiss(swissL) == leftObj
   # value: true

   ? interp.waitAtTop(def leftViaRight := rnlR <- lookupSwiss(swissL,  
null))
   # stdout: Left <- Deliver(-1, NewFarDesc(1,  
1033912670282953026478972818820010722176128073325), 0, "lookupSwiss",  
[10000001, null])
   #         Left <- DeliverOnly(-1, "__whenMoreResolved", [NewFarDesc 
(2, 47255196895205160731987244561159478631887357377)])
   #         Right <- DeliverOnly(1, "run", [NewFarDesc(1,  
382064925828890872342377433413917253333972024416)])
   #         Right <- DeliverOnly(2, "run", [ImportDesc(1)])
   #

   ? leftViaRight
   # value: <Far ref>

   ? interp.waitAtTop(def r := leftViaRight <- ping())
   # stdout: Left <- Deliver(-2, NewFarDesc(3,  
412897248500657771667886264468852369692723684603), 1, "ping", [])
   #         pinged
   #         Left <- DeliverOnly(-2, "__whenMoreResolved", [NewFarDesc 
(4, 82190111274176756684133692948252028599388244870)])
   #         Right <- DeliverOnly(3, "run", ["pong"])
   #         Right <- DeliverOnly(4, "run", ["pong"])
   #

   ? r
   # value: "pong"

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list