Not sure I understand the question.

There are two issues. One is about sessions. Distinct requests from the 
same user/session are serialized unless session._unlock(request) is called.
Requests belonging to different session are executed in different threads 
but to a max number of threads specified by the web server. They are only 
serielized if they use sqlite and perform write operations because sqlite 
blocks. Mind that multiple threads running on the same host may be executed 
under the same python process. In this case they will be concurrent but not 
parallel because of python GIL. This can be avoided by forking multiple 
processes.

On Tuesday, 5 February 2013 09:14:17 UTC-6, Paolo valleri wrote:
>
> I am wondering to understand if from the theoretical point of view is true 
> or not that parallel requests are not handled in parallel. In the meanwhile 
> I will try to monitor the gain that we can have by session.forget in all 
> the downloads().
>
>  Paolo
>
>
> 2013/2/5 Niphlod <[email protected] <javascript:>>
>
>>
>>
>> On Tuesday, February 5, 2013 2:49:24 PM UTC+1, Paolo valleri wrote:
>>>
>>> Great! I've just tested it and it seems to work very well, I am getting 
>>> the 304 that I was looking for. Now many resources are no longer sent to 
>>> the client saving bandwidth, I think many web2py applications will 
>>> appreciate this speed up.
>>>
>>> @Niphlod, the header you have mentioned will force to keep the same file 
>>> even if I update it, this is not the behaviour that I need in my app.
>>>
>>
>> Tune it s you like. From my POV an embedded media never changes. What 
>> changes is the media itself (i.e. if I want to change the image in a page, 
>> I upload a new image and change the pointers to it). 
>> If it's not your usecase, send cache headers at least one day in the 
>> future to avoid users scanning through your wiki to request media again and 
>> again.
>>  
>>
>>>
>>> One more think about the download function. 
>>> Do we support parallel requests? Namely, I have recently read that the 
>>> default web2py approach is to serializes parallel ajax requests due to the 
>>> session lock. If that is true for download as well, I think we should add 
>>> an session.forget somwhere.
>>> What do you think?
>>>
>>
>> Didn't test it, but you can of course..... measure it with 
>> session.forget() in the if zero.isdigit() and without.... 
>>  
>> -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to