A sphere of knowledge, influence, or activity. The subject area to which the user applies a program is the domain of the software.
A system of abstractions that describes selected aspects of a domain and can be used to solve problems related to that domain;
The setting in which a word or statement appears that determines its meaning.
A cluster of associated objects that are treated as a unit for the purpose of data changes. External references are restricted to one member of the Aggregate, designated as the root. A set of consistency rules applies within the Aggregate's boundaries.
BankAccount
), to another account on bank B (instance B of aggregate BankAccount
)? Does bank A acquire a lock in bank B's database? If the transfer is in progress, is it strange that bank A has deducted the amount, but bank B has not deposited it yet? Not really, it's "underway". On the other hand, if something goes wrong while depositing the money on bank B's account, bank A's customer would want his money back. So we do expect some form of consistency, eventually. Another example could be GiftCardPaymentSaga
which would start once the order is placed (OrderPlacedEvent
). It will make sure that once the gift card is successfully redeemed (CardRedeemedEvent
), an order is confirmed (ConfirmGiftCardPaymentCommand
) on the other side.GiftCard
, will reject the Order
payment.