Channels ▼

Web Development

Strengthening Service-Oriented Architectures (SOA) with Semantics

Semantics At Your Service

Semantic technologies capture meaning and employ it to ease communication between services. This meaning can be used to give richer descriptions at all levels of the SOA, from the underlying data to individual service descriptions to aggregate service descriptions. Semantic technologies can strengthen the SOA mission by absorbing and leveraging higher levels of complexity at every level. For example, semantic technology can organize data and processing to better reflect a person or a company -- the meaning forms complex, dynamic concepts beyond other methods.

In the case of computers, the use of the term semantics can easily be confused with human understanding, but make no mistake: computers using semantic technologies do not understand anything. Computers simply process information -- but if the information is represented in such a way that it is imbued with more of it's meaning, then computers can act upon that information. For example, a series of statements and data structures in a programming language may capture the approval process of a loan application. In a sense, the programming code captures the meaning behind the approval and denial of a loan. A programmer carved the business meaning directly into code. However, the computer system executing that code has no conception of the higher level task it is accomplishing -- it has no way of representing the idea of a loan application. Likewise a database programmer can design database tables and columns to achieve similar results, thereby encoding the business logic into the data representation. The meaning is in there -- but not well organized or abstracted. The fact remains that it might be theoretically possible to extract the semantics of loan approval from the code and associated databases, but it is not cohesive or easy to identify. You can't easily find, organize, and distinguish the meaning parts from other coding parts, the meaning get tightly coupled with the program logic and database schemata. Where do you go if the loan procedure changes? Is the meaning consistent? When an error occurs, where is the culprit? These questions quickly haunt complex SOA solutions, and result in systems that that tend to scatter meaning and lose their ability to adapt.

Luckily, other technological forms of semantic representation exist that offer a range of expressivity or meaning capture that better serves these challenges. Now you might think the right choice of semantic technology for your applications would be the most expressive and sophisticated one available, such as first order logic or even richer forms. However, oftentimes the more complex a representation is, the more difficult it is to use. The harder a technology is to use, the less widely it is adopted. And less adoption means failure when SOA solutions attempt to span the globe. Large scale SOA is a critical mass solution. What is needed is a flexible approach that balances complex expressivity with ease-of-use participation. Albert Einstein famously said that "Everything should be made as simple as possible, but not simpler." A prominent Semantic Web researcher, Dr. Jim Hendler, was quoted as saying something that could be thought of as a corollary: "A little semantics goes a long way". This level of information representation that is richer than traditional data models but still designed for Web-scale performance is a perfect fit for Semantic Web technologies. The Semantic Web represents meaning as a directed graph of binary relationships between resources. That is, one resource is related to another resource through a directed link called a predicate. A resource can represent anything, and need not be a web page or service. With respect to services, Semantic Web relationships can be thought of as falling into three relationship categories: instance relationships, structure relationships, and constraint relationships.

  1. Instance relationships such as 'John is friends with Mary'. These simply describe an association between two resources, also called instances. In this case, John and Mary are linked by the predicate is friends with. Without any additional information about the significance of the is friends with predicate, there is no implied structure or meaning beyond merely associating two resources with each other.
  2. Structural relationships such as 'John is a Person' and a 'Person is a Living Thing'. These provide structure to the instance data by assigning the resource John to be a member of the Person class and that the Person class is a subclass of the Living Thing class. Note that the relationship between Person and Living Thing is quite apart from the John instance. This allows quite a bit of flexibility and multiple perspectives on the same instance relationships.
  3. Constraint relationships such as 'Persons can only have friends with other Persons'. Essentially these relationships establish rules that better define the various classes. This allows a more fine grain capture of how to define a particular class such as Person.

The last two types of relationships enable tools called reasoners, to infer additional relationships or entailments regarding the provided statements. For example, a reasoner could infer that John is a Living Thing from statements in 2 above and that Mary is a Person from the statements in 1 and 3 above. This is very powerful because we see that the data itself generates additional data -- no human is required.

