I don't know about that. Years ago people might have said PHP isn't made for command-line scripting, but then PHP 4.3 came along and gave us a command-line PHP SAPI and it works great. PHP may have been initially designed for serving web pages, but it's a fine general-purpose language that can do most anything you want it to, and it is of great benefit when you can use as few programming languages as possible. Sure, this particular task might benefit from being done in parallel, but why not parallel PHP processes?
I am in the process of writing a daemon in PHP, as a CakePHP shell, and I too have the expectation that there will not be memory leaks (though I have not measured it yet). The term isn't quite right, of course -- an interpreted garbage-collected language like PHP can't have memory leaks in the traditional sense (since you're not allocating and deallocating memory yourself) unless there is a bug in the PHP language itself that's causing this, which I kind of doubt given its popularity and age. Rather, I'd assume at this point that CakePHP is caching or logging some information within itself (perhaps collecting all the SQL queries in an array or something), under the assumption that all scripts will be short-lived and it won't matter; if so, CakePHP might want to reconsider that assumption. Or perhaps this is already governed by the debug config setting, or another config setting that we need to discover. On Feb 22, 2011, at 00:19, Walther wrote: > This sounds like exactly the sort of task that PHP isn't made for. > > Right tool for the job and all that. > > On Feb 22, 5:30 am, "Dr. Tarique Sani" <tariques...@gmail.com> wrote: >> Web servers are simply not designed to have such long single requests >> >> The best would be to use shell with short php scripts and some sort of a >> queue system, which allows you to stop and resume your task, you should also >> look at parallelizing the task >> >> Being a bit presumptive here your simulation looks like a perfect candidate >> for using map-reduce -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php