原书出处
Domain-Driven Design Tackling Complexity in the Heart of Software
44 原书第06章|Aggregates
g will get cumbersome. Even assuming many small POs, there are other ways to violate the assertion.
Consider that "part." If someone changed the price of a trombone while Amanda was adding to her order, wouldn't that violate the invariant too? Let's try locking the part in addition to the entire PO. Here's what happens when George, Amanda, and Sam are working on different POs: Figure 6.9. Over-cautious locking is interfering with people's work. The inconvenience is mounting, because there is a lot of contention for the instruments (the "parts"). And then: Figure 6.10. Deadlock Those three will be waiting a while. At this point we can begin to improve the model by incorporating the following knowledge of the business: Parts are used in many POs (high contention).
There are fewer changes to parts than there are to POs. Changes to part prices do not necessarily p
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Domain-Driven Design Tackling Complexity in the Heart of Software/_epub-src/0321125215_ch06lev1sec1.html
EPUB SHA-256:3e81897e8809ae8135b32e0563f9858b3020c5f5128531655f6d8e3a21c679ce