Login   Register  
PHP Classes
elePHPant
Icontem

PHP Threader: MultiThreading-like Functionality in PHP[Win&*nix]

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Mohammed Yousef
Name: Mohammed Yousef is available for providing paid consulting. Contact Mohammed Yousef .
Packages: 2 Browse all classes by Mohammed Yousef Browse all classes by
Country: Egypt Egypt - PHP jobs in Egypt
Age: 24
All time rank: 6636 in Egypt Egypt
Week rank: 727 Down9 in Egypt Egypt Down
Innovation award
Innovation award
Nominee: 1x

Winner: 1x


  Detailed description   Download Download .zip .tar.gz   Install with Composer Install with Composer  
This class can be used to add MultiThreading-like Functionality to PHP.

Online Docs Here : http://ajphpth.sourceforge.net/

The Class has an OOP Dynamic structure allowing adding Thread-Calling Classes Or Communication Classes As add-ons

it Comes with 3 Default Thread Calling Methods :-

1. Sockets : in Sockets Method it uses PHPSockets to generate POST requests to server to trigger Thread Execution.

2. Ajax : in Ajax Method It generates Javascript to generate AJAX requests to trigger Thread Execution(Js must be enabled in Client side) .

3. CLI : in CLI Methods OS Specific Shell Calls are used to trigger Thread Execution [Exec() must be enabled].

Multiple scripts may be executed in parallel.

Each thread may take it's own parameters .

it Comes with 3 Default Thread Communication & Synchronization Methods :-

1. Shared Memory (Shmop Extension must be available)

1. Flat Files

2. MySql Heap Engine/Table (Offcourse MySQL must be availabe with table creating Prevaliges)

The Class has the Features of :-

1. Completely Cross Platform Threads

3. Threads can communicate directly & Share data (Communication is Fully encapsulated) .

4. Providing Tracing of each Thread State

5. Abstract Mutex Class which can be used from user defined Communication Clases .

6. Threads can interact directly with user in Ajax Method (works best with FireFox as it implements Ajax as it should) .

  Classes of Mohammed Yousef  >  PHP Threader  >  Download Download .zip .tar.gz  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Threader
Base name: phpthreader
Description: MultiThreading-like Functionality in PHP[Win&*nix]
Version: 1.6
PHP version: 5
License: MIT/X Consortium License
All time users: 3321 users
All time rank: 964
Week users: 2 users
Week rank: 1166 Down
 
  Groups   Screenshots Screenshots   Rate classes User ratings  
  Trackback   Applications   Files Files  

  Groups  
Group folder image Language Constructs to assist in the language control View top rated classes
Group folder image AJAX Interact with the Web server without page reloading View top rated classes

  Files folder image Screenshots  
The Class Execution Diagram
File Role Description
Accessible without login Image file Class_Illustration.jpg Screen The Class Execution Diagram


  Innovation Award  
PHP Programming Innovation award winner
September 2007
Winner

Prize: One subscription to the PDF edition of the magazine by PHP Architect
Some times applications need to execute tasks that may take a long time to finish.

Ideally the users should be able to keep track of the progress of the tasks being executed, so they know how much of the whole task has been done and what long it may take to end.

This class can help solving these problems using AJAX requests to trigger the execution of long one or more tasks on the server side, as well retrieving information about the progress of the tasks while they have not yet finished.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Good (81.2%) Sufficient (75.0%) Sufficient (62.5%) Good (81.2%) - - Sufficient (62.5%) 668
Month: Not yet rated by the users

  Trackback links  
Link Description
PHP Threader - Threads in PHP Auf der Seite phpclasses.org, wo ich immer wiedermal vorbei schaue, bin ich eben auf eine Sehr Interessante klasse gestoßen...
PHP Threads oder ähnliches Hallo, wie der Titel schon sagt würde ich gerne so etwas wie Threads in PHP realisieren...

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Files folder imageCom (4 files)
Files folder imageHandlers (2 files)
Files folder imageSync (1 file)
Files folder imageThread (4 files)
Files folder imageDoc (4 files)
Files folder imageExamples (11 files)
Plain text file AjT.js Aux. Js Class

  Files  /  Files folder image Com  
File Role Description
  Plain text file Com.php Class The Abstract Thread Communication Class
  Plain text file FileCom.php Class Flat File Communication Class
  Plain text file MyCom.php Class Using MySql Heap Engine to communicate between Threads
  Plain text file ShmopCom.php Class Shared Memory Communication Class

  Files  /  Files folder image Handlers  
File Role Description
  Plain text file Loader.php Class a very Simple function to allow easy Loading / Locating of Classes
  Plain text file PlainArray.php Class A Writting Methodolgy Class Based on Array Serailization

  Files  /  Files folder image Sync  
File Role Description
  Plain text file SimpleMutex.php Class A Class Implementing a Simple Mutex For Read and Write Sync

  Files  /  Files folder image Thread  
File Role Description
  Plain text file AjThreader.php Class The Ajax Thread Calling class
  Plain text file Caller.php Class The abstract class for calling threads
  Plain text file CliThreader.php Class Cli Thread Calling (Shell Calling)
  Plain text file SocThreader.php Class Sockets Method of calling Threads

  Files  /  Files folder image Doc  
File Role Description
  Plain text file Aj_Threader.txt Doc. Ajax Method Documentation
  Plain text file Online_Docs.txt Doc. Url to Online Docs
  Plain text file Soc_Threader.txt Doc. Socket Method Doc
  Image file Threader.jpg Screen image illustrating Class Construction

  Files  /  Files folder image Examples  
File Role Description
  Plain text file Ex1_Counter.php Example First Example Counter Thread
  Plain text file Ex1_Echoer.php Example First Example File-writting Thread
  Plain text file Ex1_MainThread.php Example First Example Main Thread
  Plain text file Ex2_Counter.php Example Second Example Counter Thread
  Plain text file Ex2_Echoer.php Example Second Example File-writting Thread
  Plain text file Ex2_MainThread.php Example Second Example Main Thread
  Plain text file Ex3_MainThread.php Example Third Example Main Thread
  Plain text file Ex3_PartDownloader.php Example Third Example File Parts Downloader Script
  Plain text file Ex4_Counter.php Example Fourth Example Counter Thread
  Plain text file Ex4_Echoer.php Example Fourth Example File-writting Thread
  Plain text file Ex4_MainThread.php Example Fourth Example Main Thread

Install with Composer Install with Composer - Download Download all files: phpthreader.tar.gz phpthreader.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.