Re: database abstraction layer
| From: | Robert Cummings | Date: | Wed, 03 Feb 2010 02:05:51 +0000 |
| Subject: | Re: database abstraction layer | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-301773@lists.php.net to get a copy of this message | ||
Michael A. Peters wrote:
Robert Cummings wrote:Do you mean the following quote?Rene Veerman wrote:Einstein I believe said something along the lines of "A smart person solves a problem. A wise person avoids it in the first place" Might not have been Einstein, but anyway ...eh thats "randomize the timing of the retry attempt".. On Wed, Feb 3, 2010 at 12:17 AM, Rene Veerman <rene7705@gmail.com> wrote:While this decreases the probability of a collision you're just setting up another race. They teach about this stuff in computer science... right around first year... or at least they once upon a time did. Cheers, Rob.and after the sleep(rand(1,3)) it might need a short loop like this; $rnd = rand(1,99999); $a=0; for ($i=0; $i<$rnd; $i++) { $a++ } to further randomize the retry attempt..
The difference between a smart person and a wise person is that
a smart person knows what to say and a wise person knows whether
or not to say it.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP