Project overview
Project Members
   Andrew Maunder
   Reinhardt van Rooyen

Reinhardt van Rooyen

My part of the project included creating the X-Switch module and the PHP engine.


  • Create a system to provide context switching capabilities for any processing language
  • Produce a system that can control processing engines
  • Control the system resources used by the system and all the processing engines
  • Create a PHP processing engine that is persistent and interacts with the X-Switch system
  • Evaluate the feasibility of such a system

    Goto the
    Outcomes Page
    Future Work Page


The X-Switch system interacts with a Web server and provides users with the ability to run their own processing engines. The X-Switch system initialises a processing engine for each user if and when required. This engine is then responsible for processing all of the requests sent to it. The advantage that this holds over previous systems, it that it allows the user to process the request with the same permissions as the user. The processing engine can create files on the user's behalf, run scripts and programs that the user is allowed to run, interact with the user's private database and utilise all the resources available to that user. The X-Switch system architecture is described in the system overview section. The X-Switch system is primarily responsible for:

  • Creating processing engines for users
  • Sending request to processing engines
  • Controlling the system resources the system uses

The X-Switch system is the core of this project in that all other modules in this project interact directly with the X-Switch module.


The PHP engine provides an environment which keeps a PHP interpreter persistent. This reduces the overhead of initialising a PHP interpreter everytime a request has to be processed. The PHP engine listens for requests and once a request is received, executes the script that has been received.

The PHP processing engine architecture diagram is shown above. Once the engine is initialised, it listens for a request. If it gets a request, it analyses the request and initialises the environment in which the script will be executed. All variables required to successfully process the request are initialised. The script that was called is then loaded and executed. The results are passed back to the X-Switch sysem. The PHP engine then goes back into a listening mode until it gets another request to process.