Re: [PDO] Asynchronous requests

[email protected] (Lukas Kahwe Smith) Tue, 3 Nov 2009 15:27:01 +0100
Newsgroups php.pdo
Message-ID <[email protected]>
On 03.11.2009, at 15:06, Lester Caine wrote:

> So what is asyncQuery() ... if it's a query in a new transaction  
> space, then it just needs a separate connection to use it. If it's  
> simply processing the data records as they arrive rather than  
> waiting for the complete result set, then that is how *I* normally  
> work anyway.

the idea is to send of a bunch of queries and then poll so that you  
can get to work as soon as any of those queries is able to provide  
data. so you are not longer sequentially working through your queries:
http://blog.ulf-wendel.de/?p=170

Not sure if postgresql's approach is the same (it seems more like  
multi query .. as in sending multiple queries at once and then working  
through them sequentially, but maybe combined with postgresql's notify  
support it can be used for parallel out of order handling).

> I do think that we are probably still working to different ends?  
> While PDO has no interest in the content of the SQL, any reason to  
> change from generic drivers should have cross database working at  
> least anticipated.  Just designing a rather clunky one size fits all  
> driver that then needs another layer to make it switch between  
> engines is just pointless?


right .. if the entire goal is to provide the smallest common  
denominator under a single API, then i think we are wasting our time  
doing this in C. then we should rather conserve the C programming  
resources and focus them on the extensions and adding the missing  
features there (like the way more flexible/powerful fetching modes in  
PDO) and provide a compatibility layer implemented in PHP.

but i think this is not what we want for the long term. one of the key  
goals of PDO was to reduce the resources needed to bring a stable  
feature rich database API for all supported RDBMS. if in the end we  
the old native extensions still need to be maintained plus PDO .. then  
we have done the direct opposite of that.

regards,
Lukas Kahwe Smith
[email protected]