We've added JavaScript-native RPC to Cloudflare Workers
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.
Company
Cloudflare
Date published
April 5, 2024
Author(s)
Kenton Varda
Word count
3348
Language
English
Hacker News points
None found.