Xortoth is the middleware for the centralised/distributed data storage model of the Chemical Resource Kit. It is important to note that it is in fact optional; by default, Xykron will setup a local Realm in the user's home directory. Any number of remote Xortoth Realms can be used in addition to this.

Although the casual user should not be concerned with Xortoth initially, there are several advantages to using it:

  • Network centralisation: Although it is possible to share "local" files on a network shared directory, this is inefficient and less reliable. Using Xortoth, all data access is XML/HTTP traffic.
  • Scalability: The local file access mechanism involves loading and saving a number of .xml files, which can become quite large. The database model, however, breaks them down into much smaller pieces for stores them hierarchically. Multiple user programs can be working on the same part of a data tree without impacting performance.
  • Reliability: Using a database back-end tends to be less prone to accidental loss, and more amenable to systematic backups.
  • Security: Local files are useable by anyone who can gain access to them. Xortoth implements a [currently partially complete] simple security model which allows access to certain regions of data to be specified.
  • Additional features: Perhaps most importantly, Xortoth is a necessary prerequisite for the task scheduling mechanism, which does not work with local files. The Xuru program is capable of hooking into a Xortoth Realm and running preordained computational tasks in the background.


Xortoth is nominally the middleware programs which run under the aegis of the Apache web server. The means of passing messages is the Question/Answer format, whereby a client program (such as Xykron, Xentark or Xuru) sends an XML document to Xortoth via HTTP. The middleware then interprets this "question", and reacts to it appropriately, return an XML document as the "answer".

The local file access which is embedded within Xykron and other programs in the suite simulates the same protocol, albeit with a limited featureset.

The details of this protocol are described later in the technical section.


The present incarnation of Xortoth is written in PHP4, and consists of one main file and several include files. In order to run, the scripting language must be installed with XML DOM and MySQL database support.

There are presently some plans to implement a thin client version of Xortoth, but before that time the middleware may be written using a more rigorous object oriented language, but this may be sometime in the future.


MySQL is used as the database layer. The data schema has been kept very simple by design. Concurrency is handled by using table locks on non-transactional tables, which presents a potential scalability issue, but is not likely to be a problem until very large data loads are used. In the future, a transactional approach will likely be used.

Modifying Xortoth to use a different database would most likely be quite simple.

Prev: Analysing Results Back to Contents Next: Protocol