2009/9/18 Peter De Berdt <[email protected]>:
>
> On 18 Sep 2009, at 21:01, Greg Donald wrote:
>
> That will be processed for every request,
>
> No it won't.  It has randomization code that causes it to not run
> _most of the time_.  This is exactly how session gc should be handled.
> It will ramp up proportionally with traffic.
>
> Actually that could be never or always, relying on random numbers to make
> decisions on whether to do something "most of the time" is a bad idea.

Since quantum physics works entirely by probabilities (that is random
numbers) and microprocessors are built from semi-conductors which
operate because of the laws of quantum physics, it could be said that
any software is entirely dependent on the operation of random numbers.
 Therefore however it is coded it is 'relying on random numbers to
make decisions on whether to do something'.

Seriously, though, to suggest that something coded using random
numbers to be executed 1% of the time may either never run or always
run is incorrect.  Assuming it is correctly coded of course.

Colin

> The pointers that were given by Sax were more valid options. I'd personally
> prefer the cron tab option, since you can run it on a regular and low
> activity time, it's built-in and already running on any unix-based OS and
> thus requires no extra processes. It could even be a little script that runs
> outside of Rails, since it's a bit of overkill to start a whole Rails
> instance just to delete some records in the sessions table.
>
> Best regards
>
> Peter De Berdt
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to