Welcome!

Machine Learning Authors: Pat Romanski, Liz McMillan, Yeshim Deniz, Elizabeth White, Zakia Bouachraoui

Related Topics: Microservices Expo, Industrial IoT

Microservices Expo: Article

SOA with Document-Centric XML Processing

This article introduces the concept of document-centric XML processing and a set of emerging document-centric capabilities

This article introduces the concept of document-centric XML processing and a set of emerging document-centric capabilities such as cutting, splitting, and splicing documents at the byte level. It also explains how it solves one of the most fundamental technical issues hampering enterprise SOA and XML application development: the redundant serialization and de-serialization of object-oriented XML processing models such as DOM.

Public Enemy #1: DOM's Problem of Modifying XML
If a DOM-based application modifies a particular text node of an XML document, the following steps are needed to accomplish that:

  1. Decode characters
  2. Create string objects by taking apart the input document
  3. Allocate node objects to build the DOM tree
  4. Navigate to the text node (manually or by XPath)
  5. Attach a new text node
  6. Encode characters
  7. Byte concatenation
  8. Garbage collecting node and string objects

If you focus on the objective, I think many readers will realize that the process outlined above doesn't really make sense. It is, in fact, absurd. DOM processing incurs at least the following three round-trip overheads in those steps:

  • Every time a character is decoded, it eventually needs to be encoded again.
  • Every time a document is taken apart of any change, it needs to be put back together (by concatenation).
  • Every time an object (e.g., strings, nodes, etc.) is allocated, it will eventually go out of scope and be garbage collected.

Because those round-trips pretty much restore the document to the original state, they are nothing but a waste of CPU cycles and memory. Notice that modifying a text node can be done far more efficiently by humans using a text editor. To edit a text node, just open the document with NotePad, move the cursor to the text node, make the change in-place, and save it. This time, the update is "incremental," meaning it does not touch irrelevant parts of the document. If we, humans, can edit XML like this, why can't XML parsers?

To me, the answer to this question reveals some of the deep-rooted technical problems in software development today. Below are some of my observations on this topic:

  • It significantly impacts your application performance: When applications process XML in a read-only fashion, the base-line performance is decided by XML parsing. If applications both read and write XML data, the base-line performance is typically cut in half (as serialization and de-serialization are equal in performance).
  • It is a common, but deep, problem: Have you wondered, given that XML is ubiquitous, why nobody seems to be complaining? One way to look at this is since this is the way things have always been, everyone seems to get used to it. To make matters worse, solutions don't exist to make the problem look obvious. We end up with a ubiquitous issue that is surprisingly non-obvious and from which there is almost no escape.
  • Hidden from OO perspective: If you live in a pure OO world, the redundant de-serialization/serialization process - the textbook approach of XML processing - is very much the right thing to do. This problem is again hidden.

More Stories By Jimmy Zhang

Jimmy Zhang is a cofounder of XimpleWare, a provider of high performance XML processing solutions. He has working experience in the fields of electronic design automation and Voice over IP for a number of Silicon Valley high-tech companies. He holds both a BS and MS from the department of EECS from U.C. Berkeley.

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.


CloudEXPO Stories
Every organization is facing their own Digital Transformation as they attempt to stay ahead of the competition, or worse, just keep up. Each new opportunity, whether embracing machine learning, IoT, or a cloud migration, seems to bring new development, deployment, and management models. The results are more diverse and federated computing models than any time in our history.
On-premise or off, you have powerful tools available to maximize the value of your infrastructure and you demand more visibility and operational control. Fortunately, data center management tools keep a vigil on memory contestation, power, thermal consumption, server health, and utilization, allowing better control no matter your cloud's shape. In this session, learn how Intel software tools enable real-time monitoring and precise management to lower operational costs and optimize infrastructure for today even as you're forecasting for tomorrow.
"Calligo is a cloud service provider with data privacy at the heart of what we do. We are a typical Infrastructure as a Service cloud provider but it's been designed around data privacy," explained Julian Box, CEO and co-founder of Calligo, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Isomorphic Software is the global leader in high-end, web-based business applications. We develop, market, and support the SmartClient & Smart GWT HTML5/Ajax platform, combining the productivity and performance of traditional desktop software with the simplicity and reach of the open web. With staff in 10 timezones, Isomorphic provides a global network of services related to our technology, with offerings ranging from turnkey application development to SLA-backed enterprise support. Leading global enterprises use Isomorphic technology to reduce costs and improve productivity, developing & deploying sophisticated business applications with unprecedented ease and simplicity.
While a hybrid cloud can ease that transition, designing and deploy that hybrid cloud still offers challenges for organizations concerned about lack of available cloud skillsets within their organization. Managed service providers offer a unique opportunity to fill those gaps and get organizations of all sizes on a hybrid cloud that meets their comfort level, while delivering enhanced benefits for cost, efficiency, agility, mobility, and elasticity.