Experiments in Linked Data

36
1 Experiments in linked data Lars Marius Garshol, <[email protected]> Topic Maps 2010, Oslo, 2010-04-15 http://twitter.com/larsga

description

An overview of various private experiments to implement Linked Data using Ontopia.

Transcript of Experiments in Linked Data

Page 1: Experiments in Linked Data

1

Experiments in linked data

Lars Marius Garshol, <[email protected]>Topic Maps 2010, Oslo, 2010-04-15http://twitter.com/larsga

Page 2: Experiments in Linked Data

2

What is this talk about?

• Connecting across applications– using common identifiers for subjects

• The applications are– tmphoto photo gallery– tmtools Topic Maps tools index– Larsblog my private blog– tmcase1 Naito-san’s index of Topic

Maps talks– ontopia.netthe new Ontopia web site (not live

yet)

Page 3: Experiments in Linked Data

3

Why experiments?

• I prefer to talk about real projects– but linked data has been hard to sell to

customers– because the concept is hard to grasp?– because collaboration between organizations

is hard?– because the market wasn’t ready yet?– anyway, there are very few projects so far

• Therefore I’m showing some private experiments instead– the scale and complexity are limited– but it does demonstrate some of the potential

Page 4: Experiments in Linked Data

4

A lightning tutorial

Identifiers

Page 5: Experiments in Linked Data

5

Identifiers?

• PSIs (Published Subject Identifiers)– a part of the Topic Maps standard, used for

merging– a URI attached to a topic to identify it– the URI should refer to a page defining the

subject

T

http://psi.ontopedia.net/Lars_Marius_Garshol

Page 6: Experiments in Linked Data

6

NameDefinition

Page 7: Experiments in Linked Data

7

PSIs – things to note

• Anyone can make a PSI– as long as they can publish content on the

web

• Domain names ensure PSIs are globally unique– only I make PSIs starting

http://psi.garshol.priv.no/

• PSIs can identify anything– if you can imagine it, you can make a PSI for

it

Page 8: Experiments in Linked Data

8

Starting with the first application

So, to the experiments

Page 9: Experiments in Linked Data

9

tmphoto

• A topic map to organize my personal photos– contains ~15,000 photos

• A web gallery runs on Ontopia– on www.garshol.priv.no

PhotoPerson

Event

Category

Location

http://www.garshol.priv.no/tmphoto/

Page 10: Experiments in Linked Data

10

You need more than one application to have true linked data. Data inside a single application is of course linked, but only in a trivial sense.

No linked data at this point

Page 11: Experiments in Linked Data

11

tmtools

• An index of Topic Maps tools– organized as shown on the

right

• Again, web application for browsing– screenshots below

Softwareproduct

Person

Organization

Platform

Category

Technology

http://www.garshol.priv.no/tmtools/

Page 12: Experiments in Linked Data

12

The person page

Boring! No content.

Page 13: Experiments in Linked Data

13

And in tmphoto...

Page 14: Experiments in Linked Data

14

get-illustration

• A web service in tmphoto– receives the PSI of a person– then automatically picks a suitable photo of that

person

• Based on– vote score for photos,– categories (portrait),– other people in photo– ...

• The service returns– a topic map fragment with links to the person page

and a few different sizes of the selected photo

http://www.garshol.priv.no/blog/183.html

Page 15: Experiments in Linked Data

15

get-illustration

tmphoto tmtools

Do you have a photo ofhttp://psi.ontopedia.net/

Benjamin_Bock ?http://www.garshol.priv.no/tmphoto/get-illustration?identifier=http://psi.on....

Hmmm. Scores, categories,

people in photo, ...

Topic mapfragment

Page 16: Experiments in Linked Data

16

Voila...

Page 17: Experiments in Linked Data

17

Points to note

• No hard-wiring of links– just add identifiers when creating people topics– photos appear automatically– if a better photo is added later, it’s replaced

automatically

• No copying of data– no duplication, no extra maintenance

• Very loose binding– nothing application-specific

