Quote from: caedo caelestisI was curious why you had sided with using an os function to perform the turn processing as opposed to a purely php solution?The reason I used cron, as opposed to just writing it in...
The original version didn't have much of a player base, but I wanted the turns to trigger off no matter whether anyone was on or not, not to mention, I wanted to eliminate any possible overhead I could. Also, during the later part of when I ran Promisance solely, there were 2 physical machines running it. One did all the web work, the other did the database only, at that time, using cron instead of writing it into Promisance directly, was just a better idea since I could divide it up better.
The original 2 servers were only Athlon K6-2 450s with a whopping 256mb of ram in both, on IDE drives, so trying to squeak out any performance I could out of my own programming, was a must. At the time, I relied more on the system clocks (which synced themselves daily) than hoping someone was hitting the web site at the "fire off time".
Granted, with the speed of computers now, that's nowhere NEAR an issue, but at the time, with the hardware I was using for the servers, it was a big issue. (As it was, it took anywhere from 3-5 minutes to complete the daily "cron run" with about 1000 accounts). In comparison, I have 2 machines right here in front of me now... one is an Athlon 1ghz with 512mb of RAM running Windows 2000 Pro. The other (the one I'm typing this from) is a P3 733 with 256mb of RAM, running Gentoo Linux.
So, that's why I used the OS function, of cron in this case, instead of processing it via a PHP solution. It was a PHP "solution", it just fired off via cron.
Forum software (like Invision) aren't "time sensitive", like Promisance is. If a forum e-mail isn't sent right away, or in 5 minutes, 10 minutes, etc, it's not going to globally "break everything", where with Promisance, if it misses one turn run, everybody gets affected by it. Not to mention, most forum software fires off an e-mail as soon as a post is replied to :)