Kenton Varda
@kentonvarda.com
1.8K followers 130 following 180 posts
Tech lead for workers.cloudflare.com Also made: capnproto.org, lanparty.house, sandstorm.io @KentonVarda on Twitter.
Posts Media Videos Starter Packs
Pinned
kentonvarda.com
I don't have a problem with making new RPC systems! I can stop any time I want! But I don't want to. So I made a new one for you. It's called Cap'n Web. It's like Cap'n Proto RPC, except focused on working great in browsers and JavaScript/TypeScript servers. blog.cloudflare.com/capnweb-java...
An image of a circular fabric patch showing some sort of superhero in a nautical hat? Cap'n Web: Protect & Connect, it says. Looks like AI slop.
kentonvarda.com
Where, to be clear, "they" is Theo and his team, not me or Cloudflare. But indeed, "vanilla" was much faster than any framework.
kentonvarda.com
Something like that. Not sure if it scales linearly.
kentonvarda.com
The vanilla case actually generates 3x more HTML compared to next.js because it was too fast to measure reliably otherwise.

The SvelteKit case is supposed to do the same work as the next.js case though.

The react case produces less HTML than the others, dunno why.
kentonvarda.com
Correction: I'm told that the SvelteKit benchmark does actually perform the same work as next.js. The "vanilla" benchmark, though, generates like 3x the HTML.
kentonvarda.com
The benchmark cases are not comparable to each other, they all do different stuff.
kentonvarda.com
The benchmarks render 5MB to 15MB of HTML. They are not normal workloads.
kentonvarda.com
Those benchmarks from @t3.gg revealed some interesting issues in Workers. Happy to say it's all fixed now, save for some lingering next.js-specific stuff we're continuing to work on. Thanks for the reproducible test cases, @t3.gg.

Excessive details in blog post: blog.cloudflare.com/unpacking-cl...
kentonvarda.com
Personally, I don't use the "for you" tab, I only use "following", and I basically don't see any politics at all. (I tend to unfollow anyone who posts politics TBH.)

I was actually doing that even before the acquisition, so didn't see much change after.
kentonvarda.com
Exactly as I remember it, in excruciating detail. Why does my brain continue to store this while forgetting people's names?
kentonvarda.com
Wait... I think someone made, like, a flash animated version of this?

I can still hear it in my head, including the heart beating at the end.
kentonvarda.com
Wow I remember this one. Despite not thinking about it once for 25 years. Why is this occupying space in my brain?
kentonvarda.com
Is it not Durable Objects?
kentonvarda.com
I don't personally know much about atproto or next.js, but this all sounds easily doable in Workers. @dom96.picheta.me built @listifications.app on top of Workers, FWIW.
kentonvarda.com
That's the next step I think. MCP is convenient because it's designed for the whole end-to-end experience of connecting an agent to an arbitrary MCP server including auth, etc. But once we fully solve those for e.g. OpenAPI, we should be able to go direct.
kentonvarda.com
No, the example should work correctly if you follow the instructions in the readme. It works for me. But only in local dev. To deploy it to prod you would need to be in the closed beta for worker loaders.
kentonvarda.com
Yes exactly. It's cheaper sandboxes. Also, the capability-based model is well known to be a great fit for sandboxing -- much cleaner than trying to filter and block arbitrary network requests.
kentonvarda.com
Anyway, please don't murder me for the quip that kinda sorta compares LLMs to Shakespeare.

/me runs away
kentonvarda.com
Dynamic Worker loading, of course, has applications far beyond just MCP or AI. It's a general-purpose capability-based sandboxing mechanism. If I had more time I'd build Sandstorm.io 2.0 on this...
kentonvarda.com
This is all based on a new Workers Runtime feature called Dynamic Worker Loading, which lets you dynamically load arbitrary code into a fresh isolate. Isolates are wayyyyyy cheaper and faster to load than containers. Perfect for executing one-offs. developers.cloudflare.com/workers/runt...
Dynamic Worker Loaders
The Dynamic Worker Loader API, which allows dynamically spawning isolates that run arbitrary code.
developers.cloudflare.com
kentonvarda.com
This works better than direct tool calls becaues LLMs actually have WAY more training data for writing code than for calling tools. After all, tool-calling is a sort of artificial thing just for LLMs. Code is everywhere.
kentonvarda.com
Hey Bluesky, I know how people here just LOVE everything AI, so I wanted to show you what @threepointone.bsky.social and I have been up to. We made an agent that calls MCP not as "tools", but by converting the tools into a TypeScript API, and writing code against that. blog.cloudflare.com/code-mode/
Code Mode: the better way to use MCP
It turns out we've all been using MCP wrong. Most agents today use MCP by exposing the
blog.cloudflare.com
kentonvarda.com
Oh! The stub is being disposed because you are returning it which transfers ownership to the caller. Try `return customerSession.dup()` instead. See the docs in the readme about automatic disposal.
kentonvarda.com
Sorry, I meant, "not one per RPC".