Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 16707 invoked from network); 17 Jun 2014 14:58:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jun 2014 14:58:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=julienpauli@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=julienpauli@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.173 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.220.173 mail-vc0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:39531] helo=mail-vc0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/23-00242-59750A35 for ; Tue, 17 Jun 2014 10:58:29 -0400 Received: by mail-vc0-f173.google.com with SMTP id lf12so6593770vcb.32 for ; Tue, 17 Jun 2014 07:58:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=2VhRROPMIilkmY3y0T9m2XJ0bvYAiTRx7XR5Ue5O51o=; b=m2D0SgJcrl1mdF9sVHVIyUaEvaPz0UXOXaoYAETXZ1FT1sdJ4dsIUNcXCKWDManwc3 djiae7WfA85DL8XZ0K3JkX/HGaElwCVOQC6JoKOZ3LcOAmwsWqUWYEH6xvUtYZSVAvb9 NO4iQo4bQoI6a/MXgV4xWJnMqT7xkpW0h8ubY4rE6XyL4ZhD7ZeTdKOOxvBT2mH0C855 djAoIhH/2Ef2lM1NvQUU/cPB18MMT2ijYEMPdk4jmOGMsLgB8lytkzbFwouwWNm/0KXj yUYz1eajuZaCJs/ZG1e73sBxeS59JYI26bEpruJcX9D2x3b9PuRSuYnAo2vHj7ttJSrr 0z0w== X-Received: by 10.58.219.166 with SMTP id pp6mr22767035vec.1.1403017106938; Tue, 17 Jun 2014 07:58:26 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Tue, 17 Jun 2014 07:57:46 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Jun 2014 16:57:46 +0200 X-Google-Sender-Auth: YEpwMa6K9xVNKq7vjymHRkVoioc Message-ID: To: Levi Morrison Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Refactoring our IO multiplexing layer From: jpauli@php.net (Julien Pauli) On Tue, Jun 17, 2014 at 4:28 PM, Levi Morrison wrote: > On Tue, Jun 17, 2014 at 4:04 AM, Julien Pauli wrote: >> So basically, the first question will be do we need it ? > > I would like it, yes. Having a IO abstraction layer internally would > be really nice. I'm not up-to-date on all the PHP extensions that > would facilitate this behavior, but perhaps some improved version of > the libuv extensions would be great. I am not sure on the health of > those extensions (I believe there are at least two of them) but it's > worth investigating at least. Potentially it could save us some work > as well as well as give us a bit more confidence. > >> Second question will be : do we use, and then link against libevent >> (or any other lib that could fit the need) , or do we develop our own >> layer, based on the FPM layer which is pretty nicely done (just not >> shareable elsewhere at the moment). > > I also favor libuv over libevent; to be completely fair I have only > used both of them a little bit but I liked libuv a bit more. > > We definitely shouldn't roll our own. If we had corporate funding then > rolling our own would have the advantage of not having to wait for > upstream merges for bug fixes, but I don't think we have the manpower > or interest to build and maintain our own. I'm glad there seem to be interest in the subject, I had a good feeling while writing the mail. Like Daniel said => IOs is the 2014 bottleneck , and as you can see from my analyze of the current situation, we have all but a clean IO API. I'm gonna start writing the draft RFC this week so that the ideas are tied into a single place. I'll be able to invest some time developping such a layer. Feel free to ping on IRC or intern@ls if one wants to join the effort. The idea will then be to create a branch for some experiment. I'm not confident about threads. Threads is another topic (which shares some comon technical ideas with IOs, such as locking) , and I think we should treat threads in an other RFC Julien Pauli