Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 70233 invoked from network); 18 Mar 2008 19:12:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2008 19:12:35 -0000 Received: (qmail 4901 invoked by uid 500); 18 Mar 2008 19:12:32 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 4887 invoked by uid 500); 18 Mar 2008 19:12:32 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 4878 invoked by uid 99); 18 Mar 2008 19:12:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 12:12:32 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [81.103.221.49] (HELO mtaout03-winn.ispmail.ntl.com) (81.103.221.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2008 19:11:52 +0000 Received: from aamtaout01-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20080318191509.NHBX19530.mtaout03-winn.ispmail.ntl.com@aamtaout01-winn.ispmail.ntl.com> for ; Tue, 18 Mar 2008 19:15:09 +0000 Received: from s5h.net ([81.110.242.129]) by aamtaout01-winn.ispmail.ntl.com with ESMTP id <20080318191515.DCMM219.aamtaout01-winn.ispmail.ntl.com@s5h.net> for ; Tue, 18 Mar 2008 19:15:15 +0000 Received: (qmail 9330 invoked by uid 1010); 18 Mar 2008 19:11:53 +0000 Received: from unknown (HELO workstation) (192.168.0.25) by s5h.net with SMTP; 18 Mar 2008 19:11:53 +0000 Date: Tue, 18 Mar 2008 19:11:53 +0000 From: ed To: modules-dev@httpd.apache.org Subject: Re: long running background tasks Message-ID: <20080318191153.6485e132@workstation> In-Reply-To: <8d38ca0a0803180553l4bf94eb4k6901a88bd94b1513@mail.gmail.com> References: <8d38ca0a0803112059m50c7538ag11d306ea55f8af79@mail.gmail.com> <47DDA28B.8000902@s5h.net> <8d38ca0a0803180553l4bf94eb4k6901a88bd94b1513@mail.gmail.com> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.12.0; i486-pc-linux-gnu) X-Face: =\=1ht]b*gboJ:&+:3x1vGz}fCe40TZJ9s@L2~YGi}]c(fY-_7J]wUR.6MSH\oeq#@H6aAERh(<<1miWJ|x/-1g`r3EmzY3FE?VxmEih9%ETmPd7zChR1"zWC$iuK{|{R+Ss{I3w(KC"_LM%S! Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_3DoPS+drdWi14wHqX4kb7VP; protocol="application/pgp-signature"; micalg=PGP-SHA1 X-Virus-Checked: Checked by ClamAV on apache.org --Sig_3DoPS+drdWi14wHqX4kb7VP Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Tue, 18 Mar 2008 08:53:29 -0400 "Sam Carleton" wrote: > On Sun, Mar 16, 2008 at 6:43 PM, ed wrote: >=20 > > What might be better for you is to add this to a queue, perhaps via > > means of a unix socket (or IP socket) of another process, that > > does this work. =20 >=20 > Actually today the program is only Windows and in time will be > Windows, Linux and OSX (aka BSD). After posting I had a feeling that > a daemon (Windows NT Service) would be the most likely approach. The > only remaining question is: How best to let the daemon process know > it is time to grab the task from Apache. In Windows there are named > Event Object > (http://msdn2.microsoft.com/en-us/library/ms682655(VS.85).aspx) so > the Apache Server can set the event and the daemon know it needs to > get the new task from Apache. Does the Linux/BSD world have > something like named Events? Linux IPC is sockets, semaphores and pipes. Personally, using the filesystem might be portable enough for you. Leave a file in /tmp/apache_messagenam_pid.tmp. Once the file writing is complete, move the file to /tmp/apache_messagenam_pid so your collector program can read the full message. This doesn't require sockets or anything that should make portability a problem. --=20 The GameCube is errored because of a translator who speaks Bocce. R2D2 is having Robert Mann to write some scripts. :: http://www.s5h.net/ :: http://www.s5h.net/gpg.html --Sig_3DoPS+drdWi14wHqX4kb7VP Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH4BP54dyr7s6PRYgRArupAJ4wrPbt5zVLzUTPsdzNDgWv4eeagwCbBwRe FSpIYwaTXf27NpgbWxnKWlM= =Eo7X -----END PGP SIGNATURE----- --Sig_3DoPS+drdWi14wHqX4kb7VP--