XRX/XRX Application Server

From Wikibooks, open books for an open world
< XRX
Jump to: navigation, search

XRX as an Application Server[edit]

XQuery is a transform language in addition to a query language. Its original name was "Quilt" reflecting its ability to knit together different pieces of (XML) content.

This means that it is good at querying XML data from a data store and transforming it into an XHTML web page. Any XQuery-capable XML data store that accepts HTTP requests can talk to your web browser and send it an arbitrarily complex, valid (X)HTML document.

Here is a short example of how XQuery can transform XML database records into valid HTML:

 <customer><name>bob</name>  <orders><order qty="1">Jumbo Can SPAM</order></orders> </customer>

can be "transformed" to HTML:

 <div id='cust'> <b>bob</b> 
   Orders:
   <ul>
     <li>Jumbo Can SPAM (1)</li>
   </ul>
 </div>

with XQuery something like (not tested):

 let $customer := //customer[name='bob']
 return
 <div id='cust'> <b>{$customer/name/text()}</b>
   Orders:
   <ul>
   {
     for $o in $customer/orders/order
     return <li>{$o/text()} ({$o/@qty})</li>
   }
   </ul>
 </div>

Many free and commercial XQuery-enabled databases are available. They include: eXist, MarkLogic, Oracle, DB2, and xHive. eXist is free, and MarkLogic (and perhaps others) has a free community edition. Many if not all of them support HTTP requests, and therefore can be used as web/app servers.

eXist:

Although the eXist database was originally created to simply store XML data like a traditional database, the rich REST interfaces that have been added to eXist have transformed it into a web server. The eXist database is now able to provide a rich set of functions that are only available in other application servers. What remains is the application development standards that would allow a large number of people developing XRX applications to all work together.

MarkLogic:

MarkLogic is perhaps the most capable XML data management product at this writing. It combines XML/XQuery with text indexing and retreival, geospatial, alerting, and enterprise class scaling and performance.

xHive (or xDB):

xHive is a state-of-the-art native XML database with XQuery support, transaction control, extensive indexing features and top-class scalability.

Oracle, DB2:

Oracle and DB2 support XML by incorporating it as a large CLOB field, and support XQuery on this data.

XRX Application Server Vision[edit]

The XRX application server can now be set up to allow a wide variety of applications to be installed that all work together.


Back: Benefits of XRXNext: Building your First XRX Application