MySQL – Queues – Hold record for user
This is the scenario I wish to avoid:
User 1 loads the page, and dials a number.
User 2 loads the page, gets the same record as user 1 and dials the same number.
In that scenario, I would like user 2 to get the next available record.
The solution I came up with is to have a "locked by" field for each record, and when a user accesses the record, it puts their user id in the "locked by" field. That way when another users loads the page, the next available record is loaded, and we don’t have multiple users doing the same work.
I should also mention that there are non-calling modules to this system that don’t require record locking. So I want to keep individual records "open" to users of other modules, even if the record is "locked" for the calling module.
I hope this makes sense. Is this the best solution to "hold" records for one user in a group, but leave the record open to users in another group?
View full post on Tycoon Talk
hold, mySQL, Queues, Record, user