← 返回卡片

原书出处

Software Architecture in Practice, 4th Edition

17 云与分布式计算

Fourth Edition · 核验版本的摘录快照 · 导入于 2026-11-14T09:09:28.535Z

The standard solution in this situation is to lock the data item, so that a service cannot access your account balance until it gets the lock. We avoid a race condition because service instance 1 is granted a lock on your bank account and can work in isolation to make its deposit until it yields the lock. Then service instance 2, which has been waiting for the lock to become available, can lock the bank account and make the second deposit.

此预览只包含定位所需的摘录和上下文。

原书定位详情

来源:a19c7933-4eda-4176-aebd-30fe7e1ad292

正文位置:extracted/Software Architecture in Practice, 4th Edition/_epub-src/ch17.html

EPUB SHA-256:7e9d0139f6c82a6fe31a29bb9182f06ae35b15739f8b255fefe1363a3dcc7139