Content Deep Dive
We've added JavaScript-native RPC to Cloudflare Workers
Blog post from Cloudflare
Post Details
Company
Date Published
Author
Kenton Varda
Word Count
3,348
Language
English
Hacker News Points
37
Source URL
Summary
Cloudflare Workers has introduced a built-in Remote Procedure Call (RPC) system that enables seamless communication between Worker-to-Worker and Worker-to-Durable Object without requiring any boilerplate code. This feature is designed to be expressive, making calling remote services feel like using a library. It supports passing structured clonable types as parameters or return values of an RPC, allowing functions and objects with methods to be passed as well. The performance is optimized for zero network latency when the other Worker runs in the same thread as the caller. This feature is secure based on the object-capability model and its protocol and implementation are open source.