1 / 33

A Little Bit History

A Little Bit History. SKOS first version: 2008. DAML started: 2000. Data Engineering. RDFS: 2004. 2009 OWL 2. RDF: 1999. OWL: 2004. N3 first version: 2008. SPARQL 1.0: 2008. Programming. 2012 GeoSPARQL. SPARQL 1.1: 2013. JSON-LD: 2014. Programming the Semantic Web. Linyun Fu

danil
Download Presentation

A Little Bit History

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Little Bit History SKOS first version: 2008 DAML started: 2000 Data Engineering RDFS: 2004 2009 OWL 2 RDF: 1999 OWL: 2004 N3 first version: 2008 SPARQL 1.0: 2008 Programming 2012 GeoSPARQL SPARQL 1.1: 2013 JSON-LD: 2014

  2. Programming the Semantic Web Linyun Fu June 3, 2014 Adapted from Steffen Staab’s keynote at ESWC 2014

  3. This presentationcontainsprogramcode, engineering, speculationandworse. Itmaybeviewedas offensive bysomeviewers.

  4. Semantic Web Programming RDF file Linked Data Hypothesis: Semantic Web dataiswonderful, but programmingwithSemantic Web haschangedtoolittlesince 2000 and still is a mess. Ontology Wepromiseflexibility, but code still hardtomaintain. SPARQL endpoint

  5. These is a mismatch between data engineering and programming approaches RDF file Linked Data Eclipse Ontology „Inside“ Data Mgmt „Outside“ Data Mgmt .... Visual Studio SPARQL endpoint

  6. searching, finding, reusing all the complex data strcutres that we have „Outside“ • Understanding bythedeveloper • „Search + Code“ • „Browse + Code“ • Triple-objectmapping • Code generation • Processoffederation • LD vsendpoint • Models offederation Eclipse „Inside“ Data Mgmt „Outside“ Data Mgmt .... Visual Studio Abstractionlayersthatfacilitate a developer‘slife

  7. Programmingwith Data: Whatdoesitcost? Both „Inside“ „Outside“ Ctotal = t*Ctool + d*t*Clearn + s*Cdeu + s*Cmap + n*Ccode Ctool: Costsforbuildingtmanytools, shared; almostfree Clearn: Costsforlearninghowtousetechnology per developerd Cdeu: Costsfordataengineering/understandingssources Cmap: Costsformappingdatastructureforssourcestoobjects Ccode: Actualcostsforaccessing/manipulatingdatantimes

  8. SWOT ofSemantic Web Programming „Outside“ Ctotal = t*Ctool + d*t*Clearn + s*Cdeu+ s*Cmap + n*Ccode weakness threat strength/weakness asgoodasRelDBis not goodenough! opportunity opportunity Strong in flexibility Somewhatweak in performance Not a strength, yet!

  9. Intermediate conclusion Minimizecostsforsetup: Clearn: Costsforlearninghowtousetechnology per developerd Cdeu: Costs for data engineering/understanding s sources Cmap: Costsformappingdatastructureforssourcestoobjects Minimizecostsforcoreprogramming: Ccode: Actualcostsforaccessing/manipulatingdatantimes • Costsforlearningandunderstandingconstitute a threat! • Need tobeovercome!

  10. We need flexible code to match flexible data structures • i.e., Domain-specific languages for Semantic Web Programming • XML programming example • Why Jena is not good enough

  11. XML programming example: LINQ to XML XElement contacts = newXElement("Contacts", newXElement("Contact", newXElement("Name", "Patrick Hines"), newXElement("Phone", "206-555-0144"), newXElement("Address", newXElement("Street1", "123 Main St"), newXElement("City", "Mercer Island"), newXElement("State", "WA"), newXElement("Postal", "68042") ) ) );

  12. The Jena Approach The Jamendo ontology Task: List all records for each music artist

  13. AccessingArtistsUsing Apache Jena

  14. From artists to songs Observations • SPARQL queries are strings • Results are strings • Requires good understanding of the data source RDF Typingis lost

  15. Related Work on RDF Access Static Typing • Errors detected before execution • Misspelling discovered by compiler! • Anectode: 2nd place because of misspelt var. • Static types are form of documentation • Less knowledge about data source required • Better IDE integration / autocompletion Code generation • Sommer • Winter • OntoMDE Dynamic Typing • E.g. ActiveRDF(Oren et al 2007)) • “convention over configuration” • dynamic metaprogramming allows for slick code Criticism

  16. Semantic Web Programming:LITEQ – Our outside approach

  17. Programming against Jamendo c1

  18. Node Path Query Language UsingAutocompletion Exploration ofclasses Exploration ofrelations Queryingforinstances

  19. Node Path Query Language UsingAutocompletion Exploration ofclasses Exploration ofrelations

  20. Node Path Query Language: Query Formulation Exploration ofclasses Exploration ofrelations Queryingforinstances Typesetofmo:MusicArtist Nodefinitionordeclarationneeded

  21. Node Path Query Language for Code Development Onelanguageto bind them all Exploration ofclasses Exploration ofrelations Queryingforinstances Developingcodewithqueries • All translatedinto SPARQL queriesat • Development time • Type inferenceatcompile time (but also aspartof IDE) • Queryingagainatrun time

  22. Node Path Query Language for Code Development Exploration ofclasses Exploration ofrelations Queryingforinstances Developingcodewithqueries Developingcodewithnewclasses • All translatedinto SPARQL queriesat • Development time • Run time update • Persistence!

  23. NPQL NPQL (Node Path Query Language) • IntensionalQueries Describing RDF classesandpropertiesforreuse in IDE and in hostlanguagemetaprogramming • ExtensionalQueries Class instancesandpropertyinstances • Compilationto SPARQL forreuseofexistingendpoints Ongoingdiscussionaboutdetailsof NPQL

  24. LITEQ NPQL (Node Path Query Language) • IntensionalQueries • ExtensionalQueries • Compilationto SPARQL LITEQ (Language Integrated Types, ExtensionsandQueries) • Implementationof NPQL as F# Type Provider in Visual Studio • Autocompletionusing NPQL queries • Automatictypingofextensionalqueryresultsbyintensionalqueries

  25. Costsavings Ctotal = t*Ctool + d*t*Clearn + s*Cdeu + s*Cmap + n*Ccode Ctool: open source Clearn: not free– thoughautocompletionreducescognitiveload Cdeu: not free – understandingthe RDF schemafromyour IDE Cmap: 0 Ccode: a lotlessthanfordotNet RDF (Apache Jena?!!) littlebitmorethanfor a fictitiousperfectobjectmodel

  26. Halsteadmetricsfor different tasks: ConventionalSemantic Web programmingapproacheswasteupto 50% ofyourefforts!

  27. Speculation 1 Speculation 1: Usingontologiesand RDF schemata, wecandevelopmoreefficientlyusingtherighttools! Ctotal RelDB/XML codingefforts SemWebcodingefforts Appliestosmalln Diff. costsforlearning n (as in n*Ccode )

  28. Halsteadmetricsfor different tasks: Ifsomeonegivesme a perfect RDF-to-OO mappingforfree then I will not careaboutwhetheritis RDF orRelDB underneath!

  29. Speculation 2 Speculation 2: For large programmes, ourtoolsneedtoofferbettersupporttoreducesetupcosts! Ctotal RelDB/XML codingefforts SemWebcodingefforts „Perfect“ objectmodelshieldsdeveloperfromdatabaseideosyncracies Diff. costsforsetup n (as in n*Ccode )

  30. Conclusion

  31. Semantic Web: Make Developers More Productive RDF file Linked Data Eclipse Ontology „Inside“ Data Mgmt „Outside“ Data Mgmt .... Visual Studio SPARQL endpoint

  32. What I Think • New programming languages vs. code generation + existing PLs • Mismatches between RDF and OO: Oren et al 2007, Saathoff et al 2009 • Only some ontologies can be perfectly mapped to OO classes • A killer PL to come • “Data programmability” • Model • Format • …?

  33. References • C. Saathoff, S. Scheglmann, S. Schenk. Winter: Mapping RDF to POJOs revisited. • E. Oren, R. Delbru, S. Gerke, A. Haller, S. Decker: ActiveRDF: object-oriented semantic web programming. WWW 2007: 817-824 • S. Scheglmann, A. Scherp, S. Staab. Declarative Representation of Programming Access to Ontologies. In: 9th Extended Semantic Web Conference (ESWC2012), Heraklion, Greece, May 27-31, 2012. • W. Cook, A. Ibrahim. Integrating Programming Languages & Databases: What’s the Problem?? http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.66.7169&rep=rep1&type=pdf

More Related