Re: File system watcher/monitoring

From: Date: Fri, 15 Feb 2013 08:13:46 +0000
Subject: Re: File system watcher/monitoring
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-65857@lists.php.net to get a copy of this message
hi Sanford, On Fri, Feb 15, 2013 at 8:35 AM, Sanford Whiteman <swhitemanlistens-software@cypressintegrated.com> wrote: >> There are native APIs for that (read: non .net, aka C) on Windows > > Well aware of that. The EXE does use the Win32 API, not a .NET > wrapper. I've used that API ever since it's been documented. Right, but these APIs can and should be used within the extension. I have a couple private extensions using them. >> using an external process for this purpose would be horrible, in all >> possible ways. > > Well, yeah, that's my very point... having the engine/extension do > this is the proper direction (I only use this hack to check completion > of some scheduled tasks, it's all private). > > Stas says typical PHP apps don't have a need for file system hooks. Well, I tend to slightly disagree with him here, that's something, along with a better locking API and another for shared memory (shared, process or thread) should be available. > Sure, long-polling may not be good with thread-per-process webservers, > but those aren't the only PHP environments in the wild. Once you > accept that people already roll out long-polling back ends with PHP, > the next step is to minimize the check-sleep-loop hackery and offer > true event-driven alternatives when possible. Events based APIs are already part of the PHP ecosystems. I see no problem here, even within a request. However there are some technical issues to solve, APIs and how they should work outside or between requests. > Nothing I'm saying is controversial. That's a tech discussion, I do not see controversy here but exchange of views or arguments, that's how we move forward :) Cheers, -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org

« previous php.internals (#65857) next »