PHP Classes

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

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 66%Total: 976 All time: 3,720 This week: 660Up
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
Age: ???
All time rank: 96457 in India India
Week rank: 180 Up21 in India India Up
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 (17)  
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 (17)  /  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 (17)  /  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 (17)  /  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 (17)  /  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

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 0%
Total:976
This week:0
All time:3,720
This week:660Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:83%StarStarStarStarStar
Tests:-
Videos:-
Overall:66%StarStarStarStar
Rank:494