Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

SAPS - Semantic AtomPub-based Services


Published on

Presentation of SAPS at the 1st International Workshop on the Information-Centric Web (IC-Web 2011) at the 11th IEEE/IPSJ International Symposium on Applications and the Internet (SAINT 2011) in Munich, Germany

Published in: Technology, Education
  • Login to see the comments

SAPS - Semantic AtomPub-based Services

  1. 1. Semantic AtomPub-based Services Markus Lanthaler© Matt Reinbold Graz University of Technology
  2. 2. Web services are increasingly popular
  3. 3. Twitter Facebook Google15 billion 5 billion 5 billion per day per day per day
  4. 4. 76% of the APIs are RESTful [ProgrammableWeb, May 2010]
  5. 5. but
  6. 6. © Nesster
  7. 7. Two Options
  8. 8. Two Options
  9. 9. Exchange of semantically annotateddata through a well-defined interface
  10. 10. SAPS’ Semantic Layer SAWSDL JSON Schema+ …XML Schema JSON … Atom AtomPub OpenSearch HTTP(S) TCP/IP
  11. 11. pay orderquery products Restbucks
  12. 12. <?xml version="1.0" encoding=utf-8?><service xmlns="" xmlns:atom="" xmlns:saps=""> <workspace> <atom:title>Coffee Shop Service</atom:title> <collection href="/products" > <atom:title>Products</atom:title> [...] </collection> <collection href="/orders" > <atom:title>Orders</atom:title> [...] </collection> </workspace></service>
  13. 13. <collection href="/orders" > <atom:title>Orders</atom:title> <accept saps:schema="/schemas/purchase-order.xsd"> application/xml </accept> <categories fixed="yes"> <atom:category scheme= "" term=" order.owl#PurchaseOrder" label="Orders" /> </categories></collection>
  14. 14. <collection href="/products" > <atom:title>Products</atom:title> <accept /> <categories fixed="yes"> <atom:category scheme="" term="" label="Products" /> </categories> <atom:link rel="search" type="application/opensearchdescription+xml" href=""/></collection>
  15. 15. <?xml version="1.0" encoding="UTF-8"?><OpenSearchDescription xmlns=""> <ShortName>Product Search</ShortName> <Description>Search for products</Description> <Url xmlns:gr="" type="application/atom+xml;type=feed" template=" {searchTerms?}&amp;ean={gr:hasEAN_UCC-13?}" /></OpenSearchDescription>GET /?q=&ean=2300000010015 HTTP/1.1Host:
  16. 16. <?xml version="1.0" encoding="utf-8"?><feed xmlns=""> <title type="text">Search for EAN 2300000010015</title> [...] <entry> <title>Cappuccino</title> <summary>A hot cappuccino for 1.99 EUR</summary> <id>,2003:3.2397</id> <updated>2009-07-31T12:29:29Z</updated> <published>2008-12-13T08:29:29-04:00</published> <content type="application/xml"> [...] </content> </entry></feed>
  17. 17. <content type="application/xml"> <product xmlns="" xmlns:xsi=" instance" xsi:schemaLocation=""> <id></id> <label>Cappuccino</label> <ean>2300000010015</ean> <sku>P4197</sku> <price>1.99</price> <description>...</description> </product></content>
  18. 18. <xsd:schema xmlns:xsd="" xmlns:sawsdl=""> <xsd:element name="product" type="ProductType" sawsdl:modelReference=" v1#Offering" /> <xsd:complexType name="ProductType"> <xsd:sequence> <xsd:sequence> <xsd:element name="id" type="xsd:anyURI" /> <xsd:element name="label" type="xsd:string" sawsdl:modelReference=" 01/rdf-schema#label" /> <xsd:element name="ean" type="xsd:string" sawsdl:modelReference=" goodrelations/v1#hasEAN_UCC-13" /> <xsd:element name="sku" type="xsd:string" sawsdl:modelReference=" goodrelations/v1#hasStockKeepingUnit ontology/order.owl#PartNumber" /> <xsd:element name="price" type="xsd:decimal" sawsdl:modelReference=" goodrelations/v1#hasCurrencyValue" /> <xsd:element name="description" type="xsd:string"
  19. 19. <collection href="/orders" > <atom:title>Orders</atom:title> <accept saps:schema="/schemas/purchase-order.xsd"> application/xml </accept> [...]</collection>POST /orders HTTP/1.1Host: api.example.comContent-Type: application/xml<order xmlns=" [...]</order> <link rel="next" href="/order/1684/payment" type="application/xml" saps:schema="/schemas/payment.xsd" title="Payment" />
  20. 20. strong emphasis on simplicity discovery and composition
  21. 21. Thank You© 2011, Markus Lanthaler. Some Rights Reserved.
  22. 22. Questions?Markus
  23. 23. Image Credits(1) Adapted from “Two Billion is Cool,” M. Thomson. Available: