Threading, Shared memory and PHP Do PHP really need support for threads? When and why is it necessary? Why should/shouldn't it be implemented in the core? How can one implement/create similar features right now?
One reason I can imagine it to be useful, is if one has lots of SQL servers, and would want the script to manage the workload, or that if the servers might have different data stored that one needs access to. For example; one SQL server has account information, and another handles the messaging system, and the third handles generic information, and the last handles a product catalog with categories. And with threading, it would be a performance gain to be able to send the queries simultaneously to different servers. As for shared memory I think it is safer to use workarounds, but it would make it easier to create some classes, and would open up a whole new (high performance) way for classes to access shared data, that belongs to all objects and sessions. I also see a problem with shared web hosting, concerning both security and memory issues. For example, lets say the host has 10 clients running advanced systems, that place consistent data in memory, but only 2 clients has the need for the resources that the host supplies and 1000 connections at any given time, but the rest of the 10 clients only has 100 connections per day, and uses the same amount of memory as the more demanding clients. And then we have the problem with sharing memory across servers. Then we have the security issue that, if improperly configured/coded, other user/system can access the data, which arises the need for sandboxes or access control schemes. I fund some workarounds to this kind of problem by putting my energy on the code deign and analysis. I have a feeling that the most of the ones that yells the most belongs to the power programming group that skipped the part with architect philosophy. So basically I don´t need the support of threading or shared memory, I created the solution that works for me and my partners (with php only). But I admit that if there were native support for threading I would use it. But I don´t want the support for threading if it slowdown the performance. MvH / Hans Åhlin Tel: +46761488019 http://www.kronan-net.com/ irc://irc.freenode.net:6667 - TheCoin 2010/3/25 Tommy Pham <tommy...@gmail.com>: > On Wed, Mar 24, 2010 at 7:53 PM, Michelle Konzack > <linux4miche...@tamay-dogan.net> wrote: >> Hello Tommy, >> >> Am 2010-03-23 19:08:36, hacktest Du folgendes herunter: >>> The response time, max 5 seconds, will be tested on local gigabit LAN >>> to ensure the adequate response (optimized DB & code & proper >>> hardware) without worrying about users' connection limit and site's >>> upload bandwidth limit (which can easily rectify). Then thereafter >>> will be doing stress test of about 10 concurrent users. As for the >>> major queries, that's where threads come in, IMO, because those >>> queries depend on 1 primary parameter (category ID) and 1 secondary >>> parameter (language ID). This particular site starts with 500 >>> products about 15 categories, without many of those mentioned filters, >>> later grew to its current state. >> >> Because not a singel OSS OnlineStore software support features I need >> for my business, I am coding a whole "Waren Wirtschafts System" with >> production checkout and an additional OnlineStore where I sell products >> which I have bought in VERY big quantities to get my Endproducts cheaper >> in production. >> >> I start with bneary the same requiements as you, have 18 main categories >> and each has 5 to 40 sub categories. >> >> Currently I have arround 1700 different products I need for production >> but over the tieme I count with 30-50.000 products. >> >> The server I will use is developed by my own using a Marvell Kirkwood >> MV78200 with an attached Marvell 8-channel SATA/SAS Raid-0/1/10/5 con- >> troller. This pig has 2 GByte DDR2 memory and beat anything I have ever >> used in this class. It is an ARM Microcontroller with 1200MHz. >> >> The "Reference Design" I use currently can handel more then 400 requests >> at once... >> >> If such small machine can handel this, I realy think, you do not know >> what are you talking about... >> >> My software (Apache2, PHP5 and PostgreSQL 8.3; Debian GNU/Linux Lenny) >> installed on this Low-Energy (<17W) machine can be scaled by adding >> parallel machines to increase performance... >> >> The machine without harddrives cost me in production of 1000 pcs less >> then 300 Euro/machine. >> >> I am slightely sure, yo make something wrong... >> >> I will not continue to read ths thread, because it is sick. >> >> Thanks, Greetings and nice Day/Evening >> Michelle Konzack >> Systemadministrator >> 24V Electronic Engineer >> Tamay Dogan Network >> Debian GNU/Linux Consultant >> >> -- >> Linux-User #280138 with the Linux Counter, http://counter.li.org/ >> ##################### Debian GNU/Linux Consultant ##################### >> <http://www.tamay-dogan.net/> Michelle Konzack >> <http://www.can4linux.org/> Apt. 917 >> <http://www.flexray4linux.org/> 50, rue de Soultz >> Jabber linux4miche...@jabber.ccc.de 67100 Strabourg/France >> IRC #Debian (irc.icq.com) Tel. DE: +49 177 9351947 >> ICQ #328449886 Tel. FR: +33 6 61925193 >> > > I think you're missing my point. Given your current hardware, > software, product list, etc... how long does it take to run your > queries in series? If you were able to run them in parallel and > deliver faster response time to the users, would you implement PHP > thread, if it's available? > > -- > 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