Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47705 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 24093 invoked from network); 1 Apr 2010 17:27:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Apr 2010 17:27:36 -0000 Authentication-Results: pb1.pair.com smtp.mail=speedy.spam@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=speedy.spam@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.153 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: speedy.spam@gmail.com X-Host-Fingerprint: 72.14.220.153 fg-out-1718.google.com Received: from [72.14.220.153] ([72.14.220.153:25477] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F9/51-16887-687D4BB4 for ; Thu, 01 Apr 2010 12:27:35 -0500 Received: by fg-out-1718.google.com with SMTP id 22so788938fge.11 for ; Thu, 01 Apr 2010 10:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:reply-to:x-priority :message-id:to:cc:subject:in-reply-to:references:mime-version :content-type:content-transfer-encoding; bh=Aa80SZGMtYeEDMghrYblC6sGp3ZW9yF7BzY1Ajn5ayU=; b=RzTrdWNdY/iHpbNkK+r2Rwz5WzrVr8AbdiWCU8X+pT5uflszm5FLVbeMRo0RrTSCTG vK5/BnoxVCpdS46omPdDbjoBxSpjHv+4+6Y/+hLIJwIuF+tjJrAu8uyfMbtsSX6wPH3c kVz850vQvzeq6YOsSa4Cqdh3iq/b0af+hys64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:reply-to:x-priority:message-id:to:cc:subject:in-reply-to :references:mime-version:content-type:content-transfer-encoding; b=tuA5Qx5pxc3hM2Gyk0rL7O+0dF/eiSXNaLacctdItYY2QwXFLvN6skh/bxqfkHrGaf pwsC0s0RFWbPXhdwnw7ZDIHZzc0YYGcfLwvZesIJFiIAWfO41d8bTljrnu8tKpejLBU7 Oxc+sFSPGcVSRu6gEV9XBDPL8z3SbOaeeUfps= Received: by 10.87.68.36 with SMTP id v36mr2431155fgk.43.1270142851976; Thu, 01 Apr 2010 10:27:31 -0700 (PDT) Received: from tankgirl (cable-94-189-204-252.dynamic.sbb.rs [94.189.204.252]) by mx.google.com with ESMTPS id l12sm692649fgb.27.2010.04.01.10.27.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Apr 2010 10:27:31 -0700 (PDT) Date: Thu, 1 Apr 2010 19:27:06 +0200 Reply-To: speedy X-Priority: 3 (Normal) Message-ID: <537889361.20100401192706@gmail.com> To: Rasmus Lerdorf CC: PHP Developers Mailing List In-Reply-To: <4BB4C6D5.7030004@lerdorf.com> References: <1941231697.20100401163215@gmail.com> <4BB4BA13.2070706@lerdorf.com> <19610230188.20100401180311@gmail.com> <4BB4C6D5.7030004@lerdorf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] php and multithreading (additional arguments) From: speedy.spam@gmail.com (speedy) Hello Rasmus, Thursday, April 1, 2010, 6:16:21 PM, you wrote: > In any sort of Web architecture native threading in PHP just doesn't > make any sense. Imagine a real-time websockets/HTTP based server processing architecture wi= th quick event passing from one connection to another with possibility of each= web client broadcasting events to all other web clients. A simple example: web = chat, and a complex one: real-time web MMO game. Now imagine a whole web server written in PHP (ie. nanoserv), say, using libevent as the network backend, running the above described real-time web implementation. Alternatively, you could perhaps even wire it into worker/e= vent model of apache/other servers instead of rolling your own. It sounds quite = powerful, and development-effort-wise cheap - out of a mere HTML preprocessor! With proper threading, this would be a piece of cake to implement in PHP, e= fficiently and ensuring low latency, using up all available CPU cores / resources. Without using native threads, the whole class of web architectures on both = server and processing levels, viewed both separately or together, are quite a bit = more hairy to implement. > In single monolithic CLI apps, you could make a case > for it, but that is not the sort of architecture we are going to put a > significant amount of time into. Yep, agreed and understood. > -Rasmus --=20 Best regards, speedy mailto:speedy.spam@gmail.com