Re: [PDO] Asynchronous requests

[email protected] (Lester Caine) Fri, 20 Nov 2009 12:13:09 +0000
Newsgroups php.pdo
Message-ID <[email protected]>
Lester Caine wrote:
> Johannes Schlüter wrote:
>> On Fri, 2009-11-20 at 09:13 +0000, Lester Caine wrote:
>>> Lukas - as ever time prevents a full investigation, but it DOES seem 
>>> to me that Asynchronous requests does not actually rely on anything 
>>> in the database driver. It is simply a php end invention that could 
>>> potentially be used with any driver?
>>
>> Well, you need a non-blocking "query" API and some polling mechanism in
>> your database library.
> 
> So in some ways it may be linked to running multiple transactions on the 
> same connection. But in this case the queries need to be inside the same 
> transaction.
> I need to think about this ;)
> The whole reason I started with interbase in the 90's was because of its 
> events mechanism which provides notification of asynchronous activity 
> and Firebird has simply expanded on that.
> 
> But to be honest, the normal path is to build queries that simply return 
> the data in one hit and make them fast, so having to run several queries 
> is a little strange ... unless you need the answer to one before you can 
> proceed to the next anyway :)

Johannes - I'm not sure if thing have moved on from the notes I'm looking at
http://blog.ulf-wendel.de/?p=170 - but this would seem to suggest - as I had 
originally thought - that in order to run multiple queries asynchronously MySQL 
like other databases needs multiple connections. It was this area I was actually 
looking at ....

Single queries are a slightly different matter, and Firebird/Interbase already 
returns when the first result arrives if you want to do that.

-- 
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