Storefront has been decoupled into micro-frontends with a dedicated commerce app and shared shell.

Read the architecture guide →

ADR-BW-019: Adopt polyglot persistence matched to capability access patterns

Match PostgreSQL, Azure Cosmos DB, Redis, and Qdrant to each capability's consistency, partitioning, latency, and search requirements.

November 28, 2026Accepted
FieldValue
StatusAccepted
Date2026-11-28
OwnersArchitecture Enabling TeamTeamArchitecture Enabling TeamEnabling team facilitating BookWorm's architecture governance, ADRs, arc42 documentation, engineering standards, testing...Open docs
Affected ResourcesBookWormDomainv1.0.0BookWormCore e-commerce domain for the BookWorm online bookstore, coordinating catalog discovery, customer baskets, order fulfil...Ownerarchitecture-enabling-teamDiagramRepositoryOpen docs, Catalog APIServicev1.0.0Catalog APIInternal HTTP and gRPC service for Catalog product management, hybrid discovery, and authoritative book metadata. PublishesBookUpdatedRatingFailedIntegrationEventSubscribesCreatePublisher, UpdatePublisher +24APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, Catalog IngestionServicev1.0.0Catalog IngestionInternal background worker that reads pending Catalog book updates and synchronizes semantic search vectors in Qdrant. SubscribesProcessVectorBatchIntegrationEventOwnercatalog-experience-teamDiagramRepositoryOpen docs, Order APIServicev1.0.0Order APIAuthenticated Ordering service for Buyer profiles and the Order lifecycle, creating Orders from baskets, snapshotting pr...PublishesGetBasketGrpc, GetBookGrpc +5SubscribesCreateOrder, CompleteOrder +11APIsOpenAPI, AsyncAPI, Carrier Service LevelsOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs, Rating APIServicev1.0.0Rating APIInternal HTTP and A2A gRPC service for collecting, listing, deleting, and summarizing customer feedback for Catalog book...PublishesFeedbackCreatedIntegrationEvent, FeedbackDeletedIntegrationEventSubscribesCreateFeedback, DeleteFeedback +3APIsOpenAPI, AsyncAPIOwnercatalog-experience-teamDiagramRepositoryOpen docs, Basket APIServicev1.0.0Basket APIInternal HTTP and gRPC service for managing customer-scoped shopping baskets, Catalog price enrichment, and post-checkou...PublishesGetBookGrpc, GetBooksGrpc +2SubscribesCreateBasket, UpdateBasket +4APIsOpenAPI, AsyncAPIOwnercommerce-fulfillment-teamDiagramRepositoryOpen docs
Related ADRsADR-BW-006: Keep business state and persistence access capability-ownedDecision Recordv1.0.0ADR-BW-006: Keep business state and persistence access capability-ownedPreserve one accountable owner for each business model and integrate through contracts rather than shared mutable tables...Ownerarchitecture-enabling-teamOpen docs, ADR-BW-007: Distinguish authoritative state from derived viewsDecision Recordv1.0.0ADR-BW-007: Distinguish authoritative state from derived viewsTreat search and rating projections as derived information with explicit consistency limits rather than alternative sour...Ownerarchitecture-enabling-teamOpen docs

Context & Problem Statement

BookWorm’s capabilities have markedly different data access patterns: transactional catalog & event-sourced ordering, high-volume per-book feedback documents, ephemeral low-latency shopping carts, and semantic vector similarity search. Forcing every service onto a single database engine would either compromise latency/search quality or introduce awkward schema workarounds.

Decision Drivers

  • Capability autonomy: Each service owns its private store with zero cross-service database sharing.
  • Workload fit: Relational ACID + Marten event store for Ordering/Catalog, partitioned document storage for Reviews, sub-millisecond key-value storage for Shopping, and vector similarity search for Discovery.
  • Operational clarity: Keep the set of approved storage engines small and well-supported by Aspire hosting.

Decision & Consequences

Chosen Option: Standardize on four purpose-matched persistence engines: