I think it'd be nice to have session created explicitly inside a "WITH" 
statement block so that users create sessions only when they want.  But I 
don't know if it's feasible because I suspect sessions are created 
automatically and passed into the exec environment, and it appears sessions 
are used to keep track of a few things in web2py.

In other words, the web2py's way is sessions are created by default and 
optionally "forget".  But it *might* be better if sessions are not created 
by default and users are given an easy method to create sessions.


On Saturday, September 1, 2012 11:33:17 PM UTC-5, Anthony wrote:
>
> Second, session handling.  Sessions are locked at the beginning of a 
>> request and is released only when the request is finished.  You can 
>> "session forget"; but when your app is complex, this is not feasibly or 
>> natural.
>>
>
> True, but if there's a lot of complexity associated with when sessions 
> need to be enabled or disabled, doesn't the complexity remain even if you 
> use an alternative framework that doesn't handle sessions out of the box?
>  
>
>> Further, if you have a sudden peak, session files will quickly accumulate 
>> and slow things down.  I think web2py does not yet have an effective and 
>> efficient way to delete session files.
>>
>
> How about a background task? What are some good alternatives? Note, I'm 
> not sure if it has been implemented yet, but I think there's a plan for a 
> cookie based session alternative (which has its pros and cons as well).
>
> Anthony
>

-- 



Reply via email to