A look into MySQL Transaction Handling
* note for presenter: show fancy REST API communication
** hopefully you prepared something by now...
*** you may then proceed to the next slide.
curl -vX PATCH \
--data '{"processed":1}' \
'http://erp.arrmaniac.de/messages/2?processed=0&ship_state=2' \
| json_pp
ERP does so much more:
All this talking:
Let's see our request again:
* note for presenter: show issue in fancy application
** Really? We talked about this!
*** You may proceed to the next slide.
curl -vX PATCH \
--data '{"processed":1}' \
'http://erp.arrmaniac.de/messages/2?processed=0&ship_state=2' \
| json_pp
What happens now?
Example
Example
BEGIN;
SELECT *
FROM `messages`
WHERE `processed` = 1
FOR UPDATE;
-- ...
-- ...
-- Waiting for COMMIT;
-- But it is not comming...
Current case
What did we learn, narf?