Hi Chris, in general I agree with you.
My remark were against using a web server for this, running as a thread under it - or whatever. If somebody do that, then they waste unnecessary system resources. Maybe I had a to strong opinion in the first letter; writing in a haste at work while occupied with other stuff might not always be good for your way of expressing your self. Design and implementations is a matter of compromises between contradicting requirements, and if one does not have knowledge about the pre requirements, then one easily can make a faulty judgment about a design. However, there are some few underlying design principles that once should try to follow if possible - and in most case they are. As a general role; if I need to scarify performance for maintenance in a none time critical section, then I will scarify performance without hesitation. Bad performance can always be fixed with faster hardware later on, but how do you fix bad design? In using PHP in kind of the same fashion as a script languages, I have no objection against; is this even possible? And you are right PHP is no worse than anything else in that respect. But the best thing would be if we didn't had to parse files at all. :) But those things only happens in programming utopia I have heard. But I don't agree with your point that PHP necessarily would be easier than C++, my personal opinion is rather the other way around. :) > -----Original Message----- > From: Chris Kranz [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 5:30 PM > To: 'Php Win32 list' > Subject: RE: [PHP-WIN] reading lines from a file > > > Didn't he just say parse it via command line tho? > > This wouldn't take away resources from the web server? > > Personally, large batches like this shouldn't be done on your live > webserver anyway. No matter how you accomplish it, your taking away a > lot of system resources. Best way to do it, is to parse it on a separate > computer, then just do a simple db dump with the results. > > In this case, is PHP any worse a language than a CGI or c++ program? > Other than being a lot easier to code (in my opinion :p). > > I've done the same thing, on many occasions, but I don't run the scripts > on my live server, that's just asking for trouble, especially if you > make a mistake... (thinks back to his recursive directory delete > function) > > Hehe :) > > chris kranz > fatcuban.com > > > -----Original Message----- > From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]] > Sent: 11 February 2003 15:13 > To: Ignatius Reilly > Cc: Php Win32 list > Subject: RE: [PHP-WIN] reading lines from a file > > > I trust that I am not the only one to be curious to > > learn more concerning your remark. > > [...] > > > Would you care to explain in more details why PHP is > > a MUST DON'T to do this? > > Hi, > > Thanx for your comment. > > One can talk about things like load balance for scalability, > and other boring subjects, but I agree that it is of course > hard to establish what is meant with a "good" design without > knowing the purposes. But, my general view goes this: > > "Of course you can use a hammer to nail a screw, but > a screw driver will do the job much easier and better." > > > ARGUMENT OF COUPLING & COHESION: > > By using for instance PHP for parsing a large text files, > you are stealing resources from the web server (assuming > PHP runs as an instance within Apache), resources better > used elsewhere for other purposes. > > A single application (the parser) can be executed in > its own processing space and given independent priority, > this will favoring parallelism with multi CPU system; > if the parser is smart enough written it might even > utilize several CPU's, possible running with low priority > as a background task. > > If the system become over loaded, then parser > application can easily be moved onto another system. > > Anyway, the main idea is that you wants to keep the > pears and apples separated from each other. > > By the way; You're fired! :) > > //Anders > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php