4 ms·
This only works as long as you can pass transaction objects around across module boundaries. Because otherwise, how do you guarantee atomicity across module bo
by amelius 10y ago
This only works as long as you can pass transaction objects around across module boundaries.
Because otherwise, how do you guarantee atomicity across module boundaries?
- contingencies 10y agohow do you guarantee atomicity across module boundaries? The more fundamental answer is: It depends upon questions such as whether the system seeks to exhibit parallel processing properties or not, and the application-specific data generation/processing/storage/retrieval/consistency goals. The short answer is: Ideally you don't, because architecturally you are likely creating a monster. The longer answer is that in the case that it is justified (and such cases do exist) you would generally either use a reference to a transaction (potentially knowing that it may be out of date and having a planned strategy for eventual consistency carefully limiting the effect of such to a non-critical scope), or eat the latency overheads and use an established algorithm - see https://en.wikipedia.org/wiki/Atomic_operation https://en.wikipedia.org/wiki/Atomic_operation https://en.wikipedia.org/wiki/Consensus_(computer_science) https://en.wikipedia.org/wiki/Consensus_(computer_science) and https://en.wikipedia.org/wiki/Consistency_model https://en.wikipedia.org/wiki/Consistency_model - which for most of us simply means 'choose your database/network replication layer carefully'.