Re: Will PHP ever "grow up" and have threading?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



how about having a threaded php server query 10 mysql servers at the
same time? 10 results in .1 seconds!

and dont start with 'apache will handle that', there are cases where
you're best off doing it in php, so you can gather/calculate relations
from the data off 10 different servers.

On Wed, Mar 24, 2010 at 1:09 PM, Peter Lind <peter.e.lind@xxxxxxxxx> wrote:
> On 24 March 2010 12:04, Tommy Pham <tommyhp2@xxxxxxxxx> wrote:
>> On Wed, Mar 24, 2010 at 3:52 AM, Lester Caine <lester@xxxxxxxxxxx> wrote:
>>> Tommy Pham wrote:
>>>>>
>>>>> How exactly will threading in PHP help with the size of the database?
>>>>> That makes no sense to me, please help me understand how you think threading
>>>>> will help in this scenario.
>>>>
>>>> Looking at my example, not just the rows....  There are other features
>>>> that require queries to a DB for simple request of a category by a
>>>> shopper,  instead of running those queries in series, running them in
>>>> parallel would yield better response time.
>>>>
>>>>> Database size issues are tackled with clustering, caching and DB
>>>>> optimisation. Threading in the language accessing the DB has no advantage
>>>>> here.
>>>>
>>>> Yes, it does.  As mentioned several times, instead of running the
>>>> queries in series, run them in parallel.  If each of the queries takes
>>>> about .05 to .15 seconds.  How long would it take to run them in
>>>> serial?  How long do you it take to run them in parallel?
>>>
>>> Any you have a database that can actually handle that?
>>> If the database is taking 0.1 seconds per query, and you have 10 queries,
>>> then getting the data is going to take 1 second to generate. If you want
>>> some slow query to be started, and come back for the data later, then I
>>> thought we already had that? But again this is part of the database driver
>>> anyway. No need to add threading to PHP to get the database connection to
>>> pull data in the most efficient way. And one does not write the driver in
>>> PHP? We are using C there already?
>>>
>>> --
>>> 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
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>>
>>
>> Exactly my point.  10 queries taking .1 second each running in serial
>> is 1 second total.  How long would it take to run all those same
>> queries simultaneously??? What's so difficult about the concept of
>> serial vs parallel?
>
> Hmm, just wondering, but how long do you think it will take your
> high-traffic site to buckle under the load of the database queries you
> want to execute when now you want all of them to execute at the same
> time? Going with the "10 queries of .1 second each" ... how far do you
> think you can scale that before you overload your database server? I'm
> just wondering here, I could be completely off the bat.
>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> --
> <hype>
> WWW: http://plphp.dk / http://plind.dk
> LinkedIn: http://www.linkedin.com/in/plind
> Flickr: http://www.flickr.com/photos/fake51
> BeWelcome: Fake51
> Couchsurfing: Fake51
> </hype>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux