Welcome!

Industrial IoT Authors: Elizabeth White, Kevin Jackson, Chris Colosimo, Pat Romanski, Liz McMillan

Related Topics: Industrial IoT

Industrial IoT: Article

Combining XQuery and Web Services

Combined entities can lead to sophisticated solutions

The XML world is driving new emerging technologies that can be utilized to provide solutions to a variety of problems. This article focuses on two of these technologies: Web services and XQuery. As separate entities, these technologies provide a powerful set of features; but when combined they have the potential to present ever more sophisticated feature sets designed for very specific goals.

Web services, while not strictly an XML technology, depends heavily on XML for both its definition language, Web Services Description Language (WSDL), and its messaging protocol, Simple Object Access Protocol (SOAP). Alongside its various descendants, WSDL itself builds on previous XML technologies, such as XML Schema, to provide an abstraction layer over which service endpoints can be defined in terms of messages and operations. Similarly, SOAP provides a mechanism for issuing remote procedural calls and document transactions between distributed systems.

Correspondingly, XQuery provides a rich, data-oriented language for interacting with XML and XML-mapped data sources. It builds on existing XML technologies such as XPath and XML Schema to provide a unified query language over both weakly typed (streams, Web sites) and strongly typed (databases, messages) XML sources. Unlike other query languages, such as SQL, it is intended to not only be a database query language, but a general language for natively interacting with XML as well.

Both technologies have starring roles in new methodologies for solving old problems. Service-oriented architecture (SOA) promises to open up all of the applications in the enterprise via Web services. With it, application developers can build new applications from the functions and features of existing applications. Enterprise Information Integration (EII), utilizing XQuery, makes a similar promise: to present a single front end to all of the databases and data sources available on the network. In both cases, the goal is to bring together the processes and data we interact with individually in a manner that reduces the amount of custom mapping required for each source.

Our ultimate goal herein will be to demonstrate how Web services and XQuery combined can ease the task of developing applications on top of heterogeneous distributed systems. Essentially, we're looking to these technologies to hide all of the differences between the systems with which we wish to interact and allow developers to concentrate on the applications being developed.

Integrating XQuery with Web Services
Whether you look at adding XQuery to Web services or Web services to XQuery, the respective technology will gain something it did not previously have. On one hand XQuery, a language intended to manage, restrict, and combine static data from multiple sources of data (relational databases, XML databases, static Web content), can simplify interactions with XML-based Web services. On the other hand, Web services open XQuery up to more sophisticated interactions with systems outside its local scope. By combining XQuery and Web services, XQuery receives a new interaction model with external sources and Web services along with a sophisticated language for handling its input and output.

To illustrate just one possibility offered by the interaction, consider the following scenario. Super Travel Agency (STA) wishes to present a new feature on its Web site, awarding its repeat customers with fare estimates based not only on best fares but on their participation in frequent flyer programs. STA has a complete customer database with profiles listing their frequent flyer codes for each airline. For this system, STA needs to interact with the airlines via Web services that are defined using completely different result formats.

This fairly straightforward usecase can be accomplished in a discrete series of steps. First, the user profile is accessed and the relevant frequent flyer codes extracted. Combining these codes with destinations and dates, we then pass them to the appropriate airline services and receive a quote from each in a different XML format. We then have to define either a transformation or a custom extraction routine to extract the prices. Finally, we have to take this correlated data and produce a single report for consumption by the client.

In traditional modern programming languages, this problem could be solved by defining a number of discrete modules. One module would access and interpret the client database result, one would be defined for interacting with each airline Web service, one each for the extraction routines to parse the XML results and extract the relevant information, and finally a module for generating the final report. All of the interactions are defined in terms of XML messages, but given the disparate requirements of each such message format the solution will typically have to define a number of custom parsers to convert in and out of the data-oriented XML and object-oriented language paradigms. Simply put, this requires specialized coding and, while extensible, usually requires much more code to integrate new airlines and new client profiling data.

By allowing existing WSDL definitions to be referenced in the query and their services exposed as standard XQuery functions, the steps followed to achieve the solution can be more concise using XQuery. The simplicity is achieved by leaving the entire sequence of interactions in the XML world and taking advantage of XQuery's rich set of features for dealing with XML data to seamlessly interact with all of the various data and function points.

In order to facilitate this interaction between XQuery and Web services, we'll employ an extension to the XQuery language. This syntax parallels the built-in schema import facility in XQuery and was first proposed in XQuery at your Web service. We'll see below how it allows the query author to specify the services to be used in the query by simply importing the WSDL documents defining those services.

Bridging the Gap
In technology, gaps force us to build new technology to bridge disparate paradigms. XQuery sought to bridge the gap between modern programming languages and data. Web services sought to bridge the gap between those same programming languages and distributed processes. We've defined how to bridge the gap between XQuery and Web services; now in closing the gap between the posited airline scenario and the XQuery/Web services solution, we'll hopefully demonstrate how many of the gaps in existing solutions are now bridged.

Recall that the basic problem STA faced could be solved in a discrete series of steps. All steps essentially revolved around the disparate data requirements at each point in the interaction: the client, the database, and the airline services. We'll take each in turn and build up to a total solution. The inputs to our scenario are the client's identification ($client-id) and request parameters ($city and $date).

More Stories By Jeff Dexter

Jeff Dexter is the lead architect of XML Query technologies at Raining Data Corporation, and their representative on the W3C?s XML Query working group. Jeff has spent the last six years in the field of information aggregation and database query, specifically focusing on the realm of XML query at Raining Data. Jeff was the designer and main implementer of the TigerLogic 1.0 high-performance query engine, and the architect and principal engineer on the TigerLogic 2.0 data server.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


