18
Linked Data Fragments Exploring the Trade-Offs of Web Interfaces to Support Live Queries over (Semanc) Web Data Olaf Harg @olaarg

Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

Linked Data FragmentsExploring the Trade-Offs of Web Interfaces toSupport Live Queries over (Semantic) Web Data

Olaf Hartig

@olafhartig

Page 2: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

2Olaf Hartig – Linked Data Fragments

Server

Page 3: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

3Olaf Hartig – Linked Data Fragments

Semantic Web Solutions (So Far)

Server …( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post191 ) ...

Page 4: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

4Olaf Hartig – Linked Data Fragments

Semantic Web Solutions (So Far)

Server …( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post191 ) ...

Request Give me all.

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post191 ) ...

RDF datadump

Page 5: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

5Olaf Hartig – Linked Data Fragments

Semantic Web Solutions (So Far)

ServerURI Lookup Request

Give me data about Bob.

( Alice, knows, Bob )( Bob, wrote, Post191 )

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post191 ) ...

RDF datadump

Linked Datadocuments

Page 6: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

6Olaf Hartig – Linked Data Fragments

Semantic Web Solutions (So Far)

ServerSPARQL Request

SELECT ?x ?nWHERE {

?s wrote ?p .?p title ?t .FILTER ( REGEX(STR(?t), "sunshine", “i” )?s knows ?x .OPTIONAL ( ?x name ?n )

}

{ { ?x → Bob, ?n → "Robert" }, { ?x → Eve }, { ?x → Dan, ?n → "Daniel" } }

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post191 ) ...

RDF datadump

Linked Datadocuments

SPARQLendpoint

Page 7: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

7Olaf Hartig – Linked Data Fragments

Semantic Web Solutions (So Far)

ServerSPARQL Request

SELECT ?x ?nWHERE {

?s wrote ?p .?p title ?t .FILTER ( REGEX(STR(?t), "sunshine", “i” )?s knows ?x .OPTIONAL ( ?x name ?n )

}

{ { ?x → Bob, ?n → "Robert" }, { ?x → Eve }, { ?x → Dan, ?n → "Daniel" } }

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post191 ) ...

RDF datadump

Linked Datadocuments

SPARQLendpoint

Out of 427 public SPARQL endpoints,more than half had <95% availability.1

→ not available for at least 1.5 days each month

1 C. Buil Aranda, A. Hogan, J. Umbrich, et al.: SPARQL Web-Querying Infrastructure: Ready for Action? ISWC 2013.

Page 8: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

8Olaf Hartig – Linked Data Fragments

Linked Data Fragments1,2

more generic requestshigher client costlower server cost

more specific requestslower client cost

higher server cost

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

RDF datadump

Linked Datadocuments

SPARQLendpoint

● Whole spectrum of trade-offsexists between these extremes

● Explore this spectrum and findinteresting sweet spots

Page 9: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

Triple Pattern Fragments (TPF)1,2

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

Page 10: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

10Olaf Hartig – Linked Data Fragments

Triple Pattern Fragments (TPF)

more generic requestshigher client costlower server cost

more specific requestslower client cost

higher server cost

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

RDF datadump

Linked Datadocuments

Triple PatternFragments

(TPF)1,2

SPARQLendpoint

TPF Request

( ?s, knows, ?o )

( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post91 ) ...

Server

Page 11: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

11Olaf Hartig – Linked Data Fragments

TPF-based Execution of SPARQL Queries

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

TPF Request

( Alice, knows, ?x )

( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post91 ) ...

ServerSPARQL Query

SELECT ?y WHERE { Alice knows ?x . ?x wrote ?y }

TPF Request

( ?x, wrote, ?y )

( Alice, wrote, Post25 )( Bob, wrote, Post91)

...

( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )

( Alice, wrote, Post25 )( Bob, wrote, Post91)

...

Page 12: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

12Olaf Hartig – Linked Data Fragments

TPF-based Execution of SPARQL Queries

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

TPF Request

( Alice, knows, ?x )

( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )

…( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )( Alice, wrote, Post25 )( Bob, wrote, Post91 ) ...

ServerSPARQL Query

SELECT ?y WHERE { Alice knows ?x . ?x wrote ?y }

TPF Request

( Bob, wrote, ?y )

( Bob, wrote, Post91)

( Alice, knows, Bob )( Alice, knows, Eve )( Alice, knows, Dan )

TPF Request

( Eve, wrote, ?y )

empty

Page 13: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

13Olaf Hartig – Linked Data Fragments

Experimental Setup

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

● Berlin SPARQL Benchmark– Synthetic benchmark– 100M triples

● Amazon EC2 machines– 1 server (used either as SPARQL endpoint

or as TPF server)– 1 cache– 1–240 clients

Page 14: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

14Olaf Hartig – Linked Data Fragments

Throughput (normalized by # of clients)

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

Observation: query throughput of TPF is lower but resilient to high client numbers

Page 15: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

15Olaf Hartig – Linked Data Fragments

Server-Side CPU Load

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

Observation: TPF server uses much less CPU

Page 16: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

17Olaf Hartig – Linked Data Fragments

Cache Traffic (TPF vs. SPARQL Endpoints)

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

Observation: caching is significantly more effective (because clients reuse fragments for queries)

Page 17: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

18Olaf Hartig – Linked Data Fragments

Summary of Experimental Results

more generic requestshigher client costlower server cost

more specific requestslower client cost

higher server cost

1 R. Verborgh, O. Hartig, B. De Meester, et al.: Querying Datasets on the Web with High Availability. ISWC 2014.2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web Semantics 37-38, 2016

RDF datadump

Linked Datadocuments

Triple PatternFragments (TPF)

SPARQLendpoint

Compared to SPARQL endpoints, query throughput is lower but ...● ...resilient to high client numbers● ...server-side load is much smaller and more regular

(which allows for a higher availability, in particular on small, less expensive servers!)

● ...HTTP caching is significantly more effective

Page 18: Linked Data Fragments - IDA > Home...2 R. Verborgh, M. Vander Sande, O. Hartig, et al.: Triple Pattern Fragments: a Low-cost Knowledge Graph Interface for the Web. In Journal of Web

www.liu.se