Shared resources
I don't know if this is the correct forum for my question.
My application has to assign an appointment with a doctor. But there are many users (patients) compeating for this resource. I thought of blocking this resource until I collect all the patient information, but I'm not quite sure that this is the best option.
Is there any paper or site where I can read something about allocating a resource and resolving conflicts in general? And in particular for a web application?
Thanks
Why don't you collect the patient information before allowing them to request an appointment?In terms of your question, is sounds like a pessimistic locking vs. optimistic locking question. If you google on those terms you should fins lots of info.
Let me try and phrase it in a different way.
1. You need to find the doctor.
2. You need to check the availability of the found doctor.
3. You need to get the patients.
4. You need to put the the patients in order.
in other words,
1. Get the patient
2. Put in Queue.
3. Enable exit at the end and in middle
4. Have the queue wait on the doctor.
5. Inform patients on doctor exit and entry.
Thanks and Regards