news.volyx.in

Cap'n Web: a new RPC system for browsers and web servers (blog.cloudflare.com)

643 points by jgrahamc · 307 days ago · 298 comments on HN

Article summary

Cap'n Web is a new RPC system designed for browsers and web servers, allowing for bidirectional calling, passing functions and objects by reference, and promise pipelining. It is a spiritual sibling to Cap'n Proto, but with a simpler design and no schemas. Cap'n Web works over HTTP, WebSocket, and postMessage() and is open source under the MIT license. The system is designed to be easy to set up and use, with a small footprint of under 10kB.

Main themes

  • RPC systems
  • Cap'n Web
  • Cap'n Proto
  • Browser-web server communication
  • Promise pipelining
  • Object-capability protocol

What commenters say

  • The simplicity and power of Cap'n Web make it an attractive alternative to existing RPC systems like gRPC and GraphQL.
  • The lack of schema in Cap'n Web is a significant advantage, allowing for more flexibility and ease of use.
  • The ability to pipeline promises in Cap'n Web is a game-changer for reducing latency and improving performance in distributed systems.
  • Some commenters are concerned that Cap'n Web may not be suitable for all use cases, particularly those that require more complex schema management or stricter security controls.
  • Others argue that the simplicity of Cap'n Web is a double-edged sword, making it easier to use but also potentially more vulnerable to errors or security exploits.
  • There is interest in porting Cap'n Web to other languages, such as Rust or OCaml, to expand its reach and versatility.
  • Some commenters note that Cap'n Web's design is similar to other systems, such as OCapN, and that it may be possible to learn from or integrate with these existing systems.