Context
The BSFG architecture must satisfy the following constraints:
- producer non-blocking writes
- partition tolerance
- bidirectional communication
- no distributed transactions
- deterministic recovery
These constraints require separating:
- durability
- read availability
- directional flow
Decision
The boundary is decomposed into four buffers:
Ingress direction:
- Ingress Store Buffer (ISB) - durable append log on the external perimeter
- Ingress Forward Buffer (IFB) - idempotent staging on the internal perimeter
Egress direction:
- Egress Store Buffer (ESB) - durable append log on the internal perimeter
- Egress Forward Buffer (EFB) - idempotent staging on the external perimeter
This factorization separates durability and availability across both directions.
Consequences
Benefits:
- Producers complete against local durability.
- Consumers read from local availability buffers.
- Boundary partition affects only replication.
Tradeoffs:
- Four logical components instead of a single gateway service.
- Replication loops required between Store and Forward buffers.