Replies: 4 comments 4 replies
-
It is worth pointing out that invocation & delegation can coexist, issuer could invoke an action and delegate capability to do that and other things to the audience at the same time, which would address unknown final recipient case. Audience of the invocation may require additional capabilities to perform sub-task, in which case issuer would need to delegate those along with invocation. I kind of feel that should not be an argument against disambiguating invocations, but rather an argument to consider more clear interface for invocations that calls out what is been delegated. On the related note, does it always clear from just capabilities what audience is been asked to do (especially when set of capabilities are delegated) ? I suspect not, which is precisely why I find need for separate form for invocation. |
Beta Was this translation helpful? Give feedback.
-
@expede few questions regarding the spec
|
Beta Was this translation helpful? Give feedback.
-
As we start developing more things using ucanto (our UCAN RPC library) we've started recognizing few patters that I'd like to report and hopefully get some ideation around.
|
Beta Was this translation helpful? Give feedback.
-
I.e., treat UCANs as deltas that only add more specificity / attenuation, rather than a snapshot / version. |
Beta Was this translation helpful? Give feedback.
-
I found myself recently suggesting to disambiguate invocation from delegation by encoding former differently (omitting some fields that seem irrelevant in that context). Reflecting on it I, realize I've been motivated by the fact that there is something odd about defining RPC protocol in terms of UCANs, although perhaps it's just novelty that makes it fill that way ?
Here is the laundry list of what feels odd with RPC in UCANs
exp
seems redundant, if invocation has proof than it inherits it. If it is self issued and recipient just needs to run it I can't think of reason to put expiration on that (although perhaps that is because all operations are idempotent).nbf
seems to be the same asexp
.nnc
also seems odd to me, I think it would be much more cleaner to put a field in the specific "capability" been invoked to ensure uniqueness.fct
seem relevant in derivation context, but I'm not sure they do in invocation. If you need to supply some facts with your invocation it probably better be inside invoked capability ?att
Already covered that in 1. It feels like it should just be a single invocation of the capability instead.can
field as discriminant of invocations seems awkward (and turns out confuses team mates). Feels like different key (e.g.do
) fits better the invocation.store/add
been mapped into{ store: { add: { ... } }
without having to encode those incan
fields.On the other hand I am also recognizing that differentiating invocations from delegation would imply that audience of the invocation will be unable to derive from it, which in turn implies that invocations that pass through multiple actors should know final recipient. I'm not certain if that is a limitation or just forces more clarity in regards to when one should use delegation opposed to invocation.
One other observation is that we basically always have a leaf UCAN that reduces capabilities to minimum needed to perform an action, which probably would be unnecessary if separate structure for invocations existed.
Finally all this thinking was inspired by the fact that "revocation" has different structure which did not exactly fit into our RPC defined in terms of UCANs. This in turn go me thinking that perhaps "invocation" and "revocation" are far more alike than "delegation" so problem is not that "revocation" does not fit, but rather that "revocation" is specific "invocation" and we just don't have a good structure for invocation itself.
Thoughts ?
Beta Was this translation helpful? Give feedback.
All reactions