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 in a single worker; or, perhaps, you want to partition state that can fit in a single worker, but cannot be read and written fast enough due to contention.

Both of these are examples require the development of a distributed system, where some combination of state and computation is distributed to improve performance, reduce latency, or improve scalability.

To build a system that distributes state or compute, it is necessary to coordinate work, which requires RPC of some kind.

Recognizing the critical nature of internal 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 reliable, exactly-once invocation semantics.