RE: [PHP-DEV] TameJS syntax for Async/Parallel execution in PHP

From: Date: Fri, 19 Aug 2011 11:12:39 +0000
Subject: RE: [PHP-DEV] TameJS syntax for Async/Parallel execution in PHP
References: 1  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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.






Thread (5 messages)

« previous php.internals (#54716) next »