This results in cool things like promise pipelining. It is very interesting how it can simplify interface design, and there are examples on the RPC page[0].
This seems to go completely unmentioned on the home page, other than the word “capability system” in the very first sentence.
What does capability based security mean for a data interchange format? The notion hardly makes any sense to me.
From the homepage: “Think JSON, except binary.”
What would JSON look like with capability-based security?
> You can work with results without actually having the results, e.g. before the results exist
This sounds exactly like promises, or perhaps a functional effect system. What does this have to do with data serialization?
When a reference is constructed, only the creator has the capability of invoking the interface. If the reference is then passed to another server, they and only they have the capability of invoking the interface.
That's what they mean by capability.
> This sounds exactly like promises
Yes, the API is Promise-based. Both Cap'n Proto and JavaScript Promises are inspired by the E programming language, which is a strict object-capability language.