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

[510 byte] By [DesarrolloScreenNamea] at [2007-10-2 9:54:02]
# 1
You mean something like a priority queue? http://en.wikipedia.org/wiki/Priority_queue http://www.nist.gov/dads/HTML/priorityque.html
prometheuzza at 2007-7-16 23:58:53 > top of Java-index,Other Topics,Algorithms...
# 2
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.
dubwaia at 2007-7-16 23:58:53 > top of Java-index,Other Topics,Algorithms...
# 3

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

myraid77a at 2007-7-16 23:58:53 > top of Java-index,Other Topics,Algorithms...