65
Semantic Technologies in Practice Knowledge and the Web 2016

Semantic technologies in practice - KULeuven 2016

Embed Size (px)

Citation preview

Page 1: Semantic technologies in practice - KULeuven 2016

Semantic Technologies

in PracticeKnowledge and the Web

2016

Page 2: Semantic technologies in practice - KULeuven 2016

Semantic technologies in practice

Some technical tidbits

Some real-world examples

A practical way of developing apps

Page 3: Semantic technologies in practice - KULeuven 2016

High quality linked dataFive stars

- The content is free- … in a structured format- … which is open- … and it uses URIs- … which are used elsewhere

<3 stars: Manual integration>3 stars: Automatic integration

Page 4: Semantic technologies in practice - KULeuven 2016

Semantic integrationMapping to linked data: - CKAN - schema.orgContent is linked data: - RDFa - TurtleInternal use of Linked Data: - mu.semte.chSPARQL endpoint - dbpedia

Page 5: Semantic technologies in practice - KULeuven 2016

“Are we succeeding?”

Page 6: Semantic technologies in practice - KULeuven 2016
Page 7: Semantic technologies in practice - KULeuven 2016

Search Engine Optimisation

Page 8: Semantic technologies in practice - KULeuven 2016

Example: Best BuyAccidental SEO

- Build blog for higher visibility- Annotations using RDFa

+ 30% incoming search traffic ?!

Page 9: Semantic technologies in practice - KULeuven 2016

Example: Best BuyBest buy now uses schema.org

Where do we see this working?

Page 10: Semantic technologies in practice - KULeuven 2016

Example: Best Buy

Page 11: Semantic technologies in practice - KULeuven 2016

Example: Coolblue

Page 12: Semantic technologies in practice - KULeuven 2016

SEO

Search engines are pushing for structured data

& it’s linked

Page 13: Semantic technologies in practice - KULeuven 2016

BBCyou know, the big broadcasters

Page 14: Semantic technologies in practice - KULeuven 2016

BBC: World cup 2010Problem:

- Information on 32 teams, 736 players- Roughly 750 pages of dynamic content

Solution:

- A semantic model- Dynamically generated pages- Minimal journalistic management

Repeated in 2012 summer olympics

Page 15: Semantic technologies in practice - KULeuven 2016

BBC: OntologiesBBC publishes Linked Data everywhere

Awesome ontologies

!! Agile ontologies !!

Semantic administration tools

Page 16: Semantic technologies in practice - KULeuven 2016

“We want people to recognise, not memorise their

way around the site”

-- Jo Kent

Page 17: Semantic technologies in practice - KULeuven 2016

Linked Open Data Cloud

Page 18: Semantic technologies in practice - KULeuven 2016

ESCObringing structure to the job market

Page 19: Semantic technologies in practice - KULeuven 2016

ESCOMeet Sara,

… a Spanish speaking nurse from Spain

Page 20: Semantic technologies in practice - KULeuven 2016

ESCO

Sarah considers filling her duties in another European country.

Page 21: Semantic technologies in practice - KULeuven 2016

ESCOSarah has limited language skills

Sarah uses Google translate and finds that enfermeratranslates to nurse

What Sarah doesn’t find is that a nurse in Spain performsthe duties of a nursery assistant in Great Britain.

Page 22: Semantic technologies in practice - KULeuven 2016

“Name concepts by URI”

Page 23: Semantic technologies in practice - KULeuven 2016

ESCO

Page 24: Semantic technologies in practice - KULeuven 2016

ESCO

Page 25: Semantic technologies in practice - KULeuven 2016

ESCOThis is what we do:

- ~7 full time knowledge engineers- ~4 full time developers and architects- Loads of tooling

- Vision for the future

Page 26: Semantic technologies in practice - KULeuven 2016
Page 27: Semantic technologies in practice - KULeuven 2016

Tea time!

Page 28: Semantic technologies in practice - KULeuven 2016

<<<SSSHHHHHHHHH>>>this is the start of the mu.semte.ch story

