Cap'nProto RPC implementation questions

William ML Leslie <[email protected]> Thu, 5 Nov 2015 14:37:15 +1100
Newsgroups gmane.comp.capabilities.general
Message-ID <CAHgd1hEGTecJaRkweMufnh=pBCWwrHM1KRkAgL_aJNjAt0_KcA@mail.gmail.com>
Hi Everyone,

I'm not sure if this is quite on-topic, but I'm trying to implement
rpc in capnpy, a pure-python Cap'nProto implementation.

Cap'nProto's concept of promises is interesting:  They usually have a
type, representing the type that the value may resolve to.  These may
be structs in the case of an unanswered question, or they may be
interfaces that are fields of a struct that has not returned yet.  I
can't tell from the documentation if there's any consensus on promises
to primitives or lists within application code, although you can't
pass promises to either of these over the wire as far as I can tell.
Actually, maybe you can pass promises to lists now that I think of it.

From a robustness perspective, I think I want waiting on a struct to
ensure that all of its sub-structs are resolved too; that is, that
you're never going to index expecting to get a struct and not getting
one.  Is that a bad idea?  Should I provide both a partial-wait and a
full-wait?

I'm really looking for any suggestions I can get on this one, or maybe
even just some sympathy.

-- 
William Leslie

Notice:
Likely much of this email is, by the nature of copyright, covered
under copyright law.  You absolutely MAY reproduce any part of it in
accordance with the copyright law of the nation you are reading this
in.  Any attempt to DENY YOU THOSE RIGHTS would be illegal without
prior contractual agreement.