Linked services


Published on

Presentation on Linked Services for the 2nd Summer School on Service and Software Architectures, Infrastructures and Engineering

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

  • WSMO-Lite ontology of service semantics describes services for SWS automation
    SAWSDL puts pointers to WSMO-Lite semantics in WSDL
    MicroWSMO and hRESTS are lightweight equivalents for SAWSDL and WSDL for RESTful services

  • WSDL has more detail than our simplified service model, therefore there are more ways of attaching semantics. Information semantics can be anywhere in the schema inside the types section, functional semantics can be either on the interface (general, reusable) or on the service (specific), and nonfunctional parameters can be on a binding (general, reusable) or on the service (specific).

  • Lifecycle:
    Service provider creates the Web service, publishes its (WSDL) description in a registry (UDDI).
    A client discovers suitable Web services for its application.
    The client invokes the discovered service(s) as appropriate using SOAP.

  • Linked services

    1. 1. Linked Services Dr. Carlos Pedrinaci The Open University SSAIE 2010, Heraklion
    2. 2. Outline • Web Services or Services on the Web? • The Semantic Web and the Web of Data • Linked Services - Integrating Services with the Web of Data –Annotating WSDLs –Annotating Web APIs • Unified Discovery and Publication on the Web of Data
    3. 3. Preparation for Hands-On • The material shown in this session will be the basis for the hands-on session afterwards • You’ll need Firefox • Tabulator extension for Firefox –
    4. 4. Web Services or Services on the Web?
    5. 5. Web Services • Large number of standards and implementations – WSDL, BPEL, WS-Coordination, WS- Transaction, WS-AtomicTransaction, WS- (see Cesare’s presentation) “Despite their name,Web Services have nothing to do with the Web” Frank Leymann SSAIE 2009
    6. 6. Web Services on the Web • The Web currently contains 30 billion Web pages –Nearly 100M active sites –10 million new pages added each day • The Web contains only 28,000 WSDL Web services ( • Verizon have around 4,000
    7. 7. The Ecosystem of APIs and Online Data ©Siri (sligthly modified)
    8. 8. The Ecosystem of APIs and Online Data Over 2000 APIs and 4500 Mashups growing at accelerated rate... ©Siri (sligthly modified)
    9. 9. Bringing the Big Think to the Small Screen ©Siri
    10. 10. Semantic Web and the Web of Data
    11. 11. Semantic Web Principles • Lift data available on the Web to a level where machines can manipulate it in “meaningful ways” • Adding machine “understandable” annotations about Web resources • All resources are identified by URIs • Use of Web oriented modeling languages • RDF & RDFS • OWL (Lite, DL, Full) & OWL2 (EL, QL, RL) • Use of conceptual models (ontologies, vocabularies)
    12. 12. RDF • Resource Description Framework (RDF) is the HTML of the Semantic Web – Simple way to describe resources on the Web – Based on triples <subject, predicate, object> – Defines graphs
    13. 13. RDF Example
    14. 14. RDF Example
    15. 15. RDF Example
    16. 16. RDF Representation • Several available. Only standard RDF/ XML @prefix ex: <> @prefix dc: <> ex:Person a rdfs:Class. ex:Carlos a ex:Person. ex:Doc a rdfs:Class. ex:Slide rdfs:subClassOf ex:Doc. ex:this a ex:Slide. ex:this dc:hasCreator ex:Carlos. ...
    17. 17. Ontology and Rule languages • RDF Schema (RDFS) – A simple ontology language on RDF • Web Ontology Language (OWL) is a more expressive ontology language than RDFS – Layered language based on Description Logics • OWL Lite, OWL DL, OWL Full • OWL2 (EL, QL, RL) • Rule languages – Rule Interchange Format (RIF) – Extend ontology languages with axioms
    18. 18. SPARQL • Query language for RDF • Can be used to express queries across diverse data sources • SPARQL contains capabilities for querying required and optional graph patterns along with their conjunctions and disjunctions • The results of SPARQL queries can be results sets or RDF graphs
    19. 19. SPARQL Select Example PREFIX foaf: <> SELECT ?name1 ?name2 WHERE { ?x foaf:name ?name1 ; foaf:mbox ?mbox1 . ?y foaf:name ?name2 ; foaf:mbox ?mbox2 . FILTER (sameTerm(?mbox1, ?mbox2) && !sameTerm(?name1, ?name2)) }
    20. 20. SPARQL Construct Example PREFIX foaf: <> PREFIX vcard: <> CONSTRUCT { ?x vcard:N _:v . _:v vcard:givenName ?gname . _:v vcard:familyName ?fname } WHERE { { ?x foaf:firstname ?gname } UNION { ?x foaf:givenname ? gname } . { ?x foaf:surname ?fname } UNION { ?x foaf:family_name ? fname } . }
    21. 21. Linked Data • “Like the web of hypertext, the web of data is constructed with documents on the web. However, unlike the web of hypertext, where links are relationships anchors in hypertext documents written in HTML, for data they links between arbitrary things described by RDF. The URIs identify any kind of object or concept.” • Four basic principles: 1.Use URIs as names for things 2.Use HTTP URIs so that people can look up those names. 3.When someone looks up a URI, provide useful information, using the standards (RDF, SPARQL) 4.Include links to other URIs so that they can discover more things. Tim Berners-Lee -
    22. 22. Web of Data Source:
    23. 23. Linked Services Integrating Services with the Web of Data
    24. 24. Linked Services • Linked Services are Linked Data describing services • Their inputs, outputs, functionality, etc is described using RDF(S) and using existing vocabularies • Consume RDF and produce RDF • Process layer on top of the Web of Data
    25. 25. Lightweight Semantic Web Services • Existing approaches like OWL-S, WSMO are (perceived as) complex in terms of – Modeling and Computational complexity • Web APIs preferred over WSDL Web Services and SWS were up to now built on top of WSDL • Let's try to reduce the complexity – Based and built on top of RDF – Scale up computationally and promote the uptake – WSMO-Lite ontology • Let's support Web APIs as well
    26. 26. MicroWSMO & WSMO-Lite
    27. 27. Annotating WSDLs
    28. 28. SAWSDL in a Picture
    29. 29. SAWSDL Annotations • modelReference –points to a concept in a semantic model • loweringSchemaMapping • liftingSchemaMapping –point to data mapping transformation for data grounding
    30. 30. Lifting and Lowering Semantic level: Syntactic level:
    31. 31. WSMO-Lite in SAWSDL I B F N
    32. 32. Types of Service Semantics • Functional • Behavioral – What the service does – How the client talks to the service • Information model • Nonfunctional – For handling data – Policies, QoS, – Incl. lifting/lowering price, location etc.
    33. 33. Functional Semantics • For service discovery, composition F • Category – Functionality categorization – E.g. eCl@ss – Or tagging, folksonomies • Capability – Precondition, Effect – Needs using some rule language (WSML, RIF, etc)
    34. 34. Category Example wl:FunctionalClassificationRoot type ex:eCommerceService subclasses ex:Travel ex:Accommodation ReservationService ReservationService
    35. 35. Capability Example ex:RomaHotelReservationPrecondition rdf:type wl:Condition ; rdf:value """ ?request [ numberOfGuests hasValue ?guests and city hasValue ?city ] memberOf ReservationData and ?guests <= 10 and ?city = 'Roma' """^^wsml:AxiomLiteral .
    36. 36. Non-functional Semantics • For ranking and selection N • Not constrained, any ontologies • Example: ex:PriceSpecification rdfs:subClassOf wl:NonFunctionalParameter . ex:ReservationFee rdf:type ex:PriceSpecification ; rdf:value "15"^^ex:euroAmount .
    37. 37. Behavioral Semantics • For invocation, composition, process mediation B • Functionalities on operations – Capabilities, categories • Client selects operation to invoke next – Instead of being strictly guided by an explicit process • Example functional category for operations: – Web Architecture: interaction safety
    38. 38. Information Semantics • For invocation, composition, I data mediation • Not constrained, any ontologies • Marked as wl:Ontology
    39. 39. WSMO-Lite Example <wsdl:description> <wsdl:types> <xs:schema> I <xs:element name="ReservationRequest" sawsdl:modelReference="&ex;Reservation" I sawsdl:loweringSchemaMapping="&ex;ResMapping.xsparql" … /> </xs:schema> </wsdl:types> <wsdl:interface name="HotelReservations" sawsdl:modelReference= F "&ex;AccommodationReservationService"> <wsdl:operation name="searchForRooms" sawsdl:modelReference="&wsdlx;SafeInteraction"> B … </wsdl:operation> … </wsdl:interface> <wsdl:service name="RomaHotels" interface="HotelReservations" F sawsdl:modelReference="&ex;RomaHotelReservationPrecondition &ex;ReservationFee" … /> N </wsdl:description>
    40. 40. Annotating Web APIs
    41. 41. Reality Check • Survey based on 222 Web APIs from ProgrammableWeb from 21 categories • Types of Web APIs – 45.5% REST, RPC 33.8%, Hybrid 20.7% • 40% of Web APIs do not state the used HTTP method! • Authentication – 80% require authentication (37% use API Key, 14%HTTP Basic, 6% OAuth, etc) • Input and Output information – 72% do not state the data type of the input parameters – 61% use optional parameters, 45% use default values – 90% have as output XML, 42% JSON – 84% provide example request and 75% example response
    42. 42. What’s the Current State • Web APIs evolving rapidly and autonomously (like the Web) • No Interface Definition Language adopted –WADL is an option but not widely used –APIs are described via an HTML Web page • Allow fast development of mashups • Little reuse of sofware, high reuse of services!
    43. 43. Describing Web APIs • Machine-readable descriptions useful – Tool support for developing clients – Service discovery • No WSDL for Web apps – APIs described mostly in text – AtomPub has RFC, Service Documents – Resources behind AJAX stay undescribed • Some machine-readable descriptions: – HTML links, forms – AtomPub service document – WADL
    44. 44. hRESTS • "There's usually an HTML page" • Identifying machine-readable parts –Service, its operations –Resource address, HTTP method –Input/output data format • hRESTS microformat –Technically, a poshformat
    45. 45. Simpler Example Description Description of the ACME Hotels service: The operation getHotelDetails is invoked using the method GET at{id}, with the ID of the particular hotel replacing the parameter id. It returns the hotel details in an ex:hotelInformation document.
    46. 46. Example HTML <p>Description of the ACME Hotels service:</p> <p> The operation <code>getHotelDetails</code> is invoked using the method GET at <code>{id}</code>, with the ID of the particular hotel replacing the parameter <code>id</code>. It returns the hotel details in an <code>ex:hotelInformation</code> document. </p>
    47. 47. Example hRESTS <div class="service" id="svc"> <p>Description of the <span class="label">ACME Hotels</span> service:</p> <div class="operation" id="op1"> <p> The operation <code class="label">getHotelDetails</code> is invoked using the method <span class="method">GET</span> at <code class="address">{id}</code>, with <span class="input">the ID of the particular hotel replacing the parameter <code>id</code>.</span> It returns <span class="output">the hotel details in an <code>ex:hotelInformation</code> document.</span> </p></div> </div>
    48. 48. hRESTS • HTML for RESTful Service Description • Introduces the service model structure – service (+ label) – operations (+ address, method) – input, output • Can also be in RDFa • Basis for extensions: – MicroWSMO adds semantic annotations
    49. 49. MicroWSMO • Extends hRESTS –model for model references –lifting, lowering • Applies WSMO-Lite semantics
    50. 50. MicroWSMO <div class="service" id="svc"> <p><span class="label">ACME Hotels</span> is a <a rel="model" href="…/ecommerce/hotelReservation"> hotel reservation</a> service.</p> … <div class="operation" id="op1"><p> … <span class="input">A particular hotel ID replaces the param <a rel="model" href="…/onto.owl#Hotel"><code>id</code></ a> (<a rel="lowering" href="…/hotelID.xslt">lowering</a>). </span>. … </p></div> </div>
    51. 51. Unified Discovery and Publication of Services on the Web of Data
    52. 52. The Typical High-Level View registry discover publish services descriptions invoke client service (provider)
    53. 53. UDDI • Universal Description, Discovery and Integration • A Web service registry API specification –Business-oriented service publication, discovery (initially limited search capabilities) –Itself has Web service interface –Useful for intranet registries • A failed public service –Not particularly useful discovery support –Discontinued in 2006
    54. 54. iServe Architecture Currently supported by Swift OWLIM
    55. 55. An Open Repository • Supports access via –Web Application - iServe Browser –Read&Write RESTful API –Linked Data principles • SPARQL endpoint • Content negotiation (RDF, HTML) • All RDF, interlinked with other schemas and datasets • Support for several SWS formalisms 62
    56. 56. Service Discovery • Several Mechanisms –Simple SPARQL-based –Inputs/Outputs logic-based using RDFS reasoning –Functional Classifications with RDFS reasoning –Similarity analysis based on iMatcher
    57. 57. Discovery RESTful API /data/disco/func-rdfs?class=C1 &class=C2 &... uses RDFS functional classification annotations and returns those services that are related to all the functional categories Ci (which are URIs). /data/disco/io-rdfs?f={and|or}&i=C1I &i=C2I &o=C1O &... uses ontology annotations of inputs and outputs and returns services for which the client has suitable input data (CiI) and/or (depending on the parameter f for function) which provide the outputs requested by the client (CiO ). /data/disco/imatch?name=L returns all services ranked according to the Levenshtein (other mechanisms available) string similarity of the service label with the string L.
    58. 58. Atom-based Discovery • Discovery mechanisms return an Atom feed with the results • Provides Atom feed combinators - Union, Intersection, Subtract f=/ data/disco/func-rdfs?class= %2523ProximitySearch &f=/data/disco/io-rdfs? o= %2523ATMLocation
    59. 59. Related Tooling SOA4All Studio
    60. 60. SWEET - MicroWSMO Editor Related Tooling SOA4All Studio
    61. 61. SWEET - MicroWSMO Editor Related Tooling SOWER - WSMO-Lite Editor SOA4All Studio
    62. 62. SWEET - MicroWSMO Editor Related Tooling SOWER - WSMO-Lite Editor iServe Browser SOA4All Studio
    63. 63. SWEET - MicroWSMO Editor Related Tooling SOWER - WSMO-Lite Editor iServe Browser SOA4All Studio Mashups Editor
    64. 64. SWEET - MicroWSMO Editor Related Tooling SOWER - WSMO-Lite Editor iServe Browser SOA4All Studio Mashups Editor SPICES - Invocation Interface
    65. 65. Thanks More Material at
    66. 66. References • SAWSDL – • WSMO-Lite – • hRESTS & MicroWSMO – • REST & RESTful Web services – • Microformats –
    67. 67. References • SPARQL – • WSMO – and • OWL-S – • SWSF & FLOWS – • WSDL-S –
    68. 68. References • WSMX – • IRS-III – • METEOR-S – • Glue – • OWL-S VM –
    69. 69. Acknowledgements • Jacek Kopecký, The Open University • Reto Krummenacher, University of Innsbruck • John Domingue, The Open University • Maria Maleshkova, The Open University • Dong Liu, The Open University • Dave Lambert, The Open University • 2 Slides from Tom Gruber (Siri)