Patterns for PHP multi processes?

后端 未结 7 895
囚心锁ツ
囚心锁ツ 2020-12-06 02:54

Which design pattern exist to realize the execution of some PHP processes and the collection of the results in one PHP process?

Background:
I do

相关标签:
7条回答
  • 2020-12-06 03:35

    Using web or CLI?

    If you use web, you could intergrate that part in Quercus Then you could use the advantages of JAVA multithreading.

    I don't actually know how reliable Quercus is though. I'd also suggest using a kind of message queue and refactoring the code, so it doesn't need the scope.

    Maybe you could rebuild the code to a Map/Reduce pattern. You then can run the PHP code in Hadoop Then you can cluster the processing through a couple of machines.

    I don't know if it's useful, but I came across another project, called Gearman. It's also used to cluster PHP processes. I guess you can combine that with a reduce script as well, if Hadoop is not the way you want to go.

    0 讨论(0)
提交回复
热议问题