Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43334 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38360 invoked from network); 12 Mar 2009 20:26:18 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2009 20:26:18 -0000 Authentication-Results: pb1.pair.com header.from=bas@tobin.nl; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=bas@tobin.nl; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain tobin.nl designates 208.97.132.66 as permitted sender) X-PHP-List-Original-Sender: bas@tobin.nl X-Host-Fingerprint: 208.97.132.66 caiajhbdcagg.dreamhost.com Received: from [208.97.132.66] ([208.97.132.66:60527] helo=spunkymail-a17.g.dreamhost.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EA/D4-30999-7EF69B94 for ; Thu, 12 Mar 2009 15:26:17 -0500 Received: from [192.168.1.100] (82-171-84-74.ip.telfort.nl [82.171.84.74]) by spunkymail-a17.g.dreamhost.com (Postfix) with ESMTP id 5207F73621; Thu, 12 Mar 2009 13:26:12 -0700 (PDT) To: Marcus Boerger In-Reply-To: <412699784.20090312210418@marcus-boerger.de> X-Priority: 3 (Normal) References: <412699784.20090312210418@marcus-boerger.de> Message-ID: <125A5293-3739-4863-8F5F-93BE876FD020@tobin.nl> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Thu, 12 Mar 2009 21:26:10 +0100 Cc: internals@lists.php.net X-Mailer: Apple Mail (2.930.3) Subject: Re: [PHP-DEV] embed sapi module and multi-threading From: bas@tobin.nl (Bas van Beek) No problem. I will clean up the code to remove non generic items and will post a link for code inspection shortly. Bas Op 12 mrt 2009, om 21:04 heeft Marcus Boerger het volgende geschreven: > 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 > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >