7 comments

[ 2.6 ms ] story [ 19.1 ms ] thread
Ahh, the API is surprisingly similar to the rocketrpc RPC system I had created. It allows one to directly access any server-side object or method from the client. Looks like we coalesced on similar systems :)

https://rocketrpc.com/

This is super exciting! The bit about being able to chain methods and have it only make one request is wild!
Wow Cloudflare is releasing tons of cool stuff lately. I am super interested in capnp, this RPC model is super cool.

I was exploring using capnp to enable RPC on browser-to-server applications. I ended up using rust library for capnp and it actually worked! With the same bi-directional RPC.

I dropped it because it relied on managing rust and capnp as the end user. Not the best DX, at least at the moment.

I imagine they are doing something similar but with an extra layer of abstraction, such that any JS can just use the same interface already implemented in C++?

Structured clone with function support is amazing as well.

I've always thought there was market for user-made bindings on Cloudflare. I'm sure some amazing things are going to come from this. Personally I already have some ideas.

It's interesting how Cloudflare is offering a kind of "new way of making applications". Instead of starting from the "bottom" with renting virtual servers, they started from the "top" with I think lambda functions and are building on it.
> RPC methods do not return normal promises. Instead, they return special RPC promises. These objects are "custom thenables", which means you can use them in all the ways you'd use a regular Promise, like awaiting it or calling .then() on it.

Cloudflare is moving fast with workers lately, and it's cool, but my DX has been faulty, edge cases will fail. The last one: the custom domain for the worker is doing a 301 from https to http for no reason before failing on me.