Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65857 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 86292 invoked from network); 15 Feb 2013 08:13:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Feb 2013 08:13:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.172 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.217.172 mail-lb0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:45985] helo=mail-lb0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/21-13024-D3EED115 for ; Fri, 15 Feb 2013 03:13:50 -0500 Received: by mail-lb0-f172.google.com with SMTP id n8so2463609lbj.17 for ; Fri, 15 Feb 2013 00:13:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=62wiGDA2tjxrFLoq0fZl2+/WkOKGhzrnW1UTstWXDYo=; b=ukSczDqp09wzCAtVgf0nd1XYIMrpIhpBGxrKV4+vhI68DqrQ2xOZa6d8YPYPTiDYtJ xQUK3ySHtnoP1P2JXui1C5BsmeWn34ZC/oj5BGBaqXgckIHzaWiXP5tSyj7B/ikO4717 ogmIvAvRNVi2vUFek7t2xwMXZ/7rQbuI81I2MqvnKLfjkXGFIWInm3toWkptTUKOxICN QgvOm8Ehv+tXZ1ZVANu3rs38Sc2QeB9W6f/VyWNWsYSEoa/xdUY8hWAnAdBT3Qg+B443 GndSeuKbRw9+LS5WjZeT31HmxBzoodtxL+hmpa+ceQQoUpWEtyMGsVn+U4icZZ75pGtN A2bw== MIME-Version: 1.0 X-Received: by 10.152.104.80 with SMTP id gc16mr1345319lab.49.1360916026410; Fri, 15 Feb 2013 00:13:46 -0800 (PST) Received: by 10.112.38.199 with HTTP; Fri, 15 Feb 2013 00:13:46 -0800 (PST) In-Reply-To: <1331291088.20130215023506@cypressintegrated.com> References: <511CEEB1.7040303@hoa-project.net> <511D5924.4070602@sugarcrm.com> <713003612.20130214164753@cypressintegrated.com> <1331291088.20130215023506@cypressintegrated.com> Date: Fri, 15 Feb 2013 09:13:46 +0100 Message-ID: To: Sanford Whiteman Cc: Pierre Joye Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] File system watcher/monitoring From: pierre.php@gmail.com (Pierre Joye) hi Sanford, On Fri, Feb 15, 2013 at 8:35 AM, Sanford Whiteman 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