Re: Thread safe extension homologation
| From: | Manuel Lemos | Date: | Sat, 30 Sep 2006 05:16:12 +0000 |
| Subject: | Re: Thread safe extension homologation | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-4202@lists.php.net to get a copy of this message | ||
Hello,
on 09/28/2006 05:19 PM Pierre said the following:
>> Is there any intention/plan to homologate PECL extensions in order to
>> let developers know whether they are safe to use with multi-threaded
>> Web servers?
>>
>> I think homologation could also be applied to core extensions but from
>> what I read I guess most of them are thread safe already.
>
> It could be a very good addition. However it is a lot of work to really
> valid each extension and the underlying libraries. One problem is the
> very little usage of threaded environment by the PECL developers, it is
> not the environment of choice.
Right. OTOH, I think that is a chickeg-egg problem. Developers do not
use PHP in multithread Web servers because some extensions are not ready
for that kind of usage. As long as one needed extension is not ready, it
will not help making all other extensions thread-safe.
Anyway, the point is that not being usable on multithreaded servers,
limits PHP scalability, I mean the number of simultaneous requests that
a PHP based solution can handle per GB of RAM in the same server.
To put this more into context of the trends of Web applications, as AJAX
COMET applications become more and more desirable, pre-forked based Web
server modes are not very convinient, as it may be necessary to hold
HTTP connections for much more time than the usual short lived requests.
Look here for more details about AJAX COMET applications.
http://ajaxian.com/archives/comet-with-php
I am aware that validating extensions (not just PECL but also core
extensions) is not a trivial task. But I am afraid if that task is not
ever started, people may have to look to other alternatives to PHP, as
suggested by the comments to the post above.
> I can think about three possible "labels":
>
> - Not thread safe: Known to fail, cannot be fixed easily or pointless
>
> - Thread safe
> Fully tested, TS garanteed (if we can say so, there is always unknown
> bugs)
>
> - Should be thread safe
> no issue should raised, but the extension has not been intensively
> tested, or not at all
> I do develop in TS environment frequently (windows, linux, apache2 or
> maintainer zts mode in console as tests), I should be able to help in
> one way or another.
I am not sure what you mean by tests. I'm afraid that for the lack of
automated tools, we may need to move on to human-based code analisys.
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/