developing distributed semantic systems
DESCRIPTION
TRANSCRIPT
Building Distributed Semantic Systems
Antonio Garrote Hernández
Monday, December 21, 2009
Definition
• Distributed processes
• Semantic meta data exposed as resources
• Triple space operations
• RESTful interface
Monday, December 21, 2009
Different abstraction levels
Monday, December 21, 2009
Monday, December 21, 2009
Sample application
Monday, December 21, 2009
• Sensor processes monitoring generation of exceptions in different nodes and languages/platforms
• Aggregator processes retrieving the exceptions and creating Exception resources
• Exception RESTful semantic web service
• Web client displaying generated exceptions
Exception logging system
Monday, December 21, 2009
Methodology
Monday, December 21, 2009
4 step process
1. Knowledge modeling
2. Formal description
3. Implementation of RESTful semantic services
4. Implementation of client processes
Monday, December 21, 2009
1.Knowledge modeling
Monday, December 21, 2009
1.Knowledge modeling
• Building of an ontology for the problem domain
• Ontology = TBox in Description Logics
• Use of W3C’s standard languages: RDFS or OWL
• Assistance of graphical tools like Protégé
Monday, December 21, 2009
Exception
generatedplatform
level message createdAt
ipAddress domain dc:title formatPattern
Node Language
Sample application ontology
Monday, December 21, 2009
Developing the sample application ontology with Protégé
Monday, December 21, 2009
Ontology(<http://semantic_rest/exceptions.owl>
Declaration(Class(Exception))SubClassOf(Exception owl:Thing)Declaration(Class(Node))SubClassOf(Node owl:Thing)Declaration(Class(ProgrammingLanguage))SubClassOf(ProgrammingLanguage owl:Thing)
Declaration(ObjectProperty(platform))ObjectPropertyDomain(platform Exception)ObjectPropertyRange(platform ProgrammingLanguage)
Declaration(ObjectProperty(generatedIn))ObjectPropertyDomain(generatedIn Exception)ObjectPropertyRange(generatedIn Node)
Declaration(DataProperty(level))DataPropertyDomain(level Exception)DataPropertyRange(level rdfs:Literal)
Declaration(DataProperty(ipAddress))DataPropertyDomain(ipAddress Node)DataPropertyRange(ipAddress xsd:string)
Declaration(DataProperty(formatPattern))DataPropertyDomain(formatPattern Exception)DataPropertyRange(formatPattern xsd:string)
Declaration(DataProperty(createdAt))DataPropertyDomain(createdAt Exception)DataPropertyRange(createdAt xsd:dateTime)
Declaration(DataProperty(content))DataPropertyDomain(content Exception)DataPropertyRange(content xsd:string)
Declaration(DataProperty(domain))DataPropertyDomain(domain Node)DataPropertyRange(domain rdfs:Literal))
Resulting ontologyusing OWL
Functional Notation
Monday, December 21, 2009
2.Formal description
Monday, December 21, 2009
• Formal description of the whole distributed system
• Concerned with ‘dynamic’ aspects of the system
• Use of an extended version of the Pi-Calculus
Monday, December 21, 2009
S(r)
S(j)
TEAEWGET subscribe n POST n
Formal description of the sample application
Monday, December 21, 2009
Formal description of the sample application
Processes equations:
Monday, December 21, 2009
3.Implementation of RESTful semantic
services
Monday, December 21, 2009
• 1 RESTful semantic service per OWL/RDFS class in the ontology
• Use of the Plaza Framework developed for building RESTful semantic web services
Monday, December 21, 2009
• OWL/RDFS class triples
• Exposed as a RESTful resource
• Conceptually equivalent to a Linda triple space
RESTful Semantic Web Service
Monday, December 21, 2009
Service’s InterfaceCreate POST
Read GET
Blocking read GET + xblocking header
Subscribe • GET + xsubscribe header• Websockets
Update PUT
Destroy DELETE
Monday, December 21, 2009
resourcetriplespace
REST Resource
HTTP request
triple space op.
RDF Graph
SPARQL query
Lifting
Lowering
Monday, December 21, 2009
Plaza Framework
Monday, December 21, 2009
Plaza Framework
• Manages ‘Plaza Applications’: OWL ontolgy + configuration module + resources modules
• Declarative: almost no coding required
• Support for different Java RDF repositories
• Automatic managing of triples through the concepts of write-tree and read-tree for the resources
• Support for the subscribe operation through chunked HTTP responses and websockets
Monday, December 21, 2009
Sample application configuration module
Monday, December 21, 2009
Sample application exceptions resource module
Monday, December 21, 2009
4.Implementation of client processes
Monday, December 21, 2009
• Client processes are just REST clients
• Required libraries: HTTP and triples format parser (RDF/XML, Turtle, JSON)
• Optional support for Websockets
• Clojure library included as part of the Plaza Framework
Monday, December 21, 2009
Clojure implementation of the sensor and aggregator processes
Monday, December 21, 2009
Javascript web client using websockets
Monday, December 21, 2009
Web client execution
Monday, December 21, 2009
• Semantic technologies enable rich description of problem domains vs. relational modeling
• Formal description of distributed systems enables reasoning about its validity and correctness
• RESTful semantic web services enable easy access to semantic data
• Building RESTful semantic web services clients is trivial due to the use of well known HTTP standard
• Triple Space operations are powerful coordination mechanisms for distributed processes
Conclusions
Monday, December 21, 2009