
Data management lifecycle architecture
Without clear separation of responsibilities, a data platform quickly degrades into a broad, dynamic layer around a database, with little respect for data integrity. To be more deliberate, we split the platform along the data's lifecycle, so each stage is an isolated module with its own behaviour, and clear contracts with neighbouring stages.
Stages of the data management lifecycle
On a recent engagement, I architected a data platform based on the NSW Government's data management lifecycle.[1] Each stage is a module with distinct responsibilities, and its own access to the central database:
Each stage is relatively independent, hosting its own controllers, interfaces, and some internal data models:
- Capture accepts raw input from external systems, and parses it into validated objects.
- Store writes validated objects to the database, creating new or patching existing records.
- Use performs analysis or evaluation on newly updated records.
- Share makes records available to external systems, sync or async.
- Maintain runs data migrations, backfills and routine maintenance jobs.
- Retire deletes data once it passes its retention period, and redacts it on request.
Neighbouring modules can interact directly through typed contracts, and each has its own database access. For example, Capture doesn't write to the database, and Store doesn't receive data from external systems.
Worked example
To see how this works in practice, let's follow a customer data platform, stage by stage.
Work begins
Data platforms are all about the data, so let's start with a customer records database.
Our platform will provide a variety of customer data functionality, but for now we're going to focus on age-based eligibility: identifying which age-restricted features our customers can access, based on their age assurance result.
Capturing age assurance
We rely on a third-party provider to perform age assurance checks on customers, so we don't need to handle sensitive data ourselves. Once the provider makes its assessment, it sends the result to a Capture endpoint.
Capture treats it as raw input and parses it, which includes checking that it's well-formed.
Gathering additional details
The age assurance result includes a "customer token" identifier (see
Share tokens instead of IDs), and
Capture makes a read-only
call to the database to check whether we have a record for this customer yet.
In this case, we don't, so Capture asks the contacts service for the customer's email address in preparation for a new customer record.
Storing a new customer
After Capture has parsed the result, it passes the object to Store.
We're using the parse, don't validate[2] structural invariant
pattern. Store's interface requires a
ValidatedAgeAssuranceResult, so it can trust the object is
valid without re-running any checks.
Store then inserts or updates the customer's record in the database.
Using the newly stored record
After Store has saved the new result, it tells Use that the customer is ready for evaluation.
In this case, Use reads the customer's record from the database and publishes an event on the eligibility events stream, indicating whether the customer may access age-restricted features.
Sharing customer records
While Use focuses on the platform's own requirements, Share hosts connectivity for external systems to access customer records for their own requirements.
Share reads the records from the database and returns only what's stored. In this example, the reporting service prepares weekly reports on customers segmented by age threshold.
Maintenance activities
Maintain hosts sensitive operations for data migrations, backfills and routine maintenance jobs.
It can change records more broadly than Store, so it's reachable only through admin interfaces, and other stages rarely call it.
End of life
Customer data is sensitive, so Retire securely redacts or deletes it when required.
When a customer closes their account or asks us to remove their data, the privacy service sends a redaction request to Retire, which redacts their records and confirms the redaction back to the privacy service.
For compliance purposes, this stage must be working before the platform operates on real data.
Operating on feedback
When Retire redacts a customer record, we know that we shouldn't store any more information about that customer. Feedback to Capture ensures that we discard any future data we may receive for that customer.
What else can we do with this?
Keeping each stage as its own module is only the beginning. The customer data platform
also emits metrics and log events, so attaching
stage:${name} labels lets us track operations separately, or
audit a customer record across multiple stages.
Putting the stages together
Each stage is its own module, with its own responsibilities and database access. Neighbouring stages interact through typed contracts, so nothing past Capture handles unparsed data, and stage labels on metrics and logs show which stage did what.
The stage names also give the team a shared vocabulary, and the logical boundaries keep the platform maintainable as it grows.
Matching functionality with its stage
Quiz!
Over time, data platforms take on more and more functionality.
Where should we place
them?
References
- ⬆️ NSW Government, NSW Infrastructure Data Management Framework (PDF), section 7.1 "Data management life cycle"; archived web version. This article renames Archive / destroy to Retire, and the other stages take one word of each IDMF pair.
- ⬆️ Alexis King, "Parse, don't validate", 5 November 2019.
If you have feedback or questions about this article, let's catch up via LinkedIn or email.

All articles
About Sinclair Studios