Home > php > Need help to design PHP program architecture

Need help to design PHP program architecture

November 27Hits:3

I have a web application where users upload a text file. Application reads the text file and based on the file data, it has to perform 30 different tasks and show output to the user after few seconds.

My approach is to write a php program which would take the text file and then call different scripts (php and unix scripts) to perform 30 different tasks.

I have following two queries :

  1. Can I run 30 different scripts in parallel to save overall execution time. If yes then should I use pthread library in php for multithreading. I have read in an article that multithreading does not help in a webapplication to save execution time. Article says that although all threads will run in parallel but it will take same amount of time as if they run in sequence.
  2. How would I come to know whether all the threads are over. If I keep on checking for all the threads execution, wont it be overhead to the system resource.

Thanks for your help.

Related Articles

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.456 s.