Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43333 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27307 invoked from network); 12 Mar 2009 20:04:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2009 20:04:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 85.214.94.56 as permitted sender) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 85.214.94.56 aixcept.net Linux 2.6 Received: from [85.214.94.56] ([85.214.94.56:43935] helo=h1149922.serverkompetenz.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/92-30999-8CA69B94 for ; Thu, 12 Mar 2009 15:04:25 -0500 Received: from dhcp-172-26-94-64.nyc.corp.google.com (unknown [72.14.228.89]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by h1149922.serverkompetenz.net (Postfix) with ESMTP id 5DBF511F2C3; Thu, 12 Mar 2009 21:04:21 +0100 (CET) Date: Thu, 12 Mar 2009 21:04:18 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <412699784.20090312210418@marcus-boerger.de> To: Bas van Beek CC: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] embed sapi module and multi-threading From: helly@php.net (Marcus Boerger) Hello Bas, I would assume that we will see more people wanting this in the future. So if you're willing to provide your code under PHP License, maintain it in the foreseeable future and provide a clean version of it (as in free from anything that is not really necessary), then you should show us a patch. And if it looks fine you should go for an account. marcus Thursday, March 12, 2009, 5:25:32 PM, you wrote: > Hi, > For a project of mine I had to have an embedded webserver with php > support. For this I've used the boost::asio multi-threaded example as > a base and modified it so I could enable php scripting support. The > first, logical and fast thing to do was to try out the embed sapi > module but I found it to hang on concurrent php_embed_init calls. > The biggest issue I found was that the embedded module bundles sapi > module startup and request startup. I ended up writing my own SAPI > module as I also needed full support for POST methods, URL queries, > etc. but I can imagine people being interested in having an embedded > sapi which separates module startup/shutdown and request startup/ > shutdown so concurrency works together with being able to have > separate request environments for each thread. > Separating these calls would allow for the following: > At program startup initialize the php environment > At each thread startup initialize a php request environment > With a few minor alterations I could convert my specific sapi module > or current embed module to a generic embed-mt multithread capable > module. > Would this be something that you are interested in? > kind regards, > Bas van Beek Best regards, Marcus