api-guidelines
api-guidelines copied to clipboard
[new rule] add a rule(set) to clearly specify how data change events should be used
(i) This issue has been manually transferred from a former internal repository, as a private repository issue cannot be transferred to a public repository.
Context
Data change events usually do not contain semantical information of why a change happened. This is why the usage of data change events should be limited. Deducting business decisions from data change events implicitly requires domain knowledge of a foreign domain, thus reducing encapsulation.
A rule (or a set of rules) should be created to clearly state how data change events should be used.
Possible rules:
- SHOULD use data change events for data replication
- SHOULD be used for updating otherwise read-only data sources. The only purpose of these read-only data sources is for consumption (e.g. by UIs, report generation, statistics).
- MUST NOT be used to implement policies (automation rules) that issue business side effects (commands) to any API.
- MUST NOT deduct intention from data change events