Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #7581
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: php daemon |
| Date | 2012-11-15 11:25 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <k83517$d3v$1@dont-email.me> (permalink) |
| References | (5 earlier) <k7vi3b$93b$1@news.metronet.hr> <k7vt3s$71q$1@dont-email.me> <k82pft$jeg$1@news.metronet.hr> <k82rn7$fgl$1@dont-email.me> <k830id$v08$1@news.metronet.hr> |
On 11/15/2012 10:09 AM, Goran wrote: > On 15.11.2012 14:46, Jerry Stuckle wrote: >> On 11/15/2012 8:08 AM, Goran wrote: >>> On 14.11.2012 11:51, Jerry Stuckle wrote: >>>> You're the one who claimed life's a kludge, so yours must be. Mine >>>> isn't. >>> >>> As I can see, you tend to overcomplicate things, that's why I believe >>> your life is a mess. >>> >> >> Nope, you're the one who had to put together a kludge instead of using a >> more appropriate language. > > I guess you are the kind of person which prefer to buy a car instead of > paying for single taxi drive. > Absolutely nothing to do with the question. I prefer to do it *right*. >>>> Yes, it is a common pattern for people who don't know better. >>> >>> Maybe it's time for you to start defining what's wrong with my example >>> (after so much bs talk). Define kludge. >>> >> >> You have to keep stopping and starting it, for one thing. And in your >> loop you need to sleep() for a while. > > Every daemon needs loop, sleep is completely optional in every language > (it's just an example). Whats wrong with restarting? It's not your job, > it's supervisord's job. Even regular daemons need autorestarting for > failover sometimes. > Yes, but good daemons don't need to stop and restart. They also don't use sleep(). As for restarting - extra overhead on the processor, for one thing. But mainly the daemon loses any existing values, and is not available during the restart procedure. I can imagine how far an ftp server daemon would go if you had to log on after every ten blocks were uploaded! >> And you confuse the "stateless nature of the web" with daemons - they >> have nothing to do with each other. > > You took it out of context, how appropriate... > Nope. You're the one who mentioned them together. > PHP is scripting language primarily made for web - not designed to deal > with long running applications. Therefor, it's memory management is not > so precise - it's optimized for performance, not for memory usage. > Therefore, it's ideal for "stateless nature of the web", because there > is no need to carry state among http requests. > PHP is written as a web language, but it's also good for scripting files. And no, it is not "optimized for performance". It is "optimized for ease of coding". PHP performance is actually pretty bad when compared to other languages like C. But while you *can* use C for web projects, it is not a good choice, IMHO. And yes, there is a need for carrying state amongst http requests. That's what $_SESSION is all about. > Although, it's suboptimal for daemons, with a little help of supervisord > it can be efficient enough. > It's crap for daemons. It was never meant to be used for them. But then there are always people why try to use a hammer when a screwdriver is more appropriate. >> Or maybe you don't understand what a daemon is, or how a *real* daemon >> works. > > You know what? My dad eat daemons for breakfast! > I can believe that! -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ==================
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
php daemon "sl@exabyte" <sb5309@hotmail.com> - 2012-11-12 01:18 +0800
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-11 14:04 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-11 21:05 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-11 15:35 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-11 22:22 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-11 16:36 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-11 23:17 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-11 18:11 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-12 14:35 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-12 08:38 -0500
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-13 07:44 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-14 21:19 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-14 16:33 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-14 23:13 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-15 07:41 -0500
Re: php daemon Christoph Becker <cmbecker69@gmx.de> - 2012-11-15 16:55 +0100
Re: php daemon "sl@exabyte" <sb5309@hotmail.com> - 2012-11-12 23:45 +0800
Re: php daemon The Natural Philosopher <tnp@invalid.invalid> - 2012-11-12 16:08 +0000
Re: php daemon Goran <goran@nospam.com> - 2012-11-13 08:57 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-13 07:47 -0500
Re: php daemon Goran <goran@nospam.com> - 2012-11-13 14:54 +0100
Re: php daemon The Natural Philosopher <tnp@invalid.invalid> - 2012-11-13 14:13 +0000
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-13 12:23 -0500
Re: php daemon Goran <goran@nospam.com> - 2012-11-14 08:43 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-14 05:51 -0500
Re: php daemon Goran <goran@nospam.com> - 2012-11-15 14:08 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-15 08:46 -0500
Re: php daemon Goran <goran@nospam.com> - 2012-11-15 16:09 +0100
Re: php daemon Jerry Stuckle <jstucklex@attglobal.net> - 2012-11-15 11:25 -0500
Re: php daemon Tim Streater <timstreater@greenbee.net> - 2012-11-15 16:20 +0000
csiph-web