AJAX: PHP Threader
Mohammed Yousef (contact me)
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) .
| Utility
| Consistency
| Docs
| Examples
| Tests
| Videos
| Overall
| Rank
|
| Good (81.3%)
| Sufficient (75.0%)
| Sufficient (62.5%)
| Good (81.3%)
| -
| -
| Sufficient (62.5%)
| 501 |
Click here for detailed information about this class on phpclasses.org
Class
The Abstract Thread Communication Class
Class
Flat File Communication Class
Class
Using MySql Heap Engine to communicate between Threads
Class
The Ajax Thread Calling class
Class
The abstract class for calling threads
Class
Cli Thread Calling (Shell Calling)
Doc.
Ajax Method Documentation
Example
First Example Counter Thread
Example
First Example File-writting Thread
Example
First Example Main Thread
Example
Second Example Counter Thread
Example
Second Example File-writting Thread
Example
Second Example Main Thread
Example
Third Example Main Thread
Example
Third Example File Parts Downloader Script
Example
Fourth Example Counter Thread
Example
Fourth Example File-writting Thread