Page 29: Semantic technologies in practice - KULeuven 2016

*COUGH*

Page 30: Semantic technologies in practice - KULeuven 2016

mu.semte.chpractical applications with Linked Data

Page 31: Semantic technologies in practice - KULeuven 2016

In 60 secondsState-of-the-art web applications fuelled by Linked Data aware microservices

- User-facing microservices- Easy deployment using Docker- Single Page Apps using Ember.js- Well known requirements

=> [HTTP+JSON+SPARQL]

https://github.com/mu-semtech/https://mu.semte.ch

Page 32: Semantic technologies in practice - KULeuven 2016

Some history

Personal projects lack time...

Most productive future framework?

Many applications. How do we share?

Microservices and a semantic model are key

Share code on personal projects

Rails is not über-productive

Stay light, choose later

Use microservices and semantic model

Page 33: Semantic technologies in practice - KULeuven 2016

KISS

Keep It Super Simple

Page 34: Semantic technologies in practice - KULeuven 2016

KISS- Most of us aren’t microservice experts- Most of us aren’t UI experts- We need to get stuff done

- Maximize freedom- Orthogonal features- Minimize requirements- Enforce simple mental model

Page 35: Semantic technologies in practice - KULeuven 2016

Simple mental modeluser-facing http-services

Page 36: Semantic technologies in practice - KULeuven 2016

Simple mental model

User-facing microservices

Limit base technologies:

- HTTP- JSON(API)- SPARQL (one graph)

Page 37: Semantic technologies in practice - KULeuven 2016

Simple mental modelTenForce supports publishing of open data.

- Use DCAT standard

- EDCAT 2.0 released- mudCAT = back-end

- webCAT = front-end

- Custom configurations to matchspecific customer needs.

Page 38: Semantic technologies in practice - KULeuven 2016

webCAT

Page 39: Semantic technologies in practice - KULeuven 2016

Semantic modelsMany actors, telling parts of the same story

Page 40: Semantic technologies in practice - KULeuven 2016

Semantic modelsServices read/write the part of the world they understand.

User Registration:

- There’s a new user => add it to the triplestore.

User Login:

- Check username/password => connect user to current session.

Page 41: Semantic technologies in practice - KULeuven 2016

Semantic models

Registrationservice

Login service

Page 42: Semantic technologies in practice - KULeuven 2016

Semantic models

Many implementations, one model

Same model for:

- Username/Password login- OAuth login- ECAS login

Page 43: Semantic technologies in practice - KULeuven 2016

Semantic models

We use the ECAS login for ESCO-related projects.

ESCO is a taxonomy of all Skills Competences and Occupations in Europe.

The Dacota team finds and classifies content. Brains for hire!

Page 44: Semantic technologies in practice - KULeuven 2016

DockerDeployment made easy

Page 45: Semantic technologies in practice - KULeuven 2016

Docker Container =~ Lightweight Linux Virtual MachineDocker Compose =~ Topology of multi-container project

Each service runs in its own Docker Container

In short:

- Simple hosting on hub.docker.com

- Clean project description- Always works- Runs on the Big Data Europe Platform

Share using Docker

Page 46: Semantic technologies in practice - KULeuven 2016

Share using DockerWe are part of Big Data Europe

Making Big Data:

- Easy to get started- Cheaper to maintain

… in any domain

- Now including Smart Big Data:=> Semantics + Big Data = <3

Page 47: Semantic technologies in practice - KULeuven 2016

Reuse everything

Page 48: Semantic technologies in practice - KULeuven 2016

Reuse everything- Templates: basics for a service

- Configurable services- mu-cl-resources

- Ember add-ons- Hierarchy service + add-on

- Login service + add-on

Page 49: Semantic technologies in practice - KULeuven 2016

Base templates CatalogsIndexRoute = Ember.Route.extend ajax: Ember.inject.service() model: () -> @get('ajax').request('/hello')

Hello result: {{model.value}}

