Re: [PDO] Asynchronous requests

[email protected] (Lester Caine) Tue, 03 Nov 2009 16:21:36 +0000
Newsgroups php.pdo
Message-ID <[email protected]>
Yes ... forgot to change the address ;)

Lukas Kahwe Smith wrote:
> 
> 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).

Well a quick review of that would seem to say that this is nothing to do
with the MySQL, but rather a means of running multiple queries in
parallel ... As I said first off ... it just needs a separate connection
for each query, so I don't see anything that would preclude it being
implemented in PDO RATHER than in just in pdo_mysql?

I can see major problems with running multiple connections and
maintaining transaction integrity - but firebird already has a method of
handling cross connection commits. Not sure that other databases will be
capable of the same integrity ;)

The obvious question here is - why is the mysql driver having all this
effort spent on it rather than implementing it directly in PDO?

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php