Cross-Actor Actions

Cross-Actor Actions

Demonstrates how actors can call actions on other actors for inter-actor communication and coordination.

Features

  • Inter-actor communication: Actors call actions on other actors using the server-side client
  • Transactional workflows: Implement checkout process with inventory reservations
  • Distributed state management: Each actor manages its own state while coordinating with others
  • Type-safe cross-actor calls: Full TypeScript type safety across actor boundaries

Implementation

This example demonstrates advanced inter-actor communication patterns:

  • Actor Definitions (src/backend/registry.ts): Defines multiple actors (cart, inventory) that communicate with each other to implement a checkout workflow

Resources

Read more about communicating between actors, actions, and state.