SOCOM Tutorial Slides - Comunica

Julian Rojas, Ruben Taelman

ISWC 2019, Auckland, 26 October 2019

SOCOM Tutorial Slides - Comunica

Ghent University – imec – IDLab, Belgium

Tutorial Website:

Linked Data on the Web is complex

Comunica is many things

Comunica is a meta-query engine created to handle this complexity


Triple Pattern Fragments as an alternative RDF interface

TPF has many extensions

Different branches/clients to support these features

Modular system

Experiment data

Modularity using the actor model

Logic is separated into different actors

Each actor independently performs a specific task.

Actors can be combined for solving more complex tasks

Actors are grouped in task-specific buses.

Mediators are responsible for selecting an actor to solve a certain task.

Example: Parse as fast as possible

Modules are wired together through semantic configuration files

Components.js: a semantic dependency injection framework.

Configuration files declare and parameterize actors, mediators and buses.

Links all the building blocks together, without having to do this in the code!

Implementation details

Current features

Query RDF Graphs

Through Comunica is possible to query local and remote RDF graphs using query languages of different levels of expressivity:

Query from the Command Line

After installing the @comunica/actor-init-sparql package

Outputs the resulting bindings

comunica-sparql <datasource-url(s)> <query>
comunica-sparql \
            "SELECT * WHERE { ?s ?p ?o } LIMIT 100"
  {"?s":"ex:test","?p":"dbpprop:date","?o":"\"Summer 1998\""},

Set up a SPARQL endpoint

After installing the @comunica/actor-init-sparql package

Provides a functioning SPARQL endpoint

comunica-sparql-http <context>
comunica-sparql-http \
    '{ "sources": [{ "type": "auto", "value" : \
        "" }]}'

Query through your browser

Running Comunica engine in the browser

Host custom engines yourself:

Hands-on: querying data using Comunica

Goal: Cover the different ways Comunica can be used to query data

This tutorial will introduce both command-line tools and code-based querying

No advanced JavaScript knowledge required, we start from scratch

Hands-on: requirements

Hands-on: five steps

  1. Querying from the command line: Query existing sources.
  2. Querying from different sources: Create a local source.
  3. Querying from JavaScript applications: Add querying to your application.
  4. Setting up a SPARQL endpoint: Use Comunica as a proxy.
  5. Setting up a Web client: Provide your own interface.