• Highly extensible– once the identifiers are in place we can easily pull

in more content from other sources

Page 18: Experiments in Linked Data

18

How to choose common identifiers?

• I was of course able to use the same PSI because I produced both datasets

• But what if the two applications were maintained by different people?

• Subj3ct.com solves that problem– search on Subj3ct to find global identifiers for

your subjects

Page 19: Experiments in Linked Data

19

Page 20: Experiments in Linked Data

20

Overview

tmtools tmphotoget-illustration

Page 21: Experiments in Linked Data

21

Now what?

So far, so good

Page 22: Experiments in Linked Data

22

My blog

• Has more content about– people (tmphoto & tmtools),– events (tmphoto),– tools (tmtools),– technologies (tmtools)

• Should be available in those applications

Page 23: Experiments in Linked Data

23

Solution

• My blog posts are tagged– but the tags are topics, which can have PSIs– these PSIs are used in tmphoto and tmtools,

too

• The get-topic-page request lets tmphoto & tmtools ask the blog for links to relevant posts– given identifiers for a topic, returns links to

pages about that topic

http://www.garshol.priv.no/blog/145.html

Page 24: Experiments in Linked Data

24

get-topic-page

Blog tmphoto

Do you have pages abouthttp://psi.ontopedia.net/

TMRA_2008 ?http://www.garshol.priv.no/blog/get-topic-page?identifier=http://psi.on....

Topic mapfragment

Topics linking toindividual blog posts

Page 25: Experiments in Linked Data

25

In tmphoto

Page 26: Experiments in Linked Data

26

Overview

tmtools tmphotoget-illustration

blog

get-topic-page

Page 27: Experiments in Linked Data

27

Easy next steps

• Topic pages on the blog must link to tmtools and tmphoto– trivial to do via get-topic-page

• And the blog can use get-illustration, too– and so can ontopia.net and tmcase1

• Oh, and they should link to the blog and the other applications...

Page 28: Experiments in Linked Data

28

After a little hacking...

tmtools tmphoto

blog

tmcase1

ontopia.net

get-topic-pageget-illustration

What a mess!

Page 29: Experiments in Linked Data

29

We need a clean-up here

• The get-topic-page service is generic– that is, it’s not tied to any specific application– further, the result set is a topic map fragment

• Topic maps can be merged as we know• So, we could make a hub service– basically, a get-topic-page aggregator

Page 30: Experiments in Linked Data

30

Client app #2

Client app #1 Client app #3

How it works

Hub service

blog tmcase1 tmtools tmphoto

ontopia.net

Page 31: Experiments in Linked Data

31

Benefits of this approach

• Much cleaner architecture– overview diagram no longer looks like a bowl

of spaghetti

• Easier to maintain– if I want to add/remove a service I do it in a

single place

• Safer– the hub service insulates clients from

slow/unresponsive servers

Page 32: Experiments in Linked Data

32

The result

Page 33: Experiments in Linked Data

33

Subj3ct.com

• Subj3ct is not just a database of PSIs– it also has links to pages with more

information about the subjects– this can easily be wrapped in a get-topic-page

service

Subj3ctWrapperserviceClient

get-topic-pagehttp://api.subj3ct.com/subjects

Page 34: Experiments in Linked Data

34

So we can add Subj3ct...

Client app #2

Hub service

blog tmcase1 tmtools tmphoto

ontopia.netSubj3ct

Client app #1 Client app #3

Page 35: Experiments in Linked Data

35

There is much more to tell

• Unfortunately, 35 minutes is not very much– and this stuff takes some explaining

• So I had to omit– sharing data with TMSync– manual reuse of data with the Ontopoly editor– ...

• Maybe next year

Page 36: Experiments in Linked Data

36

Conclusion

• Linked data is technically easy– conceptually and politically it’s harder

• All you really need is– shared PSIs on your topics, and– someone to connect with

• Subj3ct.com is crucial– ensures that different players pick the same

PSIs independently– without this there is no connecting...