Problem: Industrial plants integrating modern IT/OT systems face critical resilience gaps. When enterprise systems (ERP, cloud, corporate networks) become unreachable due to network partitions, GC pauses, or infrastructure failures, plant operations typically face blocking producers, data loss, or forced shutdowns.
Solution: BSFG is a hexagonal boundary primitive with four boundary store/forward roles (ISB/IFB, ESB/EFB) and optional first-class zone-local intra-zone buffers. These roles and local continuity constructs may share the same zone-owned substrate, while preserving distinct semantics. This decouples connectivity from communication and enables autonomous operation: when the boundary seals, each zone continues via local durable and intra-zone buffering; when reconnected, boundary handoff resumes with eventual consistency and no duplication at the boundary.
Guarantee: Producer non-blocking writes, effectively-once delivery at the boundary, and transactional autonomy per zone — with zero shared state or distributed transactions.
Delivery ladder: At-least-once transport → idempotent materialization at the boundary via putIfAbsent → application-owned idempotent consumption downstream.
Motivation
BSFG exists to solve a narrow but critical problem: preserving operational autonomy at an IT/OT boundary when connectivity becomes unreliable. The goal is not to provide a general integration platform, but to make sure each zone can continue operating safely, durably, and independently when the other side is slow, partitioned, or unavailable.
That focus drives both the architecture and the documentation structure on this site. The architecture material defines the invariant boundary behavior BSFG must preserve. The reference implementation material records how the current realization satisfies those constraints in practice, including integration choices, deployment patterns, and accepted design tradeoffs.
Documentation Path
Start with Concepts to understand the architecture, then move to Integration for implementation details, and Deployment for operational guidance. Use the ADR Index to review the concrete design choices and tradeoffs made for the current reference implementation target.
Interactive Model
Explore the four-buffer topology and handoff protocol in an interactive 3D scene. Click to produce or consume data from the ingress and egress lanes. Watch buffer fill states update in real time and observe how the gate controls flow between zones.
→ Open 3D Interactive ModelStandards & Normative References
BSFG aligns with the following industrial standards and patterns:
Documentation
Architecture
Normative and conceptual material that defines what BSFG is, what guarantees it makes, and what architectural boundaries it preserves.
Executive Brief
1-PAGERThe concise summary of the BSFG architecture and its role in industrial resilience. Covers the IT/OT integration challenge, the four-buffer topology mechanism, core guarantees, and standards alignment.
Key Topics:
- The resilience gap problem in IT/OT integration
- Four-buffer decomposition: ISB, IFB, ESB, EFB
- Producer non-blocking, effectively-once boundary, fast swappability, no shared state
- Standards compliance: ISA-95, IEC 62264, OPC UA PubSub, Enterprise Integration Patterns
Technical Overview
2-PAGERIntermediate-level technical documentation for architects and engineers. Covers the autonomy model (Normal vs. Autonomous modes), the four-step handoff protocol, hexagonal architecture with TypeScript interface contracts, backend matrix options, and proof-by-exclusion via EIP analysis.
Key Topics:
- Autonomy requirement and mode transitions
- Objectives vs. non-objectives table
- Cursor management (also called the contiguous frontier)
- Interface contracts: StoreBuffer, ForwardBuffer
- Backend matrix: Kafka, PostgreSQL, S3, Redis, etcd
- Backpressure and safety analysis
Technical Specification (Normative)
5-PAGERFull normative specification for implementers and standards compliance. Covers foundational constraints (objectives O1–O4, non-objectives N1–N7), minimal factorization concept, formal TypeScript interface contracts, operational modes (Normal/Autonomous/Reconciliation), failure mode analysis, threat model, and safety certification context (IEC 61508).
Key Topics:
- Formal objectives and non-objectives
- Minimal factorization principle
- Typed interfaces for pluggable backends
- Data integrity and idempotency without active reconciliation
- Failure mode analysis and threat model tables
- Verification matrix and safety certification roadmap
Architecture Map
OVERVIEWA one-page structural map of BSFG that reconciles principle, runtime, and substrate layers. Clarifies how the first-class boundary roles (ISB, IFB, ESB, EFB) are implemented by BSFG nodes and zone-local substrates.
Key Topics:
- Three-layer ontology: principle/topology, logical system, substrate
- Four-buffer topology as stable architectural primitive
- BSFG node role implementation via JetStream, object storage, and Connect RPC
- Message model: envelope + fact
- Deployment patterns and invariants
Hexagonal Architecture & BSFG
BACKGROUNDBrief explainer on Alistair Cockburn's hexagonal (ports and adapters) architecture pattern and how it applies to BSFG. Illustrates the separation between BSFG core logic (handoff protocol, cursor advancement) and pluggable storage backends.
Key Concepts:
- Port: Interface definition (what). Example: StoreBuffer, ForwardBuffer, CursorTracker
- Adapter: Concrete implementation (how). Example: Kafka adapter, PostgreSQL adapter, S3 adapter, Redis adapter
- Application Core: BSFG business logic, isolated from storage implementations
- Benefits: testability, deployment flexibility, fast backend swappability
Security Model
CONCEPTTrust boundaries, authentication, and data integrity mechanisms in BSFG deployments. Explains how BSFG maintains secure cross-zone communication using mutual TLS, zone isolation, idempotent append semantics, and immutable fact logs.
Key Topics:
- Core security principles: zone isolation, authenticated communication, tamper resistance
- Trust boundaries and zone independence
- Mutual TLS authentication with certificate-based zone identity
- Zone-based authorization and firewall policy
- Data integrity: idempotent append, canonical JSON, content-addressed artifacts
- Artifact security: zone-local storage, access control, immutability
- Threat model and mitigations (MITM, unauthorized access, tampering)
- Operational hardening: certificate rotation, audit logging, anomaly detection
Reference Implementation
Implementation-facing material that explains how the current BSFG realization is integrated, named, deployed, governed, and justified.
Naming & Conventions Guide
REFERENCECanonical naming grammar for all identifiers in BSFG systems. Defines naming standards for subjects, predicates, schemas, streams, artifacts, and zone identities to prevent semantic drift and ensure consistency across deployments.
Key Topics:
- Identifier principles: lower_snake_case, stability, domain-oriented naming
- Subject naming:
entity_type:identifierformat with hierarchical support - Predicate naming: past-tense verb phrases expressing state transitions
- Schema versioning:
predicate_v#and backwards compatibility - Stream organization:
facts.category[.prefix]with retention policies - Artifact paths: structured, hierarchical naming for binary files
- Zone identity:
zone-bsfgformat for BSFG nodes
Integration Contract
OPERATIONSNormative specification of what systems integrating with BSFG must implement. Defines the operational obligations for both actor roles that interact with the boundary API.
Key Topics:
- Producer responsibilities — stable
message_idgeneration, retry-safe append, artifact sequencing - Consumer responsibilities — idempotent processing, durable-first confirmation, replay tolerance
- Retry semantics — what to retry, how, and when it is safe
- Artifact lifecycle — upload-before-reference, immutability after fact-addressing
- Delivery semantics — at-least-once transport, idempotent append, replay-based recovery
Message Catalog Framework
REFERENCEA registry format for documenting the facts exchanged between systems in a BSFG deployment. Provides a standardized message catalog that serves as the semantic contract defining predicates, subject types, schemas, producers, and consumers.
Key Topics:
- Fact structure: subject, predicate, object_json
- Message catalog table format and columns
- Schema ownership and immutability rules
- Versioning policy and breaking change procedures
- Example catalog entries for manufacturing integration
SOW / Deployment Specification Template
PROJECT TEMPLATEA fillable template for creating Statements of Work (SOWs), implementation proposals, and formal deployment specifications. Provides structured sections for zone topology, BSFG node placement, network connectivity, identity configuration, storage layout, replication relationships, producer/consumer integration, monitoring setup, and acceptance criteria.
Key Topics:
- Zone topology definition and characteristics
- BSFG node placement and durability substrate
- Network connectivity and firewall rules
- mTLS identity and certificate management
- JetStream and artifact storage configuration
- Producer and consumer integration specifications
- Monitoring metrics and alert thresholds
- Acceptance criteria and sign-off procedures
Architecture Decision Records (ADRs)
DECISIONSAccepted architectural decisions, implementation tradeoffs, and design rationale for the current BSFG realization, including boundary behavior, replay, idempotency, recovery, message model, cross-zone synchronization, and governance rules.
- ADR-0001: Boundary Must Contain No Durable Middleware
- ADR-0002: Four-Buffer Topology Is the Minimal Partition-Tolerant Boundary
- ADR-0003: Idempotency Is Enforced at the Storage Interface
- ADR-0004: Contiguous Frontier Determines Safe Truncation
- ADR-0005: Three-Log Topology Emerges in Large Deployments
- ADR-0006: Boundary Communication Is Asynchronous Replay
- ADR-0007: Boundary Fact Transport Is Log-Centric
- ADR-0008: Semantic Unit Is Envelope Plus Fact
- ADR-0009: Each Zone Owns Its Local Log Domain
- ADR-0010: Boundary API Uses Connect RPC
- ADR-0011: Boundary Identity Uses Mutual TLS
- ADR-0012: Append Is Idempotent and Confirmation Means Durable Commit
- ADR-0013: Large Artifacts Are Stored Out-of-Band and Referenced by Facts
- ADR-0014: Facts Are Append-Only and Retention Is Time-Based
- ADR-0015: Stream Topology Is Small Fixed Sets with Subject-Prefix Partitioning
- ADR-0016: Subject Identity Uses Kind With Optional Scope
- ADR-0017: Object Payload Uses Canonical JSON with Optional Schema Reference
- ADR-0018: Operational Visibility Uses Metrics and Structured Logs
- ADR-0019: Fetch Uses Unary Paged Pull
- ADR-0020: Envelope Carries Boundary Metadata and Policy Labels
- ADR-0021: Predicate Vocabulary Uses Stable Relation Names
- ADR-0022: Boundary Contract Is Four Explicit RPC Operations
- ADR-0023: Fetch Progress Uses Durable Named Consumers
- ADR-0024: Artifact Upload and Fact Append Remain Separate Core Operations
- ADR-0025: Zone Names Are Deployment Configuration, Not Protocol Enums
- ADR-0026: Business Acceptance Is Modeled Downstream, Not In Boundary Confirmation
- ADR-0027: Authoritative Boundary Truth Is Fact History, Not Mutable State
- ADR-0028: Business Schema Validation Is Outside the Boundary Substrate
- ADR-0029: Cross-Zone Synchronization Uses BSFG Peer Protocol, Not Native Stream Mirroring
- ADR-0030: Durable Consumers Are Named Infrastructure, Not Ephemeral Session State
- ADR-0031: Clients Access Boundary Storage Only Through BSFG Service
- ADR-0032: Cross-Zone Transfer Is Pull-Driven by the Receiving Zone
- ADR-0033: Boundary Delivery Semantics Are At-Least-Once with Idempotent Append
- ADR-0034: NATS Accounts Are Zone-Scoped, Not Globally Shared
- ADR-0035: Message Lineage Uses Correlation and Causation in the Envelope
- ADR-0036: Canonical JSON Serialization for Object Payloads
- ADR-0037: Envelope Metadata Is System-Level; Fact Body Is Domain-Level
- ADR-0038: Ordering Is Local and Explicit, Not Global Across Zones
- ADR-0039: Referenced Artifacts Become Immutable Once Fact-Addressed
- ADR-0040: Envelope Timestamp Is Producer Event Time, Not Global Truth Time
- ADR-0041: Administrative Topology Changes Are Out-of-Band from the Boundary API
- ADR-0042: Four-Buffer Entities Are Boundary Roles Implemented by BSFG Nodes
- ADR-0043: Producer and Consumer Integration Contract