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