-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Simultaneous Updates and AJAX web application
PostPosted: Sat Jul 12, 2008 6:50 am 
Senior
Senior

Joined: Sat Sep 03, 2005 12:54 am
Posts: 139
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.