Re: Persistent Session Management with Durus

Salman Haq <[email protected]> Fri, 27 Aug 2010 17:37:59 -0400
Newsgroups gmane.comp.web.quixote.user
Message-ID <[email protected]>
Thanks David. See inline:

On 08/26/2010 06:53 PM,c Binger David wrote:
> The altdemo.py should include something like this retry logic,
> but making it work well with sessions and such can be tricky.
>    

Even just a comment that sometimes commit() can raise errors
and that application-specific re-try logic should be used could be
helpful.

> That is precisely why the QP package was written, and
> you might want to take a look at it.
>    

Will do.

> If the application is designed correctly, there should not be many retries.
> The conflicts occur when multiple durus clients are writing
> at close to the same time to the same persistent instances.
> The altdemo.py is not designed to avoid conflicts.
> Among other things, it writes to the session
> instance on every request.  If you have multiple clients handling
> rapid bursts of requests from the same client, this will tend to
> cause conflicts.
>    

In my application's case, the rapid bursts happened due to near 
simultaneous requests
from the browser for static files and also due to near simultaneous ajax 
requests.
As an optimization, I've configured Apache to handle the static media 
urls. However,
a fast succession of ajax requests can be problematic and the only way I 
can handle that is
by re-trying to commit.

Salman


>
> On Aug 26, 2010, at 2:42 PM, Salman Haq wrote:
>
>    
>> Thanks Gabor! That works.
>>
>> Neither the Durus README file nor the online FAQs mention anything about re-try logic.
>>
>> Salman
>>
>>      
>
>
>