liveBook · Manning

Bubble context

As explained in Architecture Modernization: Socio-technical alignment of software, strategy, and structure

A bubble context is a bounded context that initially shares a database schema with surrounding legacy models while its code is refactored independently.

A bubble context supports incremental modernization: a bounded context gets independently refactored code while initially sharing the database schema with legacy models. This prioritizes lower-risk code improvement before database decoupling. section 12.5

A practical evolution follows these moves:

  • Create the new bounded context and validate it with a focused business capability. section 12.5
  • Keep legacy functionality operational while refactoring code into new bounded contexts. section 12.5
  • Use an anticorruption layer to translate domain events into updates for the old model. section 12.5
  • Move toward an autonomous bubble with its own persistence schema when shared data becomes the remaining coupling. section 12.5

Gigs platform modernization

A new job-drafting and job-fulfillment context raised a Job Published event. The anticorruption layer intercepted it and translated it into a legacy job, allowing gradual migration and A/B testing while the old model remained operational. section 12.5

Figure 12.28 How the bubble context was implemented

Use the implementation figure to inspect how the new context and legacy models coexist around the shared schema. section 12.5

How Architecture Modernization: Socio-technical alignment of software, strategy, and structure covers it

How deep it goes
Explains shared-schema operation, autonomous persistence, domain events, and translation, without prescribing implementation mechanics.
Examples
Demonstrates German-market onboarding and Job Published event translation in a gigs platform modernization.
What it assumes
Assumes legacy models and bounded contexts, while treating database decoupling as a later migration step.
What you can do after
Apply it by refactoring bounded-context code independently, preserving legacy operation, and progressively separating persistence.
How it connects
Connects bounded contexts, legacy models, database decoupling, domain events, anticorruption layers, and A/B testing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecture Modernization: Socio-technical alignment of software, strategy, and structure. The section links point to the parts of the book it draws on.