Skip to content

miaEngiadina/ap-ld

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActivityPub with Linked Data as data model

This is an experiment to implement an ActivityPub server that stores data (activities and actor profiles) as linked data.

Overview

The ActivityPub is a protocol is a decentralized social networking protocol based on ActivityStreams. ActivityStreams specifies the representation of activities and actors in social networks. Activities and actors are represented as Linked data, serialized as JSON-LD.

Existing ActivityPub servers (known to the author) store data in relational databases, making use of well-known database technology. However much of the flexibility of linked data is lost and servers are usually restricted to specific types of data (e.g. Pleroma and Mastodon to notes, PeerTube to videos, etc.). A data-type-independent ActivityPub Server, that can handle any kind of data, needs to use linked data as the underlying data model.

A database that can store linked data is called a triplestore. This experiment uses Datalog to store and query data. Datalog is a logic programming language/deductive database system that can be used as a hacked-together triplestore.

Ideas

Triplestore

Data is stored in a triplestore. Endpoints get (or put) data into triplestore with suitable queries. Data validation is also done with queries on linked data.

Annotated RDF for Access Control

Data that is stored in an ActivityPub server (e.g. a published note) may be accessible to a user if it is placed in the users inbox or when addressed to the public. This requires certain access control to ensure that users can only see data they are allowed to.

Access control can not be directly modeled in linked data/RDF.

Annotated RDF is an extension to RDF that adds annotations, that can be used to implement access control. This experiment aims to implement such a system for access control.

Test data

In order to test the ideas it would be nice to have a large data set of real (publicly available) ActivityPub data. This can be obtained by scraping public ActivityPub servers.

Prolog

Currently this experiment is conducted using the Racket programming language, maybe it would be easier to do it in Prolog, which has a nice Semantic Web Library. However, the Prolog Semantic Web Library does not yet have JSON-LD support.

Get started

See ~main.rkt~.

See also

About

This experiment is conducted as part of the openEngiadina project.

For questions, feedback and comments, contact pukkamustard (pukkamustard [at] posteo [dot] net).

About

ActivityPub with Linked Data as data model

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages