Navigation
MXit Application Manager
The Intermediate Representation (henceforth ‘IR’) is a markup language which is used to store content generated by the MXit application creation website. It does this by storing each content item under a tag of our choosing. Since we are using custom tags in these files, it makes sense to use XML as the markup language.
The Content Database is used to store data taken from files generated using the Application Creator website. It exists as a means to organise this data in a way that is convenient for the application manager to read and process.
The MXit Application object stores all the content and content structures for a single MXit application.
It also contains the functions to send and receive messages to and from MXit users and perform message
processing. It contains a driver function which gets called by the MXit application manager. The work
order of this driver function is as follows:
- Initialise conversations in conversation map to ready state. This map stores the ongoing conversation between this application and the MXit users which are conversing with it.
- Check the alerts timers of each container screen to see if they have expired. If an alert has expired, the container screen and any item screens which it contains are made accessible to MXit users.
- Get received messages from the MXit client and push them onto the application’s message queue.
- Process each message in the message queue. This is done in two steps: first, the input message is evaluated to determine what action to perform; second, a response message is constructed and transmitted to the relevant MXit user.
The MXit application manager is the workhorse of the system. It contains a handle to the content
database, as well as an array of MXit Application objects. It contains a main loop which executes
continuously until a signal is sent to shut the system down. The work order of the application manager
is as follows:
- Initialise application manager.
- Create the database and database tables.
- Main loop (iterates continuously until a shutdown signal is received):
- Once every X seconds, check for newly created applications, parse them and store them in the database and initialise a new MXit Application object for each new application found.
- For each MXIT Application in the application array, call the application’s main driver function.
- Close database.
- Shut down application manager.