Re: shared state between requests and FastCGI

2008-02-14 Thread [EMAIL PROTECTED]
This is pretty hackish, and might not be fast enough, but if the data is simple(ie just 1 number to represent something) perhaps just store it in a text file. On Feb 15, 12:23 am, Amit Ramon <[EMAIL PROTECTED]> wrote: > After reading the replies, and thinking about the problem a little bit more,

Re: shared state between requests and FastCGI

2008-02-14 Thread Amit Ramon
After reading the replies, and thinking about the problem a little bit more, I think I can phrase it better (the replies really helped me to better understand it). I need to draw one of, say, N elements in every request, in such a way that over many requests the drawing distribution will be un

Re: shared state between requests and FastCGI

2008-02-14 Thread Robin Becker
Amit Ramon wrote: > Hello, > > I'm developing a site that need to display ads. The ad to display on a page > is selected by a function based on the value of a global state - an > application state that need to be maintained across requests and different > users. In other words, the state is a

Re: shared state between requests and FastCGI

2008-02-14 Thread Marty Alchin
On Thu, Feb 14, 2008 at 11:31 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > Look at idea behind this: > http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser That will likely fail to work across multiple requests, due to threading and/or multi-process issues. Better yet, check out

Re: shared state between requests and FastCGI

2008-02-14 Thread Alex Koshelev
Look at idea behind this: http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser On Feb 14, 6:40 pm, Amit Ramon <[EMAIL PROTECTED]> wrote: > Hello, > > I'm developing a site that need to display ads. The ad to display on a page > is selected by a function based on the value of a global

shared state between requests and FastCGI

2008-02-14 Thread Amit Ramon
Hello, I'm developing a site that need to display ads. The ad to display on a page is selected by a function based on the value of a global state - an application state that need to be maintained across requests and different users. In other words, the state is a "website singleton". This sta