context-propagation-spectrum
How much context you have in a system can greatly depend on the structure of your data.
context-propagation-spectrum#spectrum1
- No context
- What happens?
- In-place updates directly on the data
- Outcome
- When: No way to know. Things like updated_at are a bit of context-propagation, if they exist at the application code level, but direct updates to the database can make them problematic
- Cause - Technical: No way to know.
- Cause - Logical: No way to know.
- Ease of understanding: Hard - need to read code, reason about when the code ran, find any existing logs which are separate from the data
- Minimal context
- What happens?
- In-place updates directly on the data with application-level audits
- Outcome
- When: Can understand when the update happened (if it was done through the application, not if done directly in database)
- Cause - Technical: unknown unless propagated
- the technical cause of it, the actual reasoning for it, etc.
- Ease of understanding: TODO
... some more steps in here ...
- Maximal context
- What happens?
- The only system-of-record data that is persisted is systematically-enforced immutable facts
- Coincident with those facts, additional propagated context is persisted
- Potentially even from previous steps this step doesn't understand
- Easily-queryable meta-info, such as reified transactions
(#) (like what version of the code was running)
- Outcome
- When: Yes, you will know when the data was created, and it will never be accidentally changed after-the-fact
- Cause - Technical: Associated change in the same transaction is captured, because the transaction is captured and has meta-information associated with it
- Cause - Logical: The motivation for the change is captured, and you can join on the upstream changes to determine their motivation as well.
- Ease of understanding: Easy. All the context is available, and effort has been put towards making it readily queryable
context-propagation-spectrum#spectrum1
Referring Pages
context-propagation