From WebServices to SemanticWeb

Abstract

We are all facing the tendency of quick data explosion. But the nowadays the problem of storing the data is as urgent as the problem of sharing and communicating the data. Over the past years there have been developed several approaches to access the data and also provide a way to manipulate the data. SOAP services, RESTful services or LinkedData? Each of these approaches have proved to work under certain conditions very well but there is no universal solution. This presentation aims to open new views on widely used technologies to help to apply them more effectively.

Major features of SOAP and REST services

  • Application state and functionality is divided into resources
  • Every resource is uniquely addressable using a universal syntax for use in hypermedia links
  • All resources share a uniform interface for the transfer of state between client and resource, consisting of
    1. A constrained set of well-defined operations (HTTP GET, PUT, DELETE, POST)
    2. A constrained set of content types, optionally supporting code-on-demand (application/json, text/xml)
  • A protocol that is:
    1. Client/Server?
    2. Stateless
    3. Cacheable
    4. Layered

Re-use of common protocols

  • REST HTTP (authentication, content type negotiation, session support via cookies)
  • SOAP

The intend to implement this in SOAP independently to transport protocol led to:

  1. Either introducing authentication-related information into method calls:
    • addUser(AuthenticationToken token, User newUser);
  2. Or using using XML authentication ??

Linked information in REST

Clients start at a single resource such as the user resource that represents themselves, and navigate to location resources and other user resources.

Request: GET http://example.com/users

[{userId: 1}, {userId: 2}, ...]

vs

[{userId: "http://example.com/users/1"}, {userId: "http://example.com/users/2"}

In later case we do not need to construct URLs like http://example.com/users/{user}/ in our application making it service-location independent.

What is SemanticWeb?

Is HTTP is XML enough for computers to understand it? Have a look at example:

<body>
    <em>Address:</em> Bierkade 45<br/>
    <em>Mobile:</em> 06 21 38-02-44<br/>
</body>

For human being it is very easy to grab necessary information out of this, but for programs nearly not possible, as HTML describes how the information should look like.

Can we add semantic to HTML? As it was originally designed for presentation, there can hardly be any way to make computers to understand it. One can use classes:

<body>
    <em>Address:</em> <span class="address">Bierkade 45</span><br/>
    <em>Mobile:</em> <span class="mobile">06 21 38-02-44</span><br/>
</body>

or RDFa http://www.w3.org/TR/xhtml-rdfa-primer/ vCard http://www.w3.org/TR/vcard-rdf/

<body xmlns="http://www.w3.org/1999/xhtml"
      xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
      xmlns:v="http://www.w3.org/2006/vcard/ns#"
      about="http://example.com/me/john"
      typeof="v:VCard">
 
    <em>Address:</em>
    <div rel="v:adr">
        <div typeof="v:Address v:Home">
            <span property="v:street-address">Bierkade 45/span>,
        </div>
    </div>
    <em>Mobile:</em>
    <div rel="v:tel">
        <div typeof="v:Tel v:Home">
            <span property="rdf:value">06 21 38-02-44</span>
        </div>
    </div>
</body>

but it looks a bit messy. Another alternative is XML, which was designed for data presentation:

<user id="1" name="John">
   <address>Bierkade</address>
   <house>45</house>
   <mobile>06 21 38-02-44</address>
</user>
<postalAddress street="Bierkade">
  <house number="45">
    <user id="1" name="John" />
  </house>
</postalAddress>

What problems we are facing when looking at these two XML samples, representing the same information (e.g. “John lives at Bierkade 45”):

  1. Are we talking about the same user and the same address? → There is no notion of “unique identifier”
  2. The structure the interpretation of XML is application dependant.
    Can we use the same approach (i.e. dictionary) to express relations? (e.g. “John lives at Bierkade 45” is the same as “Bierkade 45 is address for John”)

Triples as a way to represent the world

The example of how dossier changes. Table columns are changing type. Example: ranges. 1..2, 1 (1, 1) inclusive, exclusive 1..inf)

Good example of foaf vocabulary usage

programming/semantic_web/presentation.txt · Last modified: 2010/04/08 14:16 by dmitry
 
 
Recent changes RSS feed Driven by DokuWiki