top | item 45335805

(no title)

jimmyl02 | 5 months ago

This seems like a similar and more feature complete / polished version of JSON RPC?

The part that's most exciting to me is actually the bidirectional calling. Having set this up before via JSON RPC / custom protocol the experience was super "messy" and I'm looking forward to a framework making it all better.

Can't wait to try it out!

discuss

order

kentonv|5 months ago

Yeah, JSON RPC doesn't support the pass-by-reference and lifecycle management stuff. You just have a static list of top-level functions you can call. This makes a pretty big difference in what kinds of APIs you can express.

OTOH, JSON RPC is extremely simple. Cap'n Web is a relatively complicated and subtle underlying protocol.

crabmusket|5 months ago

> You just have a static list of top-level functions you can call.

Actually the author of JSON RPC suggested that method names could be dynamic, there's nothing in the spec preventing that.

https://groups.google.com/g/json-rpc/c/vOFAhPs_Caw/m/QYdeSp0...

So you could definitely build a cursed object/reference system by packing stuff into method names if you wanted. I doubt any implementations would allow this.

But yes, JSON RPC is very minimal and doesn't really offer much.