Welcome to the new Golem Cloud Docs! đź‘‹
Documentation
Worker to Worker Communication

Introduction

Golem is a durable computing platform that makes it simple to build and deploy highly reliable distributed systems.

The WASM component model eliminates the need for microservice architectures, since components written in different languages can interact with each other in-process (through component composition), without having to go through remote protocols like HTTP, gRPC, or JSON RPC.

Despite this, however, there are times when remote procedure calls (RPC) are useful or necessary when developing applications on Golem:

  1. You want to parallelize computation that cannot be done on a single worker, either due to lack of memory or lack of compute.
  2. You want to partition state that is too large to store on a single worker; or, perhaps, you want to partition state that can fit on a single worker, but cannot be read and written fast enough due to heavy contention.

Both of these are examples of distributed systems, where some combination of state and computation is distributed for reasons of reducing latency.

To build a system that distributes storage or compute, it is necessary to coordinate work through communication—a job that requires RPC of some kind, even if it's just an HTTP API.

Recognizing the critical nature of communication for many distributed systems, Golem provides a feature called worker-to-worker communication. This feature allows you to simply, and in a type-safe way, communicate between workers, with strong guarantees, such as exactly-once communication semantics.