Re: File system watcher/monitoring

From: Date: Thu, 14 Feb 2013 21:47:53 +0000
Subject: Re: File system watcher/monitoring
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-65849@lists.php.net to get a copy of this message
> 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.

« previous php.internals (#65849) next »