March 2015
Intermediate to advanced
284 pages
6h 13m
English
CHAPTER 13
![]()
Transactions and Concurrency
Let’s say that a buyer logs in to the bookshop application and purchases a book. The following actions should take place in the event of a purchase:
If the charge on the credit card fails, the stock shouldn’t be reduced. Also, when the book is out of stock, the buyer shouldn’t be charged. So both actions should be successfully completed or else they should have no effect. These actions collectively are called transactions or units of work. In essence, transactions provide an all-or-nothing proposition.
The concept of transactions is inherited ...
Read now
Unlock full access