Several other traits of the Semantic Web are also important to keep in mind. First and foremost is that it is an accepted, open, W3C standard. This protects your investment in a semantic data model while also encouraging wide participation from a community of researchers and professionals to develop tools, methods, and even additional semantically-enabled data sources. Secondly, the Semantic Web is run-time dynamic. Semantic Web solutions can change structure and constraints at any time. This flexibility allows solutions to maintain constant alignment with the changing goals of a SOA solution or service. Lastly, the structure of the Semantic Web is completely independent from the instance data. Thus, structure can evolve independently from the instance data and multiple structures can simultaneously exercise the same instance data. The structure and constraints semantics emanate from the same language constructs as the instance data. There is no difference between information model underlying the three relationship categories. In contrast, relational databases have significant language differences between the structure or database schema and the instances or rows. This feature of Semantic Web systems allows a solution to explore the Semantic Web through structure, constraint, and instance patterns all expressed in the same language.

A collection of these semantic statements containing instances, structure, and constraints offer the ability to create and manage rich, complex semantics. We can apply these semantics directly to the challenges of SOA. Simply put the Semantic Web cohesively forms meaning above and beyond the syntax offered by SOA and helps form a cohesive approach to meaning throughout SOA. So, how does this help?

  • Knowledge-based SOA Services: Services that directly participate in a SOA can use semantic technologies to take advantage of the inference and enhanced information representation to ferret out patterns and relationships more efficiently than with other data techniques. These results can serve the SOA in two ways -- indirectly by simply providing an answer while keeping the semantics embedded or directly providing the actual relationship graph or meaning for other knowledge-based services to consume. This extends the data capabilities of the SOA by direct incorporation of knowledge services. Simply put, semantic services provided by the Semantic Web are perfectly compatible with SOA.
  • Flexible and Adaptive SOA Service Composition: SOA services can contribute to a larger solution in both a specific and an abstract form. The specifics are the various methods and data that form an exchange between services. The abstraction is the high-level business utility of the service -- the concept above all the technology. The Semantic Web can unite both forms and keep them in step. Thus, a service can select the technical specifics to maintain a conceptual, dynamic business priority. This also allows abstract service composition that maintains the specifics needed to get the job done without being bound to those details. Semantic service composition can achieve higher-level business sequencing by chaining together services that follow the business meaning and thus allow run time changes. It also offers promise for automatic composition where services seek out additional required services. Additionally, service composition could improve performance and availability by chaining together similar services and making resource allocations based on the current business priorities. The capturing of the composition in one standard form allows easy changes and easy recognition of any faults.
  • Service and Data Integration: Since the semantic concepts can represent many various formats and forms of technology, it serves to more gracefully integrate services and data. Integration requires varying degrees of equivalence ( a type of relationship) from making two different XML equivalent to making complex procedures equivalent. Additionally, integration is often thought of as unifying two technologies but it is also unifies people to technologies. Semantics can build the customized perspectives necessary for effective, customized human interactions.
  • Improved Data Exploitation: Semantic reasoning can infer missing pieces, expand conceptual perspectives, and identify critical flaws. This amplifies and extends the information to produce more useful results. Reasoning can identify commonality such as the Living Thing example above. Reasoning can detect simple and complex data inconsistencies and conflicts. This can help maintain high integrity across the SOA. Additionally, the nature of semantics allows a decoupling of structural information from instance information. This permits multiple interpretations of data and variable levels of integrity and quality. Although a SOA could maintain an absolute truth it doesn't need to -- this is especially critical when dealing with large systems that might never agree on anything that is absolute.

We now help illustrate those semantic enhancements in four examples. Two examples illustrate SOA-izing your Semantics by adding semantic services to a SOA solution and two illustrate Semantic-izing your SOA through adding semantic capability to fundamental SOA design constructs.

Related Reading

More Insights

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.