I am working on a booking system right now. On one of the pages I have a list of checkboxes that represents one item that you can book. So everytime you click on that checkbox an ajax request is sent to the server which would return the updated cost. My boss said that this is an absolute requirement to update the cost each time the user clicks on a checkbox.
I am thinking that everytime a user clicks, an ajax request would come in, wouldnt it degrade the performance of my webpage if a user keeps on clicking. Is there any way to address this issue? Some kind of mechanism that would hold the ajax request till the user stops clicking and then I could send the request.
Also, AJAX is asynchronous (that's what the first A stands for) so there shouldn't be any problem with two submitted requests overlapping. Unless you did something careless and made your servlet not be thread-safe, that is. And: is the response time for calculating the updated code annoyingly slow? If that's the case you might find the users clicking the same checkbox twice because they aren't seeing the result in a timely fashion. But basically, as I said, that shouldn't be a problem.