关于事务一致性和最终一致性的鉴别:
When examining the use case (or story), ask whether it’s the job of the
user executing the use case to make the data consistent.
If it is, try
to make it transactionally consistent, but only by adhering to the other
rules of Aggregates.
If it is another user’s job, or the job of the
system, allow it to be eventually consistent.
That bit of wisdom not
only provides a convenient tie breaker, but it helps us gain a deeper
understanding of our domain.
It exposes the real system invariants: the
ones that must be kept transactionally consistent.
That understanding is
much more valuable than defaulting to a technical leaning.
阅读(3591) | 评论(0) | 转发(0) |