Web APIs for decentralized knowledge graphs

Ruben Verborgh, Ghent Universityimec

Solid World, 13 January 2022

Read the full story in my blog post Reflections of knowledge.

Web APIs for decentralized knowledge graphs

Ruben Verborgh

Ghent University – imec

An ecosystem of Solid pods forms
a decentralized knowledge graph.

How can we access, search, and query
such decentralized knowledge?

Web APIs provide access
to remote functionality.

  1. action APIs
    • RPC
    • SOAP
    • XML
  2. document APIs
    • REST APIs
    • LDP
  3. graph APIs
    • GraphQL
    • SPARQL

Graph APIs are just a specific kind of document APIs.

There's no such thing as a query API.
All Web APIs provide some kind of queries.

Solid applications need, in some way,
read/write access to a knowledge graph.

[a browser app needs access to knowledge]

The graph is too big for any single place,
so apps reconstruct the whole via parts.

[apps operate parts of the knowledge graph]

When knowledge fits in a single source,
we can place an API in front of it.

[accessing knowledge hosted on a single server]

Abstract knowledge needs to be exposed
through concrete documents/resources.

[accessing knowledge through a single JSON API]

A GraphQL API combines data from across
multiple resources of the “main” API.

[GraphQL APIs can access multiple conceptual resources]

Let's revisit the story for cases where
knowledge cannot fit in one place.

[an application needs to access a knowledge graph that is distributed across multiple servers]

Each data pod exposes its part
as RDF through a Web API.

[each server exposes an RDF API]

Different APIs for RDF
have different characteristics.

[RDF can be exposed through different APIs]

It quickly becomes unfeasible for apps
to deal with all possible API combinations.

[each server might expose the same knowledge through multiple APIs]

A GraphQL Web API cannot help us,
since there's no server to attach it to.

[we cannot attach a GraphQL API to any single server when the data resides in multiple servers]

The app can still be written with GraphQL:
a library translates it into HTTP requests.

[a client-side library translates GraphQL queries from the app into HTTP requests for different APIs and servers]

Solid has kickstarted the transition
from API integration to data integration.