|
|
|
|
|
by kachayev
4880 days ago
|
|
To answer the question when STM is hard to use, you can imaging any case of simulation. Few years ago I worked with engine for real-time brokers trading simulations: thousands of independent players accept different information streams and make deals. Each deal is several steps of negotiations with two-phase commit. Plus different monitoring tools, timers, generators and randomizers.. Whole system was written in Erlang, and you know... two-phase commit is really hard to implement in right way without potential deadlocks and other problems. But it's looks good and "natural" (as to say) in Actors language. I used to try to do something like this with STM and I quickly gave up with mess of unreadable code. |
|