Re: Doctrine madness!

From: Date: Fri, 17 Jun 2011 19:23:39 +0000
Subject: Re: Doctrine madness!
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-313592@lists.php.net to get a copy of this message
On Fri, Jun 17, 2011 at 3:19 PM, Jim Lucas <lists@cmsws.com> wrote: > On 6/16/2011 3:15 PM, Nathan Nobbe wrote: >> what it really amounts to is php is good at doing 1 thing and 1 thing only, >> generating web pages.  for anything else, including command line scripts >> that run for more than 30 seconds, choose an actual programming language or >> be prepared to deal w/ hacky, disgusting workarounds. >> > > Nathan, > > I would have to disagree with your statement about using PHP for applications > that take more then 30 seconds or CLI scripts. > > I have a daemon (read: scripts) that I wrote using PHP.  It listens on a few UDP > sockets and maintains an open connection to mysql.  It receives server updates > and other client requests for data.  When it receives a client update it updates > a couple tables in mysql.  When it receives a request from a server for data, it > goes to mysql gets all needed data, compiles it into the format requested and > sends it down the wire. > > This daemon starts when my system starts up.  As of this morning it has been > running non stop since Feb 28th (about 108 days).  Between then and now it has > received over 35M server updates and over 1.8M client requests.  I think it gets > used a bit. > > So, to say that doing anything with PHP that takes longer then 30 seconds to > complete will require you to use hacky and disgusting workarounds is false. > > I have no hacks nor disgusting workarounds in my scripts.  Combined the scripts > total about 200 lines, over half of which is either comments or vertical white > space. > > It has been running pretty much non-stop since August 2007 with minimal > maintenance needed. > > Jim Lucas > Hello, Impressive stats and has me a bit intrigued! Just out of curiosity, does your daemon use a heavy amount of object orientation in it or is it mostly procedural codebase? Regards

« previous php.general (#313592) next »