NONOSQLArchitecture Patterns for Semantic Web Applications<br />Brian Panulla<br />Penn State Web 2011 Conference<br />
Twitter: @bpanulla<br />(c)2010 Google, Imagery (c)2010 TerraMetrics, NASA, Map data (c)2010 Europa Technologies, Google, ...
Three things the Semantic Web is not(mostly)<br />
1. Semantic HTML<br />
2. Warmed-over AI<br />http://www.movieprop.com/tvandmovie/terminator/t3endoskeletons1.jpg<br />
3. Magic<br />http://bostonist.com/attachments/Anna%20Edwards/109-gob-magic2.jpg<br />
Who cares?<br />
Semantic<br />Web<br />http://xkcd.com/773/<br />
On NoSQL...<br />
NoSQL: Key/Value and Graphs<br />
On Linked Data...<br />
When things go wrong<br />
Linked Data - 2008<br />http://richard.cyganiak.de/2007/10/lod/<br />
Linked Data - 2008<br />http://richard.cyganiak.de/2007/10/lod/	Last updated: 2010-09-22<br />
Technology Primer<br />
RDF: Framework for knowledge representation<br />Declares resources<br />Specifies properties of resources<br />W3C standa...
What is a Resource?<br />Everything on the web (or not) is a resource.<br />Uniform<br />Resource<br />Locator<br />
RDF is not XML<br />...but occasionally dresses up like it<br />XML<br />N-Triples<br />N3<br />Turtle<br />JSON<br />RDFa...
URIs<br />Resources are identified by a Uniform Resource Identifier (URI)<br />Can be found in your XHTML DTD and html tag...
URIs<br />... Are not necessarily URLs<br />http://webconference.psu.edu<br />http://brian.panul.la<br />http://alumni.psu...
Triples<br />RDF is expressed as triples of URIs:<br />subject (“Penn State”) - resource<br />predicate (”is a") - propert...
Triples<br />Another example:<br />subject (“Brian Panulla”)<br />predicate (”presented at")<br />object (”psuweb11”)<br /...
Triples to Graphs<br />United<br />States of<br />America<br />City of<br />Portland<br />State of<br />Oregon<br />North<...
RDF Schemas<br />RDFS provides limited Set Theory features<br />subClassOf<br />subPropertyOf<br />Domain<br />Range<br />...
Ontologies<br />Ontology is the study of being or reality.<br />A Formal Ontology is a specification of a conceptualizatio...
Defining an ontology<br />Web Ontology Language (OWL)<br />Version 2.0<br />		(October 2009)<br />http://www.w3.org/TR/owl...
Some RDFS/OWL Features<br />Classes<br />Sub-class<br />Equivalent Classes<br />Disjoint Classes<br />Cardinality constrai...
Protégéhttp://protege.stanford.edu/<br />
Triple Stores<br />Graph database that knows RDF<br />Quad Stores: triple store that includes provenance<br />		“where did...
Popular Triple Stores<br />HP/Apache Jena<br />Pellet Reasoner<br />Storage<br />In memory<br />RDBMS (transactions)<br />...
Popular Triple Stores<br />Franz AllegroGraph (server)<br />Virtuoso Universal Server (server)<br />Mulgara  (RESTful serv...
Semantic Web Architecture<br />
Del.icio.us<br />
OMNOMino.us<br />
Basic Requirements<br />Information<br />People<br />Bookmarks<br />Tags<br />Functionality<br />Create an account<br />Ad...
Logical Schema<br />
Relational DB - Physical Schema<br />
Modeling in RDF<br />Minimize artificial entities<br />Re-use existing schemas or ontologies<br />
Useful Schemas<br />Dublin CORE METADATA INITIATIVE (DCMI)<br />FrienD-of-a-friend<br />(FOAF)<br />
DMCI<br />
FOAF<br />Well-defined ontology for people, organizations, and social networks<br />
FOAF<br />
RDF Data Model - Member<br />foaf:Person<br />foaf:fullname<br />foaf:nickname<br />foaf:mbox<br />foaf:openid<br />Litera...
RDF Data Model - Bookmark<br />foaf:Document<br />dct:title<br />dct:description<br />dct:created<br />dct:modified<br />f...
Topics from DBPedia<br />SemantifiedWikipedia<br />
Custom properties and classes<br />omnom:bookmarked<br />http://omnomino.us/ontology/om.n3#bookmarked<br />omnom:<br />boo...
Custom properties and classes<br />rdfs:<br />subClassOf<br />rdfs:<br />subClassOf<br />foaf:<br />Document<br />foaf:<br...
RDF Data Model<br />
SPARQL<br />Graph query language<br />Read-only (1.0)<br />Safe to expose endpoint to Web<br />SPARQL 1.1 adds updates<br />
A Simple SPARQL Example<br />SELECT ?subj ?pred ?obj<br />WHERE {<br />		?subj ?pred ?obj.<br />}<br />Demo<br />
SPARQL Query Types<br />SELECT – Returns tuples matching specified pattern<br />ASK – yes or no (tests for existence)<br /...
SPARQL Examples: ASK<br />ASK {<br />	?urifoaf:openid <http://brian.panul.la>.<br />}<br />
SPARQL Examples: Member<br />SELECT DISTINCT ?uri ?fullname ?nickname ?email<br />WHERE {<br />	?uri a omnom:Member.<br />...
SPARQL Example: Bookmarks<br />
Updates via API<br />
The Good:<br />Domains where schemas/models change rapidly or data is sparse<br />Semantics of relational model inadequate...
The Bad:<br />Weaknesses<br />Bad for opaque objects with few relationshps<br />Large sets of homogenous objects<br />Alte...
Linked Data<br />Publish/Syndicate complete information sets<br />Embedded explicit semantics, unique identifiers<br />Hav...
Resources<br />Semantic Web Programming - John Hebeler, Matthew Fisher, Ryan Blace, and Andrew Perez-Lopez<br />Semantic W...
Upcoming SlideShare
Loading in...5
×

Architecture Patterns for Semantic Web Applications

1,695

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,695
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
37
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • http://www.flickr.com/photos/mayhem/3104825022/in/photostream/
  • http://www.flickr.com/photos/herr_hartmann/448478567/in/photostream/http://www.flickr.com/photos/mayhem/3104825022/in/photostream/
  • http://www.flickr.com/photos/jingleslenobel/4971486823
  • Architecture Patterns for Semantic Web Applications

    1. 1. NONOSQLArchitecture Patterns for Semantic Web Applications<br />Brian Panulla<br />Penn State Web 2011 Conference<br />
    2. 2. Twitter: @bpanulla<br />(c)2010 Google, Imagery (c)2010 TerraMetrics, NASA, Map data (c)2010 Europa Technologies, Google, INEGI, AND<br />
    3. 3. Three things the Semantic Web is not(mostly)<br />
    4. 4. 1. Semantic HTML<br />
    5. 5. 2. Warmed-over AI<br />http://www.movieprop.com/tvandmovie/terminator/t3endoskeletons1.jpg<br />
    6. 6. 3. Magic<br />http://bostonist.com/attachments/Anna%20Edwards/109-gob-magic2.jpg<br />
    7. 7. Who cares?<br />
    8. 8. Semantic<br />Web<br />http://xkcd.com/773/<br />
    9. 9. On NoSQL...<br />
    10. 10.
    11. 11. NoSQL: Key/Value and Graphs<br />
    12. 12. On Linked Data...<br />
    13. 13.
    14. 14. When things go wrong<br />
    15. 15. Linked Data - 2008<br />http://richard.cyganiak.de/2007/10/lod/<br />
    16. 16. Linked Data - 2008<br />http://richard.cyganiak.de/2007/10/lod/ Last updated: 2010-09-22<br />
    17. 17. Technology Primer<br />
    18. 18. RDF: Framework for knowledge representation<br />Declares resources<br />Specifies properties of resources<br />W3C standard since 1999<br />http://www.w3.org/RDF/<br />
    19. 19. What is a Resource?<br />Everything on the web (or not) is a resource.<br />Uniform<br />Resource<br />Locator<br />
    20. 20. RDF is not XML<br />...but occasionally dresses up like it<br />XML<br />N-Triples<br />N3<br />Turtle<br />JSON<br />RDFa<br /> in HTML<br />...<br />
    21. 21. URIs<br />Resources are identified by a Uniform Resource Identifier (URI)<br />Can be found in your XHTML DTD and html tag’s xmlns attribute:<br />
    22. 22. URIs<br />... Are not necessarily URLs<br />http://webconference.psu.edu<br />http://brian.panul.la<br />http://alumni.psu.edu/brian.panulla<br />
    23. 23. Triples<br />RDF is expressed as triples of URIs:<br />subject (“Penn State”) - resource<br />predicate (”is a") - property<br />object (”University”) - resource<br />Is a<br />Penn<br />State<br />University<br />
    24. 24. Triples<br />Another example:<br />subject (“Brian Panulla”)<br />predicate (”presented at")<br />object (”psuweb11”)<br />presented At<br />Brian<br />Panulla<br />psuweb11<br />
    25. 25. Triples to Graphs<br />United<br />States of<br />America<br />City of<br />Portland<br />State of<br />Oregon<br />North<br />America<br /> State of<br />Washington<br /> State of<br />California<br />Canada<br />NATO<br />Is a<br />borders<br />Is in<br />Held At<br />Is in<br />Member of<br />presented At<br />Is in<br />borders<br />Member of<br />attended<br />Is in<br />Is in<br />Is a<br />Is located in<br />Is in<br />PSUWEB11<br />Penn<br />State<br />Brian<br />Panulla<br />Portland<br />State<br />University<br />
    26. 26. RDF Schemas<br />RDFS provides limited Set Theory features<br />subClassOf<br />subPropertyOf<br />Domain<br />Range<br />Think of classes in RDFS as sets rather than OOP classes<br />
    27. 27. Ontologies<br />Ontology is the study of being or reality.<br />A Formal Ontology is a specification of a conceptualization (Gruber, 1995)<br />Aristotle<br />
    28. 28. Defining an ontology<br />Web Ontology Language (OWL)<br />Version 2.0<br /> (October 2009)<br />http://www.w3.org/TR/owl2-overview/<br />Yes, rly.<br />
    29. 29. Some RDFS/OWL Features<br />Classes<br />Sub-class<br />Equivalent Classes<br />Disjoint Classes<br />Cardinality constraints (max/min)<br />Individuals<br />Same Individual<br />Properties<br />Sub-property<br />Equivalent<br />Inverse<br />Symmetric<br />Transitive<br />
    30. 30. Protégéhttp://protege.stanford.edu/<br />
    31. 31. Triple Stores<br />Graph database that knows RDF<br />Quad Stores: triple store that includes provenance<br /> “where did the data come from?”<br />Various stores provide<br />Transactional / non-Transactional<br />In-Memory / File system / RDBMS storage<br />
    32. 32. Popular Triple Stores<br />HP/Apache Jena<br />Pellet Reasoner<br />Storage<br />In memory<br />RDBMS (transactions)<br />Filesystem storage (high performance)<br />Open Source<br />
    33. 33. Popular Triple Stores<br />Franz AllegroGraph (server)<br />Virtuoso Universal Server (server)<br />Mulgara (RESTful service, OSS)<br />Redland (C, Obj-C)<br />New<br />Stardog - Integrated reasoning database<br />RDFa API - https://github.com/webr3/rdf.js<br />
    34. 34. Semantic Web Architecture<br />
    35. 35. Del.icio.us<br />
    36. 36. OMNOMino.us<br />
    37. 37. Basic Requirements<br />Information<br />People<br />Bookmarks<br />Tags<br />Functionality<br />Create an account<br />Add a bookmark<br />Delete a bookmark<br />Browse other users’ bookmarks<br />
    38. 38. Logical Schema<br />
    39. 39. Relational DB - Physical Schema<br />
    40. 40. Modeling in RDF<br />Minimize artificial entities<br />Re-use existing schemas or ontologies<br />
    41. 41. Useful Schemas<br />Dublin CORE METADATA INITIATIVE (DCMI)<br />FrienD-of-a-friend<br />(FOAF)<br />
    42. 42. DMCI<br />
    43. 43. FOAF<br />Well-defined ontology for people, organizations, and social networks<br />
    44. 44. FOAF<br />
    45. 45. RDF Data Model - Member<br />foaf:Person<br />foaf:fullname<br />foaf:nickname<br />foaf:mbox<br />foaf:openid<br />Literal (“datataype”)properties<br />Resource (“object”)<br />property<br />
    46. 46. RDF Data Model - Bookmark<br />foaf:Document<br />dct:title<br />dct:description<br />dct:created<br />dct:modified<br />foaf:page<br />foaf:topic<br />Literal (“datataype”)properties<br />Resource (“object”)<br />properties<br />
    47. 47. Topics from DBPedia<br />SemantifiedWikipedia<br />
    48. 48. Custom properties and classes<br />omnom:bookmarked<br />http://omnomino.us/ontology/om.n3#bookmarked<br />omnom:<br />bookmarked<br />foaf:<br />Document<br />foaf:<br />Person<br />
    49. 49. Custom properties and classes<br />rdfs:<br />subClassOf<br />rdfs:<br />subClassOf<br />foaf:<br />Document<br />foaf:<br />Person<br />omnom:<br />Member<br />omnom:<br />Resource<br />
    50. 50. RDF Data Model<br />
    51. 51. SPARQL<br />Graph query language<br />Read-only (1.0)<br />Safe to expose endpoint to Web<br />SPARQL 1.1 adds updates<br />
    52. 52. A Simple SPARQL Example<br />SELECT ?subj ?pred ?obj<br />WHERE {<br /> ?subj ?pred ?obj.<br />}<br />Demo<br />
    53. 53. SPARQL Query Types<br />SELECT – Returns tuples matching specified pattern<br />ASK – yes or no (tests for existence)<br />CONSTRUCT – Returns a graph<br />DESCRIBE – Returns a graph determined by the query engine<br />
    54. 54. SPARQL Examples: ASK<br />ASK {<br /> ?urifoaf:openid <http://brian.panul.la>.<br />}<br />
    55. 55. SPARQL Examples: Member<br />SELECT DISTINCT ?uri ?fullname ?nickname ?email<br />WHERE {<br /> ?uri a omnom:Member.<br /> OPTIONAL {<br />?urifoaf:name ?fullname;<br />foaf:nick ?nickname;<br />foaf:mbox ?email.<br /> }<br />FILTER (?uri = <http://omnomino.us/member/24601>)<br />
    56. 56. SPARQL Example: Bookmarks<br />
    57. 57. Updates via API<br />
    58. 58. The Good:<br />Domains where schemas/models change rapidly or data is sparse<br />Semantics of relational model inadequate (e.g. inferencing, inheritance)<br />Domains emphasizing relationships<br />Social networks<br />Taxonomies<br />
    59. 59. The Bad:<br />Weaknesses<br />Bad for opaque objects with few relationshps<br />Large sets of homogenous objects<br />Alternatives<br />RDBMS<br />NoSQL<br />Document DBs<br />Key/Value Stores<br />Graph databases<br />
    60. 60. Linked Data<br />Publish/Syndicate complete information sets<br />Embedded explicit semantics, unique identifiers<br />Have minimal impact to other Web information publishing<br />May be static or dynamically generated<br />
    61. 61. Resources<br />Semantic Web Programming - John Hebeler, Matthew Fisher, Ryan Blace, and Andrew Perez-Lopez<br />Semantic Web for the Working Ontologist: Effective Modeling in RDFS and OWL -Dean Allemang and James Hendler<br />Programming the Semantic Web by Toby Segaran, Colin Evans, and Jamie Taylor<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×