@ThingsExpo Stories
In his session at @ThingsExpo, Eric Lachapelle, CEO of the Professional Evaluation and Certification Board (PECB), will provide an overview of various initiatives to certifiy the security of connected devices and future trends in ensuring public trust of IoT. Eric Lachapelle is the Chief Executive Officer of the Professional Evaluation and Certification Board (PECB), an international certification body. His role is to help companies and individuals to achieve professional, accredited and worldw...
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm.
Your homes and cars can be automated and self-serviced. Why can't your storage? From simply asking questions to analyze and troubleshoot your infrastructure, to provisioning storage with snapshots, recovery and replication, your wildest sci-fi dream has come true. In his session at @DevOpsSummit at 20th Cloud Expo, Dan Florea, Director of Product Management at Tintri, will provide a ChatOps demo where you can talk to your storage and manage it from anywhere, through Slack and similar services ...
My team embarked on building a data lake for our sales and marketing data to better understand customer journeys. This required building a hybrid data pipeline to connect our cloud CRM with the new Hadoop Data Lake. One challenge is that IT was not in a position to provide support until we proved value and marketing did not have the experience, so we embarked on the journey ourselves within the product marketing team for our line of business within Progress. In his session at @BigDataExpo, Sum...
What sort of WebRTC based applications can we expect to see over the next year and beyond? One way to predict development trends is to see what sorts of applications startups are building. In his session at @ThingsExpo, Arin Sime, founder of WebRTC.ventures, will discuss the current and likely future trends in WebRTC application development based on real requests for custom applications from real customers, as well as other public sources of information,
SYS-CON Events announced today that SoftLayer, an IBM Company, has been named “Gold Sponsor” of SYS-CON's 18th Cloud Expo, which will take place on June 7-9, 2016, at the Javits Center in New York, New York. SoftLayer, an IBM Company, provides cloud infrastructure as a service from a growing number of data centers and network points of presence around the world. SoftLayer’s customers range from Web startups to global enterprises.
SYS-CON Events announced today that Ocean9will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Ocean9 provides cloud services for Backup, Disaster Recovery (DRaaS) and instant Innovation, and redefines enterprise infrastructure with its cloud native subscription offerings for mission critical SAP workloads.
SYS-CON Events announced today that Linux Academy, the foremost online Linux and cloud training platform and community, will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Linux Academy was founded on the belief that providing high-quality, in-depth training should be available at an affordable price. Industry leaders in quality training, provided services, and student certification passes, its goal is to c...
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 20th Cloud Expo, which will take place on June 6-8, 2017 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 add...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 20th International Cloud Expo, which will take place on June 6–8, 2017, at the Javits Center in New York City, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
SYS-CON Events announced today that Loom Systems will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Founded in 2015, Loom Systems delivers an advanced AI solution to predict and prevent problems in the digital business. Loom stands alone in the industry as an AI analysis platform requiring no prior math knowledge from operators, leveraging the existing staff to succeed in the digital era. With offices in S...
Keeping pace with advancements in software delivery processes and tooling is taxing even for the most proficient organizations. Point tools, platforms, open source and the increasing adoption of private and public cloud services requires strong engineering rigor - all in the face of developer demands to use the tools of choice. As Agile has settled in as a mainstream practice, now DevOps has emerged as the next wave to improve software delivery speed and output. To make DevOps work, organization...
SYS-CON Events announced today that T-Mobile will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on ...
SYS-CON Events announced today that Cloudistics, an on-premises cloud computing company, has been named “Bronze Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Cloudistics delivers a complete public cloud experience with composable on-premises infrastructures to medium and large enterprises. Its software-defined technology natively converges network, storage, compute, virtualization, and management into a ...
SYS-CON Events announced today that CA Technologies has been named “Platinum Sponsor” of SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY, and the 21st International Cloud Expo®, which will take place October 31-November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. CA Technologies helps customers succeed in a future where every business – from apparel to energy – is being rewritten by software. From ...
SYS-CON Events announced today that Infranics will exhibit at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Since 2000, Infranics has developed SysMaster Suite, which is required for the stable and efficient management of ICT infrastructure. The ICT management solution developed and provided by Infranics continues to add intelligence to the ICT infrastructure through the IMC (Infra Management Cycle) based on mathemat...
Now that the world has connected “things,” we need to build these devices as truly intelligent in order to create instantaneous and precise results. This means you have to do as much of the processing at the point of entry as you can: at the edge. The killer use cases for IoT are becoming manifest through AI engines on edge devices. An autonomous car has this dual edge/cloud analytics model, producing precise, real-time results. In his session at @ThingsExpo, John Crupi, Vice President and Eng...
In the enterprise today, connected IoT devices are everywhere – both inside and outside corporate environments. The need to identify, manage, control and secure a quickly growing web of connections and outside devices is making the already challenging task of security even more important, and onerous. In his session at @ThingsExpo, Rich Boyer, CISO and Chief Architect for Security at NTT i3, will discuss new ways of thinking and the approaches needed to address the emerging challenges of securit...
The taxi industry never saw Uber coming. Startups are a threat to incumbents like never before, and a major enabler for startups is that they are instantly “cloud ready.” If innovation moves at the pace of IT, then your company is in trouble. Why? Because your data center will not keep up with frenetic pace AWS, Microsoft and Google are rolling out new capabilities In his session at 20th Cloud Expo, Don Browning, VP of Cloud Architecture at Turner, will posit that disruption is inevitable for c...
There are 66 million network cameras capturing terabytes of data. How did factories in Japan improve physical security at the facilities and improve employee productivity? Edge Computing reduces possible kilobytes of data collected per second to only a few kilobytes of data transmitted to the public cloud every day. Data is aggregated and analyzed close to sensors so only intelligent results need to be transmitted to the cloud. Non-essential data is recycled to optimize storage.