Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:54716 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45210 invoked from network); 19 Aug 2011 11:12:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Aug 2011 11:12:45 -0000 Authentication-Results: pb1.pair.com smtp.mail=jbondc@openmv.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jbondc@openmv.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain openmv.com from 64.15.152.204 cause and error) X-PHP-List-Original-Sender: jbondc@openmv.com X-Host-Fingerprint: 64.15.152.204 mail.ca.gdesolutions.com Received: from [64.15.152.204] ([64.15.152.204:60725] helo=mail.ca.gdesolutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B8/A6-11562-C254E4E4 for ; Fri, 19 Aug 2011 07:12:44 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.ca.gdesolutions.com (Postfix) with ESMTP id 9BF3E5DA0; Fri, 19 Aug 2011 07:12:41 -0400 (EDT) X-Virus-Scanned: amavisd-new at gdesolutions.com Received: from mail.ca.gdesolutions.com ([127.0.0.1]) by localhost (mail.ca.gdesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SMsrjpThvqkh; Fri, 19 Aug 2011 07:12:40 -0400 (EDT) Received: from djbondc (modemcable166.116-70-69.static.videotron.ca [69.70.116.166]) by mail.ca.gdesolutions.com (Postfix) with ESMTPSA id 9BB505D9F; Fri, 19 Aug 2011 07:12:40 -0400 (EDT) To: "'Raymond Irving'" , "'PHP Internals'" References: In-Reply-To: Date: Fri, 19 Aug 2011 07:12:39 -0400 Message-ID: <006e01cc5e60$e9106960$bb313c20$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 thread-index: AcxTEq6O+Swfvv/YTSujLDlEL4fdXAJ2U0oQ Content-Language: en-ca Subject: RE: [PHP-DEV] TameJS syntax for Async/Parallel execution in PHP From: jbondc@openmv.com ("Jonathan Bond-Caron") On Thu Aug 4 09:54 PM, Raymond Irving wrote: > Hello, > > I came across this little library called TameJS (http://tamejs.org/) > and fell in love with the it's syntax. This had me thinking if it was > possible to add such features to a PHP CLI (or web app): > Thanks for sharing, never heard of tame. Love the await{} block await { mysql_query_async($sql, $args, defer($rs)); curl_post_async($url,$data, defer($response)); } $rows = $rs->fetchAll(); > What do you think? I think it would be really interesting r&d but likely a large undertaking to get it to work within php Also async processing makes a lot of sense of in the client since there's a lot of idle processing power in the pc (dual core cpu etc..) If many php processes are executing the same async code (server under load), I'm not sure you'd get a net benefit. My opinion, server-side caching is faster and more maintainable.