Xacerbate is a real-time XSLT engine for linux, written in threaded C.
Features
- All-XML development: I/O, data storage and coding are all in XML, so there is no need to continually convert between XML and other formats.
- Data storage in XML: Eyeball the state of your virtual world at any time in XML; fix data integrity issues during testing with a text editor; turn off your database engine and save clock cycles, especially if your data involves a lot of hierarchies.
- Sandboxed code: The use of a virtual machine running XSLT provides a 'sandbox' that protects the machine running Xacerbate from many of the most common classes of exploit. For example, it is quite hard to code an SQL injection attack when the server is not running SQL.
- Code real-time applications in XSLT: XSLT is a W3C standard that is used widely for website creation. Xacerbate makes that same technology available for real-time applications such as chatrooms and virtual worlds that would otherwise need to be coded in java, perl or some other procedural language.
- Abstraction of socket and OS-level events: Xacerbate takes care of the low-level issues that can be time-consuming and error-prone to handle in application code. This lets the developer concentrate on the semantics of the application.
How it works
Xacerbate runs as a un*x daemon. Conceptually, it consists of two processes:
- an outer loop that handles sockets and OS-type events,
- an inner loop that processes and responds to outer loop events by running an XSL stylesheet
Input events that are generated by the outer loop and passed to the inner loop include
- Socket connections and disconnections
- Socket input
- Four levels of timer event
- Un*x signals (eg TERM)
Output events that are generated by the inner loop and passed to the outer loop include
- Requests to open and close socket connections
- Output to one or more sockets
- Modifications to data files
- Output to log files
The Xacerbate configuration specifies a list of files that Xacerbate can modify - these are the files used to store stateful data. Since XSLT is an XML vocabulary, Xacerbate can modify XSLT files, including XSLT files that it uses itself. It is thus potentially possible to modify the behaviour of Xacerbate in real-time without restarting the server. Xacerbate implements file cacheing to speed up file reading, and a DOM interface to allow the modification of specific data file nodes without recreating the entire data file.
Xacerbate also includes a number of namespaced extensions to XSLT 1.0, including the generation of unique identifiers across multiple parses of the stylesheet and perl-compatible regular expressions.
Status
At the time of writing (winter '09), Xacerbate is almost feature-complete and quite stable. The main feature still to be added is support for server to server socket connections. We then expect the focus for Xcruciate development to shift to applications that depend on Xacerbate, such as Xiguous and Xcathedra.
