incremental materialization of rdf graph closures for stream reasoning alexandre mello ferreira (phd...

27
Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Post on 19-Dec-2015

221 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Incremental Materialization of RDF Graph Closures for Stream Reasoning

Alexandre Mello Ferreira (PhD student)

22/11/2010

Page 2: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

2Outline

Introduction

Problem statement

RDF in a nutshell

Our proposed approach

Envisioned scenario

Model

Time-stamped streams

Incremental maintenance of materialization for RDF streams

Implementation and first results

Jena

Deductive rules

Results

Page 3: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

3Outline

Introduction

Problem statement

RDF in a nutshell

Our proposed approach

Envisioned scenario

Model

Time-stamped streams

Incremental maintenance of materialization for RDF streams

Implementation and first results

Jena

Deductive rules

Results

Page 4: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

4Problem statement

Large use of sensed data

Urban computing

Green computing

Monitoring systems in large environments lead to complex

and cost hungry systems

Invisibility to keep ontology representation in memory due

to often updates

How to make data representation more useful

E.g. (from IBGE):

<Brazil, hasPopulation, 070mi>

<Brazil, hasPopulation, 192mi>

<Brazil, hasPopulation, 260mi>

Page 5: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

5Problem statement

Large use of sensed data

Urban computing

Green computing

Monitoring systems in large environments lead to complex

and cost hungry systems

Invisibility to keep ontology representation in memory due

to often updates

How to make data representation more useful

E.g. (from IBGE):

<Brazil, hasPopulation, 070mi> [1960]

<Brazil, hasPopulation, 192mi> [2010]

<Brazil, hasPopulation, 260mi> [2050]

Page 6: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

6RDF in a nutshell

Resource Description Framework (RDF) is a W3C

recommendation for resource description

Basically composed by: <S, P, O>

SUBJECT: something identified (resource)

PREDICATE: property that describes the subject

OBJECT: either the property value or another resource

POLIMI

DEI

45.48

9.23

“DEI”

“Dipartimento di Elettronica e Informazione”

dc:title

edu:hasDept

geo:long

geo:lat

Page 7: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

7RDF in a nutshell

Web semantics vocabularies

Serialization syntax:

Notion 3 (“N3”)

RDF/XML

Page 8: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

8Outline

Introduction

Problem statement

RDF in a nutshell

Our proposed approach

Envisioned scenario

Model

Time-stamped streams

Incremental maintenance of materialization for RDF streams

Implementation and first results

Jena

Deductive rules

Results

Page 9: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

9Envisioned scenario

Typical 5,000 square-foot data center

Demand side – IT systems

Supply side – Cooling systems and power systems

Power consumption

(watts)

Usage percentage

(%)

Page 10: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

10Envisioned scenario

Volume

Mid-range

High-end

Server ID

Rack

CPUs (8x)

Diks (4x)

Mode

Virtualization

eligible

AMD

Intel

Server ID

Usage

Consumption

Mode

Server ID

Usage

Consumption

Mode

RESOURCE TYPE STATIC DATA DEDUCTED DATA

Page 11: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

11Envisioned scenario

RDF/XML sample of the background knowledge

Page 12: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

12Outline

Introduction

Problem statement

RDF in a nutshell

Our proposed approach

Envisioned scenario

Model

Time-stamped streams

Incremental maintenance of materialization for RDF streams

Implementation and first results

Jena

Deductive rules

Results

Page 13: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

13Time-stamped streams

Static data

Stream data

Derived data

Time-stamped data

Page 14: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

14Incremental maintenance

Based on the work developed by Volz and Prof. Ceri

database research group, the following triples definitions

are considered:

Tin enter in the window stream

Tstay stay in the window stream and derived

Texp exit the window (expire) stream and derived

dTnew Triples trigged by Tin and not in Tstay

dTrenew Triples trigged by Tin and in Tstay

dTtimestamp Triples trigged by both dTnew and dTrenew

T+ add to the materialization

T- remove fom the materializationTresult = (Tinicial U T+) \ T-

Page 15: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

15Incremental maintenance

The implemented solution (time 6):

s1

c592

51

c370

1

2

d2

isConsuming

isConsuming

isConsuming

hasDisk

hasCPU

hasCPU

LowPowerhasMode

47

3isUsing

Page 16: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

16Incremental maintenance

The implemented solution (time 7):

s1

c554

51

c3

7

2

d2

isConsuming

isConsuming

hasDisk

hasCPU

hasCPU

LowPowerhasMode

LowPower

hasMode

47

3isUsing

Page 17: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

17Incremental maintenance

The implemented solution (time 7):

s1

c554

51

c3

7

2

d2

isConsuming

isConsuming

hasDisk

hasCPU

hasCPU

LowPowerhasMode

LowPower

hasMode

47

3isUsing

Page 18: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

18Incremental maintenance

The implemented solution (time 8):

s1

c554

c3

7d2

47

3isConsuming

isUsing

hasDisk

hasCPU

hasCPU

LowPower

hasMode

c9

8

12isUsing

52

hasCPU

isConsuming

LowPower

hasMode

quietMode

hasMode

True

eliVirt

Page 19: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

19Outline

Introduction

Problem statement

RDF in a nutshell

Our proposed approach

Envisioned scenario

Model

Time-stamped streams

Incremental maintenance of materialization for RDF streams

Implementation and first results

Jena

Deductive rules

Results

Page 20: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

20Jena2 inference subsystem

Framework to develop semantic web app

It provides:

RDF API

Reading and writing RDF/XML, N3, and N-Triples

In-memory and persistence storage

SPARQL query engine

1. // creates an empty RDF model2. Model myRDFmodel = ModelFactory.createDefaultModel();3. 4. // creates a new generic rule reasoner to support user defined rules5. Reasoner reasoner = new GenericRuleReasoner(Rule.parseRules(ruleSrc));6. reasoner.setDerivationLogging(true);7. 8. // creates a new inference model which performs RDF inference over myRDFmodel 9. // using my previous defined reasoner10. InfModel inf = ModelFactory.createInfModel(reasoner, myRDFmodel);

Page 21: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

21Deductive rules

Page 22: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

22Deductive rules

Page 23: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

23Deductive rules

Page 24: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

24First results

0 5 10 15 20 251

10

100

1000

10000

naive approach incremental-stream

ms.

Average time to maintain the materialization vs window sliding

Axis X represents the number of arrival stream triples

It depends on the type of the triple

Page 25: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

25First results

0 100 200 300 400 500 600 700 800 900 10001

10

100

1000

10000

naive approach incremental-stream

ms.

Average time to maintain the materialization vs incremental

number of monitored data (sensors)

Axis X represents the number of sensed components

It keeps homogeneous regarding to scalability

Page 26: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

26Conclusion remarks

Next steps

Merge our scenario with Urban computing in order to come up

with comparable experiments

Try alternative inference engines and compare their features

Apply the proposed approach to a real data center environment

(like in GAMES project)

Page 27: Incremental Materialization of RDF Graph Closures for Stream Reasoning Alexandre Mello Ferreira (PhD student) 22/11/2010

Alexandre Mello FerreiraDEI

27

Thank you!