Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!usenet.ukfsn.org!not-for-mail From: Martin Gregorie Newsgroups: comp.lang.java.programmer Subject: Re: Java daemon Date: Thu, 15 Nov 2012 02:09:29 +0000 (UTC) Organization: UK Free Software Network Lines: 38 Message-ID: References: <50a1b94b$0$294$14726298@news.sunsite.dk> <50a2ca3d$0$281$14726298@news.sunsite.dk> <50a41358$0$291$14726298@news.sunsite.dk> NNTP-Posting-Host: 84.45.235.129 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: localhost.localdomain 1352945369 32044 84.45.235.129 (15 Nov 2012 02:09:29 GMT) X-Complaints-To: usenet@localhost.localdomain NNTP-Posting-Date: Thu, 15 Nov 2012 02:09:29 +0000 (UTC) User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Xref: csiph.com comp.lang.java.programmer:19758 On Wed, 14 Nov 2012 16:55:33 -0500, Arne Vajhøj wrote: > On 11/14/2012 4:33 PM, Martin Gregorie wrote: >> On Tue, 13 Nov 2012 17:31:22 -0500, Arne Vajhøj wrote: >> >>> You know what a daemon is. >>> >>> Besides the web integration with Apache and IIS that accounts for 99+% >>> of PHP usage, then PHP also comes with a command line utility. >>> >>> So you can write a daemon in PHP and run it via the command line >>> utility. >>> >> Thanks for the clarification. I thought you must have been talking >> about some special PHP daemonising framework or library. > > Nope. Just not very good at explaining what I meant. > Probably same here. I have written a batch-type program in PHP but would probably not do it again because I think there are better languages for that. This program walks a directory structure, generating thumbnails of all the images it finds. Its companion (still in PHP under Apache) generates menus if thumbnails on the fly. Its first cut generated the thumbnails as needed, but that was deadly slow, hence the overnight batch directory walker. I ended up rewriting the thumbnail generating program in Java and dumping the PHP version when I needed a non-trivial enhancement (the ability to generate permanent HTML menu pages. As a bonus, the Java version is significantly faster which is quite surprising considering its run is fairly short - 2-3 seconds on a typical run when it finds nothing to do in the 600+ directories it looks at. -- martin@ | Martin Gregorie gregorie. | Essex, UK org |