get '/hello/' do counter = query( "SELECT COUNT (*) as ?counter" + "WHERE {" + " ?s ?p ?o." + "}" ).first[:counter].to_i status 200 { value: counter }.to_jsonend

FROM semtech/mu-ruby-template:2.0.0-ruby2.3MAINTAINER Your Name <[email protected]>

demo: image: you/demo-service links: - db:databasedispatcher: … links: - demo:demo

match "/hello/*path" do Proxy.forward conn, path, "http://demo/hello/"end

[mu-ruby-template]

Page 50: Semantic technologies in practice - KULeuven 2016

Base templates [mu-ruby-template]

Page 51: Semantic technologies in practice - KULeuven 2016

Configurable services

(define-resource distribution () :class (s-prefix "dcat:Distribution") :properties ̀ ((:title :string ,(s-prefix "dct:title")) (:description :string ,(s-prefix "dct:description")) (:issued :string ,(s-prefix "dct:issued")) (:modified :string ,(s-prefix "dct:modified")) (:license :string ,(s-prefix "dct:license")) (:rights :string ,(s-prefix "dct:rights")) (:access-url :string ,(s-prefix "dcat:accessURL")) (:download-url :string ,(s-prefix "dcat:downloadURL"))) :has-one ̀ ((dataset :via ,(s-prefix "dcat:distribution") :inverse t :as "dataset") (format :via ,(s-prefix "dct:format") :as "format")) :resource-base (s-url "http://your-data-stories.eu/distributions/") :on-path "distributions")

[mu-cl-resources]Full JSONAPI from abstract description

Page 52: Semantic technologies in practice - KULeuven 2016

Configurable services [mu-cl-resources]

Page 53: Semantic technologies in practice - KULeuven 2016

Ember add-ons> ember install ember-async-expanding-tree

{{async-expanding-tree model=topNode config=customConfig}}

config: labelPropertyPath: 'label' getChildren: (model) -> children = Ember.ajax("/hierarchy/" + "#{@get('hierarchyId')}" + "/target/#{model.get('id')}") showMaxChildren: 50 includeLeafs: true

hierarchy: image: tf-esco/hierarchy:1.2.3 links: - db:databasedispatcher: … links: - hierarchy:hierarchy

match "/hierarchy/*path" do Proxy.forward conn, path, "http://hierarchy/"end

[hierarchy-service]

Page 54: Semantic technologies in practice - KULeuven 2016

Ember add-ons [hierarchy-service]

Page 55: Semantic technologies in practice - KULeuven 2016

What we learned

Page 56: Semantic technologies in practice - KULeuven 2016

What we learned- Extremely productive

- Code reuse

- Easy for juniors

- Customers like front-end

- Database performance is okayish

- Conscious playing with alternative solutions

Page 57: Semantic technologies in practice - KULeuven 2016

About the future

Page 58: Semantic technologies in practice - KULeuven 2016

Trigger microservices by changes insemantic model.

Example:

- Compute KPIs when a new dataset is added- Send email/tweet by writing it to the triplestore

Reactive programming

Page 59: Semantic technologies in practice - KULeuven 2016

More performance- ember-fastboot:

Faster first page render

- mu-cache:Smart caching strategies in core microservices

- mu-cl-resources:Partial resource caching

Page 60: Semantic technologies in practice - KULeuven 2016

More authorityDescribe authorization outside the microservices:

- Simplify mental model

- Help in sharing content

- Open gate to advancedapplications

search for Jonathan Langens if you want to know more

Page 61: Semantic technologies in practice - KULeuven 2016

More interactivityPush cache updates to all visiting clients.

Almost no development time to create basic interactive applications

(eg: updating KPIs, chat applications, …)

Page 62: Semantic technologies in practice - KULeuven 2016

More links

Page 63: Semantic technologies in practice - KULeuven 2016

