Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74940 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85093 invoked from network); 17 Jun 2014 11:06:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Jun 2014 11:06:03 -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.128.180 as permitted sender) X-PHP-List-Original-Sender: julienpauli@gmail.com X-Host-Fingerprint: 209.85.128.180 mail-ve0-f180.google.com Received: from [209.85.128.180] ([209.85.128.180:44914] helo=mail-ve0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id BF/B1-08302-81120A35 for ; Tue, 17 Jun 2014 07:06:02 -0400 Received: by mail-ve0-f180.google.com with SMTP id jw12so7174844veb.25 for ; Tue, 17 Jun 2014 04:05:58 -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:content-type; bh=gI6+BWex15TcZPcSP+DCBvMBDCI3GC7EpeCNkE8gKL0=; b=TbY/ncmPld/HSVD+Pjz1KUaswcgF1oL0rgcoCtxERp+bwkBVbkSRUZwdpNI/AhejoL /q9QolrsJ0SGA6JTO3AJ/dIt3czibQ8fh6zSbTCI9C+Pd6ycTvVfO2RntdwRaV+9GeZE br4ddip8njkCrA/qgatv+Q/QkTMs8tGfaNjcxsBY3+2KRAnzwza3M3yVRcgBXY3/1yTM ATFsEQhluwIN40hY7549RAnQGOpuiowT8DwRRZKO+iMk2SfLWq0cjWYHuXzz70PjkJRR Dwdc91TMdpFKRY+hRIBIE6DR6YBdR/FH+0IsSI7mQQFWM6EogtT39eKArCgOj3BFuyRw OrmA== X-Received: by 10.58.134.75 with SMTP id pi11mr427609veb.50.1403003157711; Tue, 17 Jun 2014 04:05:57 -0700 (PDT) MIME-Version: 1.0 Sender: julienpauli@gmail.com Received: by 10.220.81.68 with HTTP; Tue, 17 Jun 2014 04:05:17 -0700 (PDT) In-Reply-To: <20140617110758.GD24253@methuselah> References: <20140617110758.GD24253@methuselah> Date: Tue, 17 Jun 2014 13:05:17 +0200 X-Google-Sender-Auth: AppN-_wdrmCoUfTufppbpZAy0eQ Message-ID: To: Martin Pelikan , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Refactoring our IO multiplexing layer From: jpauli@php.net (Julien Pauli) CCing internals On Tue, Jun 17, 2014 at 1:07 PM, Martin Pelikan wrote: >> Still, there exist the excellent libevent http://libevent.org/ > > Speaking as only an observer to PHP development, I have been reinventing > this particular wheel in my project (SSH client to thousands of machines > to replace the painfully slow python's paramiko, as seen in my thesis at > http://qviz.storkhole.cz/). > > My ~3 months of experience: > > The questions you want to ask are: > - "what's wrong with libevent" > - "how would you do it differently" > - "why does PHP need it differently" > > I strongly suggest not creating yet another way of doing I/O multiplexing. > nginx looks pretty neat and shows just how much work is needed to get things > right on all platforms. PHP developers have better things to do than this. > > http://trac.nginx.org/nginx/browser/nginx/src#event/modules > > If someone would say to me "learn and then read libevent" right away, my > backend would be finished now. Seriously. Go and have a look, it is > likely to save a lot of your time. Yes, libevent seems to be the API we need. Regading Nginx, I'm not sure we need file AIO, for PHP, network AIO could be enough to implement. Still, our FPM IO multiplexing layer is stable now. The problem of binding a lib is that you add one more dependency, you have to check for licence compatibility, and check for the dependency when building. Not talking about bugs in the lib impacting our codebase. This is a tradeoff. Julien