Re: File system watcher/monitoring

From: Date: Fri, 15 Feb 2013 06:41:22 +0000
Subject: Re: File system watcher/monitoring
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-65854@lists.php.net to get a copy of this message
hi, On Thu, Feb 14, 2013 at 10:47 PM, Sanford Whiteman <swhitemanlistens-software@cypressintegrated.com> wrote: >> 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). There are native APIs for that (read: non .net, aka C) on Windows, using an external process for this purpose would be horrible, in all possible ways. Cheers, -- Pierre @pierrejoye

« previous php.internals (#65854) next »