Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65849 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45714 invoked from network); 14 Feb 2013 21:49:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Feb 2013 21:49:01 -0000 Authentication-Results: pb1.pair.com header.from=swhitemanlistens-software@cypressintegrated.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=swhitemanlistens-software@cypressintegrated.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain cypressintegrated.com designates 173.1.104.101 as permitted sender) X-PHP-List-Original-Sender: swhitemanlistens-software@cypressintegrated.com X-Host-Fingerprint: 173.1.104.101 rproxy2-b-iv.figureone.com Windows 2000 SP2+, XP SP1 (seldom 98 4.10.2222) Received: from [173.1.104.101] ([173.1.104.101:56365] helo=rproxy2-b-iv.figureone.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/50-43372-BCB5D115 for ; Thu, 14 Feb 2013 16:49:00 -0500 Received: from localhost ([216.220.114.66]) by rproxy2-b-iv.figureone.com (Brand New Heavy v1.0) with ASMTP id ZXK88955 for ; Thu, 14 Feb 2013 13:48:55 -0800 Date: Thu, 14 Feb 2013 16:47:53 -0500 Reply-To: Sanford Whiteman X-Priority: 3 (Normal) Message-ID: <713003612.20130214164753@cypressintegrated.com> To: Stas Malyshev In-Reply-To: <511D5924.4070602@sugarcrm.com> References: <511CEEB1.7040303@hoa-project.net> <511D5924.4070602@sugarcrm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: swhitemanlistens-software@cypressintegrated.com Subject: Re: [PHP-DEV] File system watcher/monitoring From: swhitemanlistens-software@cypressintegrated.com (Sanford Whiteman) > I think it'd be great to have a library with unified interface and an > extension that uses it. However, I'm not sure if these libraries are > useful in common php use case - short-lived requests. Could I get the > changes since the last request? Or is it useful only for long-running > persistent processes? You're right of course that you are implicitly lengthening a request. But if you are already embracing a long-polling model that waits for filesystem changes, the back-end service can actually use fs events instead of looping -- much more efficient. In fact I do this already on Windows by running an external FileSystemWatcher EXE and waiting for it to return (+ a timeout in the wrapper). -- S.