Data Containers¶
Executive Summary¶
Data Containers defines the logical data stores in the Algosure C4 Level 2 architecture: PostgreSQL, Redis, object and document storage, search index, vector store / semantic memory store, and future analytics warehouse.
Why This Exists¶
Algosure must distinguish transactional source facts, short-lived coordination state, file evidence, search projections, semantic memory, and future analytics. This protects DDD ownership, tenant isolation, auditability, AIOS memory governance, and event-driven data flow.
Owner¶
The owner is the Chief Product Officer and Enterprise Architect.
Business Value¶
Clear data container responsibilities prevent data sprawl, reduce source-of-truth ambiguity, and help teams design secure, auditable, tenant-aware data flows.
Data Container View¶
flowchart TB
Backend[Spring Boot Modulith Backend]
AIOS[AI Orchestration Service]
Integration[Integration Gateway]
Analytics[Future Analytics Consumers]
Postgres[(PostgreSQL)]
Redis[(Redis)]
ObjectStore[(Object / Document Storage)]
Search[(Search Index)]
Vector[(Vector Store / Semantic Memory Store)]
Warehouse[(Future Analytics Warehouse)]
Backend --> Postgres
Backend --> Redis
Backend --> ObjectStore
Backend --> Search
Backend --> Vector
Backend --> Warehouse
AIOS --> Vector
AIOS --> ObjectStore
Integration --> ObjectStore
Search --> Backend
Warehouse --> Analytics
Data Container Responsibilities¶
| Container | Logical Responsibility |
|---|---|
| PostgreSQL | Stores authoritative transactional records, tenant state, domain-owned facts, workflow state, audit references, configuration, and relational business data. |
| Redis | Supports short-lived cache, coordination, rate limiting, temporary state, and performance-oriented access patterns that do not replace durable source facts. |
| Object / document storage | Stores tender packs, compliance evidence, uploaded attachments, generated documents, signed files, exports, source documents, and binary evidence. |
| Search index | Provides searchable projections over domain records, documents, suppliers, opportunities, compliance evidence, contracts, and operational knowledge. |
| Vector store / semantic memory store | Stores embeddings, semantic references, memory projections, contextual retrieval records, and AIOS-approved memory artifacts. |
| Future analytics warehouse | Supports historical analytics, cross-domain reporting, trend analysis, executive insight, and downstream management information in a future architecture wave. |
Ownership Model¶
| Data Type | Owning Architecture Area | Container Support |
|---|---|---|
| Source domain facts | Owning Domain in the Spring Boot Modulith backend | PostgreSQL |
| Workflow state | Workflow and owning Domain modules | PostgreSQL, Redis where short-lived |
| Audit evidence references | Security, tenant isolation, audit, and owning Domain | PostgreSQL and object / document storage |
| Documents and files | Owning Domain or workflow | Object / document storage |
| Searchable projections | Owning Domain publishes or permits projection | Search index |
| Semantic memory | AIOS and relevant source Domains under governance | Vector store / semantic memory store |
| Analytical history | Future analytics architecture under source-domain lineage | Future analytics warehouse |
Data Boundary Rules¶
| Rule | Meaning |
|---|---|
| PostgreSQL is not a shared free-for-all | Tables and records must reflect domain ownership and tenant boundaries. |
| Redis is not authoritative | Redis must not become the source of durable business facts, approvals, compliance state, or payment state. |
| Object storage needs metadata ownership | Files require domain-owned metadata, tenant context, classification, retention, and evidence rules. |
| Search is a projection | Search index content must be rebuildable from owned sources and must not become the only source of truth. |
| Vector memory is governed | Semantic memory requires source attribution, tenant scope, approval where required, retention rules, and explainability support. |
| Analytics is downstream | The future analytics warehouse must consume governed events, extracts, or data products; it does not own operational decisions. |
| Tenant isolation is mandatory | Every data container must preserve tenant context, authorization, retention, and audit expectations. |
Event-Driven Data Flow¶
flowchart LR
Domain[Domain Event]
Projection[Projection Builder]
Search[(Search Index)]
Memory[Memory Governance]
Vector[(Vector Store / Semantic Memory Store)]
Analytics[Analytics Ingestion]
Warehouse[(Future Analytics Warehouse)]
Domain --> Projection
Projection --> Search
Domain --> Memory
Memory --> Vector
Domain --> Analytics
Analytics --> Warehouse
Non-Implementation Boundary¶
This document does not define:
- Database schema.
- Index mappings.
- Storage bucket structure.
- Cache key design.
- Embedding model.
- Retention configuration.
- Backup configuration.
- Analytics platform.
- Data pipeline tooling.