Well, the question is on the purchasing of Fly by Night tickets. Which of the 2 protocols is better. If you think they are both poor, please advice.
Protocol 1.
1-lock
2-check if tickets are available
3-unlock
4-ask client if he still wants tickets
5-lock
6-buy tickets if still possible
7-unlock
Protocol 2.
1-lock
2-buy tickets if possible
3-unlock
4-ask client if still ok
5-lock
6-rollback if client refuses
7-unlock
I dont like protocol 2 because of the possibility of session break after step 3
. I dont like in session 1 the enventuality that ticket may be sold out at step 5 but I think this protocol is better
.
Thanks
Charles.