Hi,
We have an ajax website that allows the user to tweak lots of settings to refine a set of search results. Each change in the UI (checkbox, slider, etc.) generates an async postback to the server to regenerate the search results. We also save the search criteria to the database each time.
However, if we fire off multiple quick successive changes in the UI, we can run into problems with conflicting updates in the DB because we are effectively updating the same search criteria in 2 separate threads.
What is the best strategy for handling this scenario:
Change UI to only allow one request at a time
Perform some kind of locking during each async postback (is that what session.Lock is used for?)
try / catch and retry
something else?
Thanks,
Jason