WAQL-PP: Preprocessor for a Data Aggregation Query Language

This week I started to design and implement a preprocessor for the Web-service Aggregation Query Language (WAQL) which is an extension of XQuery. This language is used as part of the WS-Aggregation framework developed at the Distributed Systems Group of the Vienna University of Technology. With this text I want to explain the motivation behind WAQL and how the preprocessor will be designed. The motivation is nicely stated as part of my task description.

The key idea of WAQL is that it provides a convenience syntax for XQuery, which otherwise tends to become complex and hardly comprehensible in bigger scenarios. WAQL queries are transformed into valid XQuery expressions, which are finally executed by a (third-party) XQuery engine.

First of all we need to get a grasp of what the WAQL extensions to the XQuery language are. Since WAQL is still in its experimental stages, there is no exact specification of the language and it may change or grow over time. At the moment WAQL consists of two language constructs:

  • Template Lists: This extension tries to simplify the specification of generated inputs. It basically is syntactical sugar representing a XQuery for-loop construct and as such can be transformed easily.
  • Data Dependencies: This second extension is the interesting one, it can express dependencies between several different queries. The framework has to identify these dependencies and execute the queries in a valid order, so that all dependencies can be resolved.

The above two constructs should explain why the actual transformation has to be split into several phases which can be triggered by the framework at different points in time. The separate steps the preprocessor has to perform are as follows:

  1. Parsing: The textual WAQL query is parsed and an intermediate representation is constructed. Since WAQL is an extension which enhances the set of expressions for the XQuery language, the actual parser has to understand the full XQuery grammar. This may sound like a lot of work, but the XQuery specification provides a detailed description of the grammar in about 140 EBNF rules. So defining a valid parser is a doable job.
  2. Resolving of data dependencies: At this point the preprocessor has generated a list of all unresolved data dependencies. However the preprocessor has no idea which other queries are linked to the one currently being processed. So the actual resolving has to be done by the framework, the preprocessor just adapts the intermediate representation to the data provided by the framework.
  3. Transformation: Once all dependencies have been resolved the intermediate representation can be transformed back into a textual XQuery (without any WAQL extensions), which can then be passed on to a third-party XQuery engine.

Now that the basic operations are defined, we are able to give a rough description of the WAQL preprocessor and how it can be embedded into the existing framework. The two basic modules are a generated parser (obviously performing the parsing step) and a driving engine (performing the resolving and transformation steps). The parser will most certainly be generated using the JavaCC parser generator. The below graphic should explain the architecture.

Architecture of the WAQL preprocessor

Note that the above explanation is written from the compiler-constructor point of view, it just covers the preprocessor as part of the framework. All the other nasty details of WS-Aggregation are beyond the scope of this text. If you are interested you should read the paper or contact Waldemar Hummer who was kind enough to explain it to me. Also I will continue to write about the ongoing development of the preprocessor, so stay tuned.

Update: This text was crossposted to the DSG Praktika Blog as well.

great analysis , very

great analysis , very informative


[...] post:  WAQL-PP: Preprocessor for a Data Aggregation Query Language … By admin | category: VIENNA University of Technology | tags: distributed, language, [...]

Magnificent goods from you,

Magnificent goods from you, man. I've take note
your stuff previous to and you are just extremely excellent.
I actually like what you've received right here, really like what you are stating and the best way through which you say it.
You are making it enjoyable and you continue to care for to keep it smart.
I can not wait to learn much more from you.
That is actually a wonderful website.

So I just behave for

Now are you talking about the

Now are you talking about the WAQL-PP.2.0 processor or the Vienna University technology professors?

This is a fantastic website

This is a fantastic website and I can not recommend you guys enough.

Hello mates, how is all, and

Hello mates, how is all, and what you want to say about this piece of writing,
in my view its actually remarkable designed for me.

whoah this blog is wonderful

whoah this blog is wonderful i love reading your posts.
Keep up the good work! You already know, many individuals
are looking round for this info, you can help them greatly. https://angel.co/u/james-land-1

Cégvásárlás iránt érdeklődők

Cégvásárlás iránt érdeklődők és befektetők számára dealmarket eladó cégek listája adatbázis.

A fantastic source of

A fantastic source of information. Thank you for taking the time to address this; I have strong feelings about it and would like to learn more about it.

Great read. Thanks for

Great read. Thanks for sharing this information.

Nice replies in return of

Nice replies in return of this issue with solid arguments and explaining the whole thing regarding that.

Yeah, right? I love reading

Yeah, right? I love reading this too! so informational! IF you are looking for angels, take a look at our gallery of newborns! They are literally so adorable like an angel.
check us out at www.sanjosebabyphotos.com/

This is really informative.

This is really informative. Very helpful.

It's an amazing paragraph for

It's an amazing paragraph for all the online users; they will take benefit from
it I am sure.

I agree, the content was

I agree, the content was helpful, especially for developers.