Supersedes 0032: REST
api() with the Encore
client is no longer the transport rule. Services talk through transport drivers.Amended by 0260: in-process
or RPC is chosen by topology inside the driver; the consumer’s code is the same.
Context
0032 chose RESTapi() plus the Encore client for service calls. The owner’s audit
answer Q2 (mem L545, 2026-10-20) moves integration events and typed calls behind drivers, so the same service code runs in SaaS and on-prem.
Decision
- Integration events and typed calls go through drivers. In SaaS: Encore Pub/Sub and RPC. On-prem: a Postgres queue and HTTP.
- Kafka, NATS or Redpanda may come later as an event-bus driver. This ADR does not adopt them.
- There is no hand-written gRPC.
- Clients are generated (ADR 0158, wave 1 part 3), and ids follow 0135.
Consequences
- A service calls another service through a generated client and an event, never through another service’s source.
- On-prem needs no broker. The Postgres queue carries events there.
Enforcement
planned — the boundaries rule bans direct imports of another service’s source, and gen emits the clients only through the drivers.Alternatives
- REST plus the Encore client only (0032): superseded, because on-prem has no Encore runtime.
- Kafka as the default: not chosen; it is a later driver.
Supersedes and sources
Supersedes: 0032. Sources: owner audit answer Q2 (stackra-decisions-2026-10-19.md
L545, 2026-10-20).