Lego Time Star Wars: https://www.flickr.com/photos/eurobricks-starwars/5223334274/in/photolist-8XyXiu-7BJ9Xp-c2btBw-davQBK- nAQJCC-9XVSZs-a3vVhy-vPZaHw-r6NB6c-4ajSXh-rX7ezA-BBhAWf-BiWDpc-rED79Q-rX7f8u-mtctqc-wtp245-fcNzVb-CgXNsA-D4Uxps-wKj5u9-rX7fVm- rUWnBU-uhC54v-rXeB4g-zVknPq-qxEqXx-8GSCNc-nzg79j-biFNa6-9fXjwV-biFMTa-a1kbsX-5HnKDa-dQCdnW-a54g8X-bm9TRN-8zJUzU-fbGRan-sdr4hw- e9DMFz-q3qQqf-aAZwyV- bm9Tsw-dQCdpb-sdpUWU-rkow4K-wazJmK-bz4Md8-pyU2QM Wendelstein 7X: http://www.sciencemag.org/news/2015/10/ bizarre-reactor-might-save- nuclear-fusion 300SL: https://www.flickr.com/photos/smfan/7181631212/in/photolist-bWBJKN-o52kEN- 5pCCRH-6NezBh-oF2nYm-gHtRrE-6KAHDv-cPKKj9-2aj2ur-s3A8ua-5pH14j-bQk48B-omejVV-q2tAx7-o8yCtS-nRauVz-5pCNWB-o525H4-o9dqig-sk2we8- o4EApo-N2NDc-o7jxQM-5pCG4c-81DnQh-exNBvp-kc9m4-exS223-cm2nm5-aPXHgc-7Tg5XD-6HQ5Q9-6w1JtR-5pCGWi-eb6dJe-pJYFdi-azFSaU-p5y4mb- 6GjCy2-q2kGp6-o52baX-9XtXDc-4GqX86-pJXbk1-8canak-q2tu1j-6HQ6eo-sjZQkD-dhaPyf-bBqucA http://www.quickmeme.com/meme/3stqet Big Data Europe: https://www.big-data-europe.eu/ Docker Logo: http://www.silicon.de/41608942/microsoft-optimiert-windows-server-2016-fuer-die- cloud/ webCAT: https://github.com/tenforce/webcat Banksy Van: http://artcentron.com/2016/06/22/banksy-graffiti-art-swat-van-sale/ #prettyPhoto Banksy Bananas: https://www.touchofmodern.com/sales/banksy-8a9ea26d-040f-4435-ada1-86e7a6b4a05c/pulp-fiction-bananas Your Data Stories platoform: http://platform.yourdatastories.eu/ Star Wars Clones box: https://www.flickr.com/photos/kalexanderson/ 5410769283/in/photolist-9f8Bcz-5SJTDj-55MnH2-4WEfzr-in3p6t-drf7fp-3b46gb-bKfRW4-3aYzBt-4xztdx-35E11y-9jVQVR-9wuv3f-9r3mWe-9hNTVz- 7JzMxg-7JYZFM-Hw1QSq-8FW8eh-nVj9Sc-8ytJvH-aPPKYz-dYyYWK-7fhBFE-7GgZYm-e5M9jV-bwm6S9-7fhyGd-e5SNkL-5LDPWB-e5SNdf-4MKWht-e5SLrb- 5zPWDw-74Yjyb-8xh5Vr-9Apdwp-4XUn5j-jSHfRS-9fAZ86-eueiqp-e5SPwu-e5MbcZ-9tJQdd- 5f4rJT-9HsoqF-9hud4U-e5MaQX-52mMrQ-e5M9WX/ GitHub Logo: https://blog.adafruit.com/2012/12/31/github-has-big-dreams-for- open-source-software-and-more/ Twitter Logo: https://en.wikipedia.org/wiki/File:Twitter_bird_logo_2012.svg mu-ruby-template: https://github.com/mu-semtech/mu-ruby-template mu-cl-resources: https://github.com/mu-semtech/mu-cl-resources mu-project: https://github.com/mu-semtech/mu-project

Resources used & interesting links

Page 64: Semantic technologies in practice - KULeuven 2016

More questionsright now, or ask later