:: Demaq: Declarative Messaging and Queuing
Abstract
The Web is rapidly developing from a one-way medium into an active distributed system, where the participating nodes asynchronously communicate via XML messages.
Examples for "Active Web" applications include event notification using RSS/Atom feeds, business process automation using Web Services, and new end-user interface
architectures such as AJAX.
The goal of the Demaq project is to provide a platform for the efficient development of reliable, high-performance applications for the "Active Web".
The Demaq architecture is based on the foundation of native XML message queues that allow for efficient and reliable message handling.
Directly operating on messages and queues, application programs are specified using the declarative application language QRL with allows for the convenient processing of XML data.
![]() |
Structure of a Demaq application |
Detailed Description
Today's systems usually implement web service protocols as an additional tier on top of existing middleware solutions, further aggravating the problem of complexity and poor integration that already plagues these systems: Typically, the actual business processes are specified using imperative, high-level languages such as Java, C# or C++. An external call to such a web service travels through the various layers: The XML-based web service invocation is transformed into the middleware's representation, again transformed into the programming language's representation, with further transformations thrown in as other components such as relational DBMSs are accessed. Delivering the result requires a reverse traversal of this "transformation chain". This not only hurts performance, but also reduces developer productivity, because each layer requires at least some separate design and coding that is not related to the actual application domain. The interaction of various configuration options and code fragments is difficult to understand, optimize, and maintain.
![]() |
Overview of the Demaq runtime system |
The Demaq project aims at tackling these problems by providing an infrastructure for declarative XML message processing. Driven by the asynchronous processing model characteristic for active web applications such as Web Services, our architecture relies on reliable XML message queues that are integrated into the Natix data store. Applications are specified using the declarative programming language QRL which is based on the XQuery Update Facility and incorporates extensions for efficiently performing queue-related access and update operations. Remote communication facilities and system services such as timers are also modeled as message queues. This greatly reduces the number of primitives in the language and makes it easier to understand and use.
System Documentation
In addition to the publications (see below) that discuss fundamental concepts and Demaq-related research topics, this section provides additional manuals and documentation about the Demaq queue and rule language, the runtime system and compiler internals.
- Demaq System Documentation and User Manual (by Alexander Böhm, last updated 2010-03-08).
- Realisierung von Workflowpatterns in Demaq (by David Kaul, in german).
- Integration eines relationalen Datenbanksystems als Nachrichtenspeicher in das Demaq-Ausführungssystem (by Dennis Knochenwefel, in german).
- Ein Debugger für Demaq (by Martin Kremer, in german).
- Design und Implementierung eines Modulkonzepts für Demaq (by Andreas Krämer, in german).
Source Code
The source code of the Demaq system is available under the Apache License, Version 2.0. The code was tested on various MacOS and Opensuse versions. Currently, Demaq relies on a extended version of the Natix database management system as the underlying message store. A corresponding binary release of Natix (tested on Opensuse Linux 11.1) is available below. Natix builds for other Linux versions or MacOS X can be provided upon request.
- Demaq system source code, version 1.0, revision 2531 (last updated 2010-03-09) .
- Natix Library with Queuing Extensions (Opensuse 11.1) , version 2.1.1 (last updated 2010-03-09) .
- Quick Installation and Build Instructions.
Demaq Visual IDE
Erich Marth has created a visual IDE for developing and debugging Demaq applications. The source code of the Demaq Visual IDE is available under Version 3 of the GNU General Public License. The code was tested on various MacOS and Opensuse versions.
Example Applications
TPC-App
This application is a Demaq implementation of the Transaction Processing Performance Council's application server system benchmark TPC-App.
- Demaq application specification (DQL)
- Distributed versions of the Demaq application specification to run fragments of TPC-App on 2,3 or 4 machines in parallel for increased performance
- Workload driver script, workload generator and Toxgene templates to generate messages for application testing and performance evaluation
Online shop
This example application model a simple online shopping application where customers may buy books and music.
- Demaq application specification (DQL)
- Equivalent application specification in Business Process Execution Language (BPEL)
- Interface Definition in WebService Description Language (WSDL)
- XML Schema definition of message types (XSD)
- Toxgene Templates to generate messages conforming to the schema definition for application testing
Publications
A list of Demaq-related publications is available on our list of publications.
Contact
For questions regarding Demaq please contact Carl-Christian Kanne or Alexander Böhm.

