TL;DR: XRPC is proposed, a minimal XQuery extension that enables distributed yet efficient querying of heterogeneous XQuery data sources and provides formal semantics for XRPC that encompasses execution of both read-only and update queries.
Abstract: We propose XRPC, a minimal XQuery extension that enables distributed yet efficient querying of heterogeneous XQuery data sources. XRPC enhances the existing concept of XQuery functions with the Remote Procedure Call (RPC) paradigm. By calling out of an XQuery for-loop to multiple destinations, and by calling functions that themselves perform XRPC calls, complex P2P communication patterns can be achieved. The XRPC extension is orthogonal to all XQuery features, including the XQuery Update Facility (XQUF). We provide formal semantics for XRPC that encompasses execution of both read-only and update queries.
XRPC is also a network SOAP sub-protocol, that integrates seamlessly with web services and Service Oriented Architectures (SOA), and AJAX-based GUIs. A crucial feature of the protocol is bulk RPC, that allows remote execution of many different calls to the same procedure, using possibly a single network round-trip. The efficiency potential of XRPC is demonstrated via an open-source implementation in MonetDB/XQuery. We show, however, that XRPC is not system-specific: every XQuery data source can service XRPC calls using a wrapper.
Since XQuery is a pure functional language, we can leverage techniques developed for functional query decomposition to rewrite data shipping queries into XRPC-based function shipping queries. Powerful distributed database techniques (such as semi-join optimizations) directly map on bulk RPC, opening up interesting future work opportunities.
TL;DR: A polynomial time algorithm is proposed for the problem of local consistency of a policy, that is, for deciding the non-existence of a sequence of authorized update operations starting from a given document that simulates a forbidden update operation.
Abstract: We propose a model for XML update primitives of the W3C XQuery Update Facility as parameterized rewriting rules of the form: "insert an unranked tree from a regular tree language L as the first child of a node labeled by a". For these rules, we give type inference algorithms, considering types defined by several classes of unranked tree automata. These type inference algorithms are directly applicable to XML static typechecking, which is the problem of verifying whether, a given document transformation always converts source documents of a given input type into documents of a given output type. We show that typechecking for arbitrary sequences of XML update primitives can be done in polynomial time when the unranked tree automaton defining the output type is deterministic and complete, and that it is EXPTIME-complete otherwise.We then apply the results to the verification of access control policies for XML updates. We propose in particular a polynomial time algorithm for the problem of local consistency of a policy, that is, for deciding the non-existence of a sequence of authorized update operations starting from a given document that simulates a forbidden update operation.
TL;DR: It is established that without constraints, all view updates are uniformly translatable and the translation is tractable, and a reasonable restriction on update programs for which uniform translation with constraints becomes possible is introduced.
Abstract: We study the problem of update translation for views on XML documents More precisely, given an XML view definition and a user defined view update program, find a source update program that translates the view update without side effects on the view Additionally, we require the translation to be defined on all possible source documents; this corresponds to Hegner's notion of uniform translation The existence of such translation would allow to update XML views without the need of materializationThe class of views we consider can remove parts of the document and rename nodes Our update programs define the simultaneous application of a collection of atomic update operations among insertion/deletion of a subtree and node renaming Such update programs are compatible with the XQuery Update Facility (XQUF) snapshot semantics Both views and update programs are represented by recognizable tree languages We present as a proof of concept a small fragment of XQUF that can be expressed by our update programs, thus allows for update propagationTwo settings for the update problem are studied: without source constraints, where all source updates are allowed, and with source constraints, where there is a restricted set of authorized source updates Using tree automata techniques, we establish that without constraints, all view updates are uniformly translatable and the translation is tractable In presence of constraints, not all view updates are uniformly translatable However, we introduce a reasonable restriction on update programs for which uniform translation with constraints becomes possible
TL;DR: XRPC is demonstrated, a minimal XQuery extension that enables distributed querying between heterogeneous XQuery engines and is fully implemented in the open-source MonetDB/XQuery engine, and is demonstrated here to co-operation with Saxon, Galax and X-Hive through the XRPC wrapper.
Abstract: We demonstrate XRPC, a minimal XQuery extension that enables distributed querying between heterogeneous XQuery engines. The XRPC language extension enhances the existing concept of XQuery functions with the Remote Procedure Call (RPC) paradigm. XRPC is orthogonal to all XQuery features, including the XQuery Update Facility (XQUF). Note that executing xquf updating functions over XRPC leads to the phenomenon of distributed transactions. XRPC achieves heterogeneity by an open SOAP-based network protocol, that can be implemented by any engine, and an XRPC Wrapper that allows even XRPC-oblivious XQuery engines to handle XRPC requests efficiently. XRPC is fully implemented in the open-source MonetDB/XQuery engine, and is demonstrated here to co-operate with Saxon, Galax and X-Hive through the XRPC wrapper.This demonstration will focus on the following features of XRPC: (i) glue-less interaction between AJAX style webbased applications with XQuery databases thanks to the SOAP-based nature of the XRPC network protocol, (ii) the efficiency of XRPC communication also for voluminous interserver communication thanks to the Bulk RPC feature that optimizes network communication and exposes set-at-a-time opportunities to the underlying XQuery engines, (iii) the interoperability between different XQuery engines that can handle both distributed transactions (both read-only requests and updates) (iv) support and performance trade-offs of two different isolation levels for distributed transactions among different XQuery engines.
TL;DR: This paper presents a technique, so-called structural bulk updates, that works in concert with the XQuery Update Facility to support efficient updates on the Pre/Dist/Size encoding and demonstrates the benefits in a detailed performance evaluation based on the XMark benchmark.
Abstract: In order to manage XML documents, native XML databases use specific encodings that map the hierarchical structure of a document to a flat representation. Several encodings have been proposed that differ in terms of their support for certain query workloads. While some encodings are optimized for query processing, others focus on data manipulation. For example, the Pre/Dist/Size XML encoding has been designed to support queries over all XPath axes efficiently, but processing atomic updates in XML documents can be costly. In this paper, we present a technique, so-called structural bulk updates, that works in concert with the XQuery Update Facility to support efficient updates on the Pre/Dist/Size encoding. We demonstrate the benefits of our technique in a detailed performance evaluation based on the XMark benchmark.