On Sat, Aug 5, 2017 at 10:23 AM, siva subrahmanyam
<
subbu98...@gmail.com> wrote:
> Sorry for the confusion. Currently, I solved (just avoided concurrency)
> issue by adding a status column to slot model. So when a user trying to
> purchase that slot I update status column to hold so that other user don't
> able to book same slot at the same time.
Seems fine. Though didn't you need a field before to hold the
booked/not-booked status of the slot? which could be "pending"
as well?
> Now I want solve the same problem without adding DB column.
Why? If the "status" is an attribute of the model, why would you
*not* keep it in the DB?
It has to be persisted somewhere, and sure, you *could* use a
key-value store like Redis but what is the point? Seems like an
unnecessary complexity.