rdf-pub - generic Activity-Pub Server
Introduction
!! The english version is under construction !! |
Facts
rdf-pub …
-
… links a wide variety of content (event, location (POI), article, note, audio, video, image, …) with each other and serves as an interface to the ecosystem of social platforms (Fediverse).
-
… enables application developers to link their applications with the Fediverse via “Activity-Pub - Client to Server Interactions” (C2S).
-
… addresses the group of people who share data publicly. It is not meant to be a messenger, https://matrix.org/ can do that better.
-
… creates a network of searchable, categorizable, machine-readable, machine-interpretable and thus findable content.
-
… is a database for content of all kinds (RDF)
Target groups
Application developers
rdf-pub is primarily aimed at application developers who want to develop applications for the Fediverse or want to link existing applications with the Fediverse.
Activity-Pub Community (W3C Social Web Incubator Community Group)
Client to server interactions still have a lot of potential. rdf-pub will hopefully help to fill gaps in the C2S specification and possibly be a reference implementation. See also nextgen-activitypub-social-api
Researchers
rdf-pub is also intended to appeal to researchers who, with the emerging network of linked-open-data to create a “New” Internet. Why “new” in quotation marks? Because Tim Berners-Lee did not envision the Internet as it is today when he developed it. the Internet as it is today, but rather the Internet that will hopefully emerge soon. See also Social Linked Data.
-
SoLiD has as its focus real sovereignty over one’s own data and thus better privacy.
-
rdf-pub focuses on a network of social, public* content.
(*) _Which does not mean that privacy does not play a role in rdf-pub. Each user has their own database in rdf-pub, which is separate from the public data.
Companies
Last but not least, rdf-pub can also offer great added value for “data-heavy” companies. I maintain that all companies have a problem with data and data models. However, these problems cannot be solved with software in the first place! An enterprise data model is needed. Unfortunately, the specialist departments are often not able to think in data models, so this is done by the developers of the many applications in the company. This leads to distributed, redundant data. The extent to which rdf-pub will will become interesting for companies is still open and is by no means the main focus at present. If you would like to talk to me about your enterprise data model, contact me.
Reading guide
The topic Fediverse, Activity-Pub and therefore also rdf-pub is quite complex and difficult to understand at first. I try to address different target groups in this documentation, please choose for yourself:
I am a beginner and less interested in the technology
-
You should have an understanding of Fediverse, otherwise you will not be able to understand rdf-pub.
-
Please also take a look at the information under Activity-Pub. This will help you.
-
After you have understood the above, you can start with the documentation Basic problem.
-
Then continue reading at beginner.
I’m a beginner and want to understand everything
-
Great, that makes me happy. You may have a long way to go.
-
But the community is open and will support you.
-
Take a look at everything under Basics …
-
Once you have understood the above, you can start working on the Basic problem documentation.
-
… and then venture into the documentation for advanced.
Fediverse', 'Activity-Pub', 'Linked-Data', 'RDF', … are no foreign words for you
-
After you have read the documentation [basic problem], take a look at the documentation for advanced.
Basics
Fediverse
The Fediverse is a networked ecosystem of social platforms based on an open protocol called ActivityPub, which allows you to transfer your content, data, … between the networks.
What ?!?!!
It would go beyond the scope of this website to explain this in detail, so I refer here to external content
-
Explanation of Framasoft english
-
Explanation of 'The Fediverse Files' (WordPress.com) english
-
Explanation by youknow german
A good introduction to the Fediverse (English) can be found at here.
Activity-Pub
Activity-Pub is a protocol (from today’s point of view rather THE protocol), which enables the Fediverse. The protocols behind e-mail (which is also a federated service on the Internet) are IMAP and SMTP. So you can say Activity-Pub is the IMAP/SMTP of the Fediverse.
In simple terms, you can think of Activity-Pub as your e-mail program. Everything you send to others ends up in your own outbox and everything that is sent to you ends up in your own inbox. Sending is done to actors (person, group, organization, application, service) or to collections. A collection is e.g. all people who follow you 'followers'. A special collection is 'public', which means that the message can be seen by everyone. The important thing to know here is the difference to platforms such as Facebook, Instagram & Co. is that actors can be addressed on all platforms in the Fediverse and not just on their own instance. (So @max@rdfpub-organization1 can exchange messages with @maria@rdfpub-organization2, as well as with @john@mastodon.sozial)
Here arthurpizza tries to explain this, which he more or less succeeds in doing. It might be a bit confusing for newbies or non-technical people. This is due to the complexity of the subject, it is not easy to understand it and not to explain it at all. For non-technicians, however, it is not necessary to understand it. It is enough to understand to some extent what the Fediverse is and to know that Activity-Pub is the protocol that enables the Fediverse from a technical point of view.
Linked Data
Manu Sporny has created an excellent explanatory video english on this subject
in a nutshell:
There is the address: Musterstrasse 13; 1234 Musterstadt. We can give this address the ID 'http://example.com/1234_musterstrasse_13' (Id’s are always URL’s in the Linked Data context).
There is the person 'Klaus' and the person 'Petra', both live at the address 'http://example.com/1234_musterstrasse_13'.
'Klaus' and 'Petra' also receive an ID 'http://example.com/Klaus' & 'http://example.com/Petra'.
Our address has the properties: Street, House, Postcode, City. In the context of linked data, properties are URLs. They can be represented like this, for example:
Musterstrasse |
|
13 |
|
1234 |
|
Musterstadt |
And since this quickly becomes confusing, you can assign so-called prefixes for urls. So if we specify that the prefix 'example' stands for 'http://example.com/', it looks like this:
example:strasse |
Musterstrasse |
example:streetNumber |
13 |
example:zip |
1234 |
example:city |
Musterstadt |
And for Klaus and Petra:
example:name |
Klaus |
example:adress |
example:1234_musterstrasse_13 |
example:name |
Petra |
example:adress |
example:1234_musterstrasse_13 |
Or as a diagram like this:
Linked Open Data
Excerpt from Wikipedia:
-
Linked open data are linked data that are open data.Tim Berners-Lee gives the clearest definition of linked open data as differentiated from linked data.
-
Linked Open Data (LOD) is Linked Data which is released under an open license, which does not impede its reuse for free.
-
Tim Berners-Lee, Linked Data:
-
Large linked open data sets include DBpedia, Wikibase, Wikidata and Open ICEcat.
-
RDF
Ok, let’s get down to business with RDF. RDF is the abbreviation for 'R esource D escription F ramework' a standard of the World Wide Web Consortium (W3C)
It is important to know that Activity-Pub is based on JSON-LD and that JSON-LD is a representation of RDF.
At the moment, two fronts seem to be forming in the activity pub community:
A difficult situation. I am very much in favor of LSON-LD or even more RDF and would like to find a solution for both target groups. A simple view of certain types with JSON but but also the possibility of mapping/processing more complex, generic data in RDF. It remains exciting. rdf-pub could be a solution here. |
It does not make sense to explain RDF here. A first insight can be found at Wikipedia.
If you want to go deeper, you can watch the following:
-
For the concept of URI, URL, namespaces and prefix (called CURIE in this video) see RDFa Basics from 1:25 to 2:23
-
a longer detailed description about URIs How to name Things URIs about 20 minutes
-
An introduction to RDF 1.7 How to Represent Simple Facts with RDF from 3:16 to 10:02
-
The Turtle format explained RDF and Turtle Serialization about 14 minutes
What is rdf-pub
Basic problem
Missing implementation of 'Client to Server Interactions (C2S)'
You often find images like this one showing the Fediverse:
However, this only shows a very simplified view of things. It essentially shows the servers (Mastodon, Pixelfed, Peertube,…). As a rule, however, a user does not talk directly to the server, but to a client application that uses the server.
And here we see an unsatisfactory development. The Activity Pub specification describes two parts:
-
Client to Server Interactions (C2S)
-
Server to Server Interactions (S2S)
The specification itself leaves many questions unanswered, which has advantages and disadvantages. In the C2S area, however the gaps are very large, so that only a few to none have adhered to the specification, but have have developed their own API (interface). However, this means that a client application cannot be used be used generically. Theoretically, a client application that uses C2S with an activity pub server should be usable for all Activity Pub servers. This would mean that Mastodon, Pixelfed, Peertube are all can be used with the same client application.
AndStatus is a client application that has tried to use the C2S interface. However, there is currently a lack of communication and further development. It is urgently necessary that the community to continue researching and proposing extensions to the specification.
Ideally, it would look like this:
rdf-pub would like to try to connect client applications exclusively via C2S and, if necessary, provide 'Fediverse Enhancement Proposals' (FEPs) if the C2S API is not sufficient. Here you can find interest and activities in the community. |
servers 'only' support certain object types
Essentially, federation in the Fediverse is limited to the exchange of 'likes', 'comments' and possibly also 'notes'. Mastodon, for example, focuses on 'Notes', but also understands 'Articles'. Unfortunately, both are processed inconsistently.
rdf-pub wants to handle object types generically and allow all types. Hence the name rdf-pub. All RDF object types should be accepted. It will be interesting to see how this works in practice. |
Beginner
So, I hope you’ve now got an overview of everything you need to know and have a rough idea, what is going on in the Fediverse.
Final sentences:
rdf-pub is like e-mail, you can send messages to anyone who has an address anywhere in the Fediverse (event, location (POI), article, note, audio, video, picture, …).
In contrast to e-mail, however, rdf-pub sends self-describing data (RDF) that can be interpreted and linked by machines. can be interpreted & linked by machines, thus creating a network of content.
And yes, this is a problem in terms of data protection and surveillance! This is also the case with Facebook, Instagram & Co. a problem. However, when it comes to public data, this is exactly what we want. A network of searchable, categorizable content.
Advanced
rdf-pub would like to fill the gaps described under Basic problem.
-
It is a Spring-Boot application.
-
The programming language is Java
-
The architecture is Hexagonal.
-
apache-commons-rdf is used as an abstraction to the database.
-
The database used is rdf4j.
As of December 2024, I unfortunately don’t have that much advanced content yet.
The “old” website may still have some information. The emerging specification will probably be relevant for you.
Discussions on topics related to rdf-pub take place in socialhub, or in the Fediverse. I try to use the hashtag #activitypub or #activitypubdev.
Oh, very important! The source code.
About
Team
Fred Hauschel
Software Engineer
http://hauschel.de