PHP Classes
elePHPant
Icontem

PHP parallel programming: Run parallel scripts using a C++ program

Recommend this page to a friend!
  Info   View files View files (17)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2009-10-14 (7 years ago) RSS 2.0 feedNot enough user ratingsTotal: 969 All time: 3,593 This week: 1,095Up
Version License PHP version Categories
parallel-php 1.0.0Free for non-comm...5.3PHP 5, Language
Description Author

This package can be used to run multiple parallel scripts using a C++ program.

It can start parallel scripts that may run synchronously or asynchronously using the compiled C++ program to run PHP command line program.

It can control the execution of parallel scripts and retrieve their output.

Innovation Award
PHP Programming Innovation award winner
November 2009
Winner
Some tasks require the execution of lengthy procedures many times.

Often, a better approach to execute such procedures in less time is to start parallel threads that execute parts of the procedures.

PHP can start parallel processes using the pcntl extension, which only works on Linux/Unix-like systems.

This class provides an alternative solution for starting and managing parallel PHP scripts. It uses a separate program written in C++. This program comes in versions for Linux/Unix and Windows.

It is also able to control the execution of the parallel PHP scripts and can capture their output.

Manuel Lemos
Picture of akash
Name: akash <contact>
Classes: 3 packages by
Country: India India
Innovation award
Innovation award
Nominee: 1x

Winner: 1x

Details
To use this Library, please chamge some settings.
PHP settings:
	ForkerManager::$FORKER_DIR, the directory where library is copied
	ForkerManager::$PATH, the PHP executable path

C++ settings
	FORKER_DIR, the directory where library is copied
	PATH, the PHP executable path


To test library, run synchronous-forker.php and asynchronous-forker.php. For results check log.txt file.

  Files folder image Files  
File Role Description
Files folder imageForker (5 files, 1 directory)
Files folder imagetest (5 files)
Accessible without login Plain text file LICENSE Lic. LICENSE
Accessible without login Plain text file NOTICE Doc. NOTICE
Accessible without login Plain text file README Doc. README

  Files folder image Files  /  Forker  
File Role Description
Files folder imagebin (3 files, 1 directory)
  Accessible without login Plain text file AsynchronousForker.php Example script to handle asynchronous forking
  Accessible without login Plain text file Defines.inc.php Conf. configuration file
  Plain text file Forker.php Class singelton class for a forker
  Plain text file ForkerInit.inc.php Class file to be included in all the scripts to be run in parallel
  Plain text file ForkerManager.inc.php Class main library handler

  Files folder image Files  /  Forker  /  bin  
File Role Description
Files folder imagecommand (1 file)
  Accessible without login Plain text file forker-window.cpp Data forker c++ code for windows platform
  Accessible without login Plain text file forker.cpp Data forker c++ code for *nix platform
  Accessible without login Plain text file Makefile Data *nix install file

  Files folder image Files  /  Forker  /  bin  /  command  
File Role Description
  Accessible without login Plain text file temp.txt Output directory which store all the intermediate files

  Files folder image Files  /  test  
File Role Description
  Accessible without login Plain text file asynchronous-forker.php Example run to test asynchronous forker
  Accessible without login Plain text file asynchronous-output.php Example check asynchronous forker run output
  Accessible without login Plain text file log.txt Output log file to check parallel execution
  Plain text file sleep.php Class file rn as worker for parallel process
  Plain text file synchronous-forker.php Class run to test synchronous forker

 Version Control Unique User Downloads Download Rankings  
 0%
Total:969
This week:0
All time:3,593
This week:1,095Up