Quoting William ML Leslie (2020-09-01 19:39:04)
> Part of the challenge there is that while there are many
> implementations of CapTP, they often use different transports
> underneath. E, including E-on-CL, uses the pluribus protocol over TCP,
> which absolutely made sense at the time.� The javascript
> implementation of CapTP which iirc lives in Caja is a unibus system,
> but iiuc is binary compatible if you can get a matching transport
> serverside.� Similarly, when I started the python implementation, I
> wanted to speak CapTP over websockets so that I could build web
> applications;
Fwiw, capnproto can run over any reliable transport; just last week I
had use for speaking capnproto over a websocket and wrote the necessary
glue code in ~5 min or so. So far nobody's written an implementation
that supports third party handoff, but the C++ library is designed to
make that pluggable too (some of the others have this less carefully
factored out, but i probably wouldn't be major surgery to add it. And
once you have one implementation that supports this you can write
gateway proxies...)
> Either way, in E you can start making eventual sends to the promise
> right away.
You can do this in capnproto too, as the protocol supports projecting on
fields of not-yet-arrived results. But also the fact that method
results are supposed to be structs is itself an arbitrary restriction,
and it would be trivial to relax it in a backwards-compatible way (to
the point where an implementation taking a postel's law approach might
already support this, by accident).
> Also, when Agoric were starting out, I don't think there was a pure
> javascript Cap'nProto implementation (is there now?).
There's one that's serialization only, but RPC hasn't been implemented.
I'm definitely interested in making this happen though, as it would be
great to have an implementation that runs in the browser, and also the
node implementation adds some complications to Sandstorm's build system
that I would like to be rid of.
-Ian