atom feed48 messages in com.googlegroups.web2pyRe: Fwd: My thoughts on web2py
FromSent OnAttachments
Massimo Di PierroAug 2, 2009 11:21 am 
PynthonAug 2, 2009 11:41 am 
FranAug 2, 2009 12:05 pm 
mdipierroAug 2, 2009 12:21 pm 
Armin RonacherAug 2, 2009 1:17 pm 
mdipierroAug 2, 2009 1:37 pm 
BottigerAug 2, 2009 5:46 pm 
Armin RonacherAug 3, 2009 1:21 am 
PynthonAug 3, 2009 6:18 am 
PynthonAug 3, 2009 6:50 am 
suiatoAug 3, 2009 7:04 am 
Pynthon PynthonAug 3, 2009 7:09 am 
Álvaro Justen [Turicas]Aug 3, 2009 8:13 am 
PynthonAug 3, 2009 8:17 am 
Yarko TymciurakAug 3, 2009 9:59 am 
PynthonAug 3, 2009 10:57 am 
waTRAug 3, 2009 1:13 pm 
PynthonAug 3, 2009 1:38 pm 
JohnMcAug 3, 2009 3:33 pm 
mdipierroAug 3, 2009 9:55 pm 
mdipierroAug 4, 2009 12:04 am 
PynthonAug 4, 2009 3:31 am 
mdipierroAug 4, 2009 5:42 am 
PynthonAug 4, 2009 5:48 am 
IcebergAug 4, 2009 11:14 am 
PynthonAug 4, 2009 11:30 am 
FranAug 4, 2009 12:00 pm 
waTRAug 4, 2009 2:08 pm 
Kuba KucharskiAug 4, 2009 2:10 pm 
mdipierroAug 4, 2009 2:13 pm 
JohnMcAug 4, 2009 2:53 pm 
RichardAug 4, 2009 5:24 pm 
mdipierroAug 5, 2009 12:01 am 
AchipAAug 5, 2009 3:15 am 
PynthonAug 5, 2009 6:09 am 
mdipierroAug 5, 2009 6:52 am 
PynthonAug 5, 2009 7:00 am 
BottigerAug 5, 2009 9:55 pm 
mdipierroAug 5, 2009 10:05 pm 
mdipierroAug 5, 2009 10:08 pm 
RichardAug 5, 2009 11:56 pm 
FranAug 6, 2009 12:26 am 
TimboAug 6, 2009 7:29 am 
waTRAug 6, 2009 10:06 am 
Yarko TymciurakAug 6, 2009 11:10 am 
mdipierroAug 6, 2009 2:11 pm 
FranAug 7, 2009 9:05 am 
FranAug 7, 2009 9:10 am 
Subject:Re: Fwd: My thoughts on web2py
From:Armin Ronacher ("arm@active-4.com)
Date:Aug 3, 2009 1:21:42 am
List:com.googlegroups.web2py

Hi,

True. but I would not call it a race condition. We timestamp everything with the time when a request arrives, not when it is processed, unless specified otherwise (datetime.now() instead of request.now)

True. But that does not make it a better idea. Also, datetime.now() should be consistently replaced with datetime.utcnow() because using anythign else than UTC data internally is problematic for various reasons. See the discussion on that topic in various i18n/l10n libraries such as babel / pytz.

True but I believe we never do that in web2py. It is also true that nothing prevent the user from doing it but the same would be true with other frameworks.

You're not doing it, a user might be doing that by accident or because he things it should work. This problem does not exist in other frameworks because besides web2py I don't know a single one that does this sort of execfile() + namespace thing or uses any other kind of throwaway modules. As soon as a single reference leaks from the execfile()'d namespace you're in big troubles and due to the open nature of Python this could happen very, very fast.

Yes but because all relevant application code is executed within a context and there are no references outside the context to stuff inside the context, when a request is completed, the context is deleted and everything should be garbage collected.

That depends on two things. First not having a reference leaked, which could happen with abstract base classes and other stuff that uses registries or steals non-weak references. Also and more importantly, the file descriptor limit is very low and the majority of Python implementations will only collect that on the GC run (always, no matter where references are). Say you're opening three files per request and you have more than 100 requests/sec you could lose all file descriptors that are available before the GC even thought about running.

Regards, Armin