How To Contribute To Drupal Drupal - DrupalCon Paris
The State Of Rdf In Drupal 7
1. Digital Enterprise Research Institute www.deri.ie
The state of RDF in Drupal 7
-
DrupalCon Paris 2009
Stéphane “scor” Corlosquet
scorlosquet@gmail.com
§
Chapter 1
! Copyright 2008 Digital Enterprise Research Institute. All rights reserved. www.deri.org
2. Presentation outline
Digital Enterprise Research Institute www.deri.ie
! The current web
! The vision of the Semantic Web
! Semantic Web technologies
! Initiatives and projects
" Data portability
" Linking Open Data
2
5. Many information silos
Digital Enterprise Research Institute www.deri.ie
* Source: Pidgin Technologies, www.pidgintech.com
5
6. Current Web
Digital Enterprise Research Institute www.deri.ie
! web pages
" 20 billion public pages
" 900 billion deep web pages
" 62 links per page
" = 55 trillion links in the full web
http://www.kk.org/thetechnium/archives/2007/11/dimensions_of_t.php
6
7. Current Web
Digital Enterprise Research Institute www.deri.ie
! web storage
" 246 exabytes of data (246 billion GB)
! tra!c
" 8 terabytes / s
" 2 million emails / s
http://www.kk.org/thetechnium/archives/2007/11/dimensions_of_t.php
7
8. http://www.kk.org/thetechnium/archives/2007/11/dimensions_of_t.php
Technology, The Movie
eplace Humanity by 2100?
Civilizations Are Creatures
Current Web
Machine (one billion from the one billion online PCs) as there transitors in an
Itanium chip. The Machine is a super computer where each "transistor" is
s on the Future of Science
computer. A very rough estimate of the computing power of this Machine
The Myth of Leapfrogging then is that it contains a billion times a billion, or one quintillion (10 ^ 18)
e Rise and Fall of the Copy
Digital Enterprise Researchservers have a billion processors, the
transistors. Since only the newest
Institute www.deri.ie
Asymmetrical Technologies figure is probably an order of magnitude smaller. When we add the who is webchick? - Google Search http://www.google.com/search?q=who+is+webchick%3
o the Fires of Computation
mostly text and links
transistors for cell phones, handhelds, it calculates out to about 170
!
The Forever Book
The Speed of Information
quadrillion (10^17) transistors wired into the Machine
Atom Versus Net Web Images Maps News Shopping Gmail more ! scorlosquet@gmail.com | My Noteboo
e Computational Metaphor There are about 100 billion neurons in the human brain. Today the Machine
Singularity Is Always Near has as 5 orders more transistors than you have neurons in your head. And
Google
xical Nature of Technology the Machine, unlike your brain, is doubling in power every couple of years at Advanced Search
Immortal Technologies the minimum.
who is webchick? Search Preferences
Identity From What-is-Not
The Futility of Prohibition
In 2003 alone a total one quintillion transistors were produced, but not all of
The Seventh Kingdom Web Results 1 - 10 of about 31,600 for who is we
on the Change of Change
them are wired up into the Machine. Many transistors made their way into
r Transitions in Technology cameras, TVs, GPS units and the like, few of which are currently online. One
Webchick wins best contributor at Google-O'Reilly Open Source ... Spons
Major Transitions in Biology day they will be. Every chip will eventually connect to the web in some
ption of being anonymous fashion. That would mean we would be adding as many transistors to the Please comment below if you've received help or have helped webchick help others as a way
Innovations in the Method of demonstrating your congratulations. ... Who is Lookup
Machine in a year as exist right now.
on of the Scientific Method drupal.org/webchick-wins-best-contributor-open-source-awards - 115k - Global Who is Looku
The Name of What We Do domain names and t
If the Machine has 100 quadrillion transistors, how fast is it running? If we Cached - Similar pages - Note this
Only One Machine www.who.is
When Answers Are Cheap include spam, there are 196 billion emails sent every day. That's 2.2 million
Brains of White Matter per second, or 2 megahertz. Every year 1trillion text messages are sent. Goodbye, World... :( | webchick.net
Number of Species We Use That works out to 31,000 per second, or 31 kilohertz. Each day 14 billion I about poo'd myself when it read this in my RSS feed reader, then I realized, ohh yeah. Pffft,
What Will Big Brains Do? instant messages are sent, at 162 kilohertz. The number of searches runs at webchick leave the drupal community, hahahaha. ...
Cosmic Origins of Extropy webchick.net/goodbye-world - 34k - Cached - Similar pages - Note this
14 kilohertz. Links are clicked at the rate of 520,000 per second, or .5
Inventing Our Humanity
ch for the Meaning of Tech megahertz.
Uh. Holy crap... | webchick.net
There are 20 billion visible, searchable web pages and another 900 billion However, I wonder what will happen when they find out what many of us have suspected for a
RSS Feed
dark, unsearchable, or deep web pages (for instance pages behind long time now: that webchick is just an alias, ...
+My Yahoo!
+NewsGator passwords or the kind of dynamic page that Amazon will produce when you webchick.net/node/34 - 26k - Cached - Similar pages - Note this
+Rojo query it). The average number of links found on each searchable web page More results from webchick.net »
+NewsBurst is 62. Assuming the same count for dynamic pages that means there's 55
+Google Reader
trillion links in the full web. We could think of each link as a synapse -- a
webchick.net - How popular is webchick.net? (://URLFAN)
+Pluck webchick.net. Ranks 249086 out 1515000 sites Mentioned in 4 feeds ... sources
+My AOL potential connection waiting to me made. There is roughly between 100
www.webchick.net groups.drupal.org www.chesnok.com www.garfieldtech.com ...
+FeedLounge billion and 100 trillion synapses in the human brain, which puts the Machine
+NetVibes
www.urlfan.com/site/webchick_net/1442668.html - 12k - Cached - Similar pages - Note this
in the same neighborhood as our brains.
+BlogLines
webchick
webchick.org. Loading. DOT.ORG - The miscellaneous TLD for organizations that didn't fit
anywhere ... WEBCHICK.ORG SPEAKS VALID XHTML. SUPPORT GOOD IDEAS. ...
www.webchick.org/ - 31k - Cached - Similar pages - Note this
30/08/2007 13:42
Quicksketch + Webchick = Drupal Love | Rob Loach .Net
webchick For those of you who have been living in a rock and don't know who ... The reason I
1 of 2
8
10. Giant Global Graph (2007)
Digital Enterprise Research Institute www.deri.ie
! Transition
" WWW = content+links
Tim Berners-
Lee
" GGG = WWW+relationships
+descriptions
! Universal medium for data, information
and knowledge exchange
http://dig.csail.mit.edu/breadcrumbs/node/215
10
11. The One machine
Digital Enterprise Research Institute www.deri.ie
! The One machine (Kevin Kelly, 2007)
" 1.2 billion personal computers
" 27 million data servers
" 2.7 billion cell phones
" 80 million wireless PDAs
" 600 billion RFID tags in use
http://www.kk.org/thetechnium/archives/2007/11/dimensions_of_t.php
11
12. Evolution of the Web
Digital Enterprise Research Institute www.deri.ie
12
13. The Key
Digital Enterprise Research Institute www.deri.ie
Agree on standards
Open your data
http://www.flickr.com/photos/11437726@N08/2781739886/
13
15. Links
Digital Enterprise Research Institute www.deri.ie
! Let's give a meaning to the hyperlinks
page1 -> user1 page1 -hasAuthor-> user1
page1 -> book1 page1 -isPartOf--> book1
page1 -> page24 page1 -refersTo--> page24
page1 -> Cats page1 -isAbout---> Cats
triple: subject -property-> object
15
16. Graph Model - RDF
Digital Enterprise Research Institute www.deri.ie
16
17. Graph Model - RDF
Digital Enterprise Research Institute www.deri.ie
17
18. Resources on the Semantic Web
Digital Enterprise Research Institute www.deri.ie
! Internet of Things
" URI: Uniform Resource Identifier
" http://dbpedia.org/resource/Apple
" http://dbpedia.org/resource/Apple_Inc
" http://dbpedia.org/resource/Apple_River
" http://dbpedia.org/resource/Apple_(band)
" http://dbpedia.org/resource/Apple_(album)
" URIs should be dereferenceable
18
19. RDF - Describe your data
Digital Enterprise Research Institute www.deri.ie
! Various RDF formats
" RDF is not XML! XML is one of the ways to write RDF data, ie. it's
a language/syntax
" RDF/XML
" N-triple
" Turtle
" RDFa
! shortcut notation for URIs: CURIE (Compact URI)
" prefix:id
– example: foaf:knows, sioc:User, etc.
19
20. RDF - Describe your data
Digital Enterprise Research Institute www.deri.ie
! Various languages
" scor knows danbri (English)
" scor connait danbri (French)
" scor danbri (drawing)
! One meaning in RDF
" scor foaf:knows danbri scor
scor foaf:knows
foaf:knows danbri
walkah
20
21. RDF - Vocabularies
Digital Enterprise Research Institute www.deri.ie
! Semantic links are categorized in vocabularies
" Dublin Core - DC
– title, creator, description, date
" Friend of a Friend - FOAF
– hasName, knows, homepage
" Description of a Project - DOAP
" Semantically Interlinked Online Communities - SIOC
" Simple Knowledge Organization System - SKOS
21
22. SPARQL - query the GGG data
Digital Enterprise Research Institute www.deri.ie
" standardized in January 2008
" Example, return the capital of all the african countries:
PREFIX abc: <http://example.com/exampleOntology#>
SELECT ?capital ?country
WHERE {
?x abc:cityname ?capital ;
abc:isCapitalOf ?y .
?y abc:countryname ?country ;
abc:isInContinent abc:Africa .
}
22
29. Linking Open Data project
Digital Enterprise Research Institute www.deri.ie
http://richard.cyganiak.de/2007/10/lod/
29
30. Sindice - The Semantic Web index
Search results for term “europe” - Sindice http://sindice.com/search?q=europe&qt
Digital Enterprise Research Institute www.deri.ie
Home About Search Submit Forum Dev
europe
Search results for term “europe”, found about 54.2 thousand
Birds of Europe (RDF)
2008-07-26 – 363 triples in 52.7 kb
http://dbpedia.org/resource/Category:Birds_of_Europe (Search) (Cached) (Ontologies)
Europe (RDF)
2008-07-22 – 91 triples in 13.1 kb
http://dbpedia.org/resource/Category:Europe (Search) (Cached) (Ontologies)
Europe 1 (RDF)
2008-07-22 – 639 triples in 91.4 kb
http://dbpedia.org/resource/Europe_1 (Search) (Cached) (Ontologies)
Flora of Europe (RDF)
2008-07-26 – 297 triples in 43.4 kb
http://dbpedia.org/resource/Category:Flora_of_Europe (Search) (Cached) (Ontologies)
Europe (Band), Europe (musique), Europe ( ), ( ), Europe (band), Europe (RDF)
http://sindice.com/
2008-07-20 – 1062 triples in 224 kb
http://dbpedia.org/resource/Europe_%28band%29 (Search) (Cached) (Ontologies)
30
1 of 2 30/08/2007
32. RDF in Drupal core
Digital Enterprise Research Institute www.deri.ie
! RDFa only
" RDF serialization format recommended by W3C
" RDF in xHTML
" Yahoo! SearchMonkey and Google parse it
" no need to generate another output:
human and machine readable document
32
33. DrupalCon DC RDFa video
Digital Enterprise Research Institute www.deri.ie
! DrupalCon DC RDFa video
33
34. Status of RDF in Drupal 7: architecture
Digital Enterprise Research Institute www.deri.ie
! Semantics at the module level
" Modules can export data along with their semantics in the
format they want
– Core => RDFa
– Contrib => RDF/XML, ntriples and what not.
" No duplicate definition of semantics.
" Built in semantics can be altered.
" The theme layer does not have to worry about the semantics
anymore, it simply outputs it along with the data.
" Better control on what namespaces are being used for a given
page so that only these namespaces are included in the
header of the HTML document.
34
35. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! Architecture of the RDF API in core
–hook_rdf_mapping() : Allow modules to define
their own RDF mappings
–hook_rdf_mapping_alter(&$mapping) : Allow
modules to override existing mappings
–rdf_get_mapping($bundle) : Returns the mapping
for the attributes of the given bundle as an
associative array
35
36. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! hook_rdf_mapping()
36
37. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! rendered HTML
37
38. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! What’s already committed
" RDFa doctype
38
39. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! What’s already committed
" Common RDF prefix definitions
39
40. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! What’s pending
"The rest!
"1 week for the API
"6 weeks for testing (code slush)
40
41. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
! Theming layer
"Hardest part of the work
"Many tags are hardcoded in the tpl files
–we want to avoid modifing these, themers should
not have to care about RDFa
"Dilema
–centralize everything in the RDF module
–distribute the RDF in all modules (and patch these
modules)
41
42. Status of RDF in Drupal 7
Digital Enterprise Research Institute www.deri.ie
building block modules beneficiary modules
page/block blog
node forum
field book
user openid
comment profile
taxonomy all contributed modules
42
43. Thank you
Digital Enterprise Research Institute www.deri.ie
! Credits
" Frédéric Marand
" Florian Lorétan
" John Breslin
" John Morahan
" Mark Birbeck
" Rolf Guescini
" Benjamin Doherty
" Benjamin Melançon
" Stefan Freudenberg
" Peter Wolanin
" Barry Jaspan
" yched
" catch
" ...
43
44. Contribute
Digital Enterprise Research Institute www.deri.ie
! IRC: #drupal-rdf
! list of issues to review at
http://drupal.org/project/issues/search/drupal?
issue_tags=RDF
! Talk to us
! Keynote tomorrow by Dan Brickley
! code sprint on Saturday
44