. Updated Daily. Editions SDA India   SDA Indonesia
BUSINESS ENTERPRISE SOLUTIONS ARCHITECTURE INFORMATION SECURITY WIRELESS & MOBILITY DATA & STORAGE DEVELOPMENT HARDWARE













News

Thursday, 3 May 2007

Know about Multi-Threading Strategies in PHP

 

 

PHP does not have threading anywhere in its massive core. Brian W. Bosh finds a way of threading by relying on the underlying operating system’s multitasking abilities instead of PHP.

He has created a PHP4-compatible class named thread to abstract away the details of process management. He gives a class code to carry the process further. To demonstrate it’s usefulness, he created an application to calculate factorials. It uses a common recursive algorithm. He explains this step through a number of codes.

He initiates that the process is not multi-threading but running multiple processes and facilitating communication. He adds that performance isn't great, as PHP has to reparse every file multiple times.

Also, his samples have relied on Command Line Interface (CLI) access to PHP. He tells you, it is possible to channel your work through your web server to leverage load balancers or other performance infrastructure you have. You will have to modify the details of the thread class, which is possible by using cURL or wget as a proxy.

 

Read the Post

 
 
print save email comment

print

save

email

comment

 
 

Search SDA Asia

Free eNewsletter

SDA Asia Magazine Free Download
 
 
 
Copyright @ 2009 SDA Asia Magazine - All Right Reserved Privacy Policy | Terms of Use