Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi frnds,

There is a concept for booking car, there are multiple users click on the same button at the same time in that situation same requestid created for both who are the users clicked on button at the same time.

How to handle multiple evnets with the single button click.


Thanks in advance
Posted
Comments
ZurdoDev 9-Oct-14 9:36am    
What? You mean 2 people have your site open on 2 different computers and they try to book the same car for the same time? Whoever is first gets it and then you have to display a message to the other user that the car has been reserved.
BillWoodruff 9-Oct-14 9:43am    
So, if each user is on a different machine, running an instance of your application, then each request to the database on some kind of server arrives at certain time which is never really going to be identical down the millisecond. Assuming your server can interact with each session: why can't the server tell those who didn't get there first that booking is not available by hiding the view of the booking, or sending a message to all machines that didn't get the booking to ... and so on ?
Suvabrata Roy 9-Oct-14 10:02am    
what you mean by request id?

1 solution

Sharepoint is not designed to work this way.

If you really need to create such an application try looking at queues on your server to serialize requests to make sure things get allocated properly.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900