User:Flaburgan/Follow other pods tags
This is a proposal, not an accepted specification.
This page describes a proposal specification to allow users to follow tags from other pods. Currently (v0.5.2.0), tags are not federated in the diaspora* network. This proposal is linked to the Relay servers for public posts as it tries to solve a similar problem. The approach here is completely different though.
Related issue on Github: #2407.
As described on the Relay server proposal page and on the Github issue (see links above), tags are currently not federated on diaspora*. That means, if you go on yourpod.tld/tags/newhere, you're only going to see posts that your pod knows about, = posts which have been received because they have been sent to users of your pod. On small pods, you will not receive a lot of posts so this page will be empty most of the time.
This page describes a solution to be able to explicitly say "I'm interested about #newhere and want to receive posts about it"
Pros and cons
This can be seen as a comparison with the Relay Servers proposal.
The solution described below has the following disadvantages:
- It does not immediately allow to get public posts with tags from the whole network, because no list of pods is used to keep diaspora* completely decentralized. The pod will only receives posts with tags from pods it knows about. This is the biggest limitation of this specification but it can easily be solved, any user just have to search for a user on a pod he wants to receive messages from, then his pod will know about the other pod, and the problem is solved.
- It only works for tags and does not allow a pod to receive public posts with no tag. As you can only search for tags and not for content, this is not a real limitation.
The solution described below has the following advantages:
- The pods will all act the same way
- No central list of pods is used, so no potential vector for an attack / server not well maintained
- Every interactions is possible on the posts received with that solution, so answers (comments), likes and reshares will be received by the original pod which created the post **and all the others which received it**
How does it work?
Registration of the tag interest to other pods
When a user follows a tag
- UserA clicks on the "follow #tag" buttons
- PodA checks if it was already interested about #tag
- If no, PodA sends a message to all pods it knows to inform them that it is now interested about #tag
- The other pods register in their DB that podA is interested by #tag
When a user unfollows a tag
- UserA clicks on the "unfollow #tag" buttons
- PodA checks if this user was the only one interested about #tag
- If yes, PodA sends a message to all pods it knows to inform them that it is not interested about #tag anymore
- The other pods register in their DB that podA is not interested by #tag anymore
When a new pod is discovered
- A new pod is now known by podA
- PodA sends to the new pod a message containing every tags it is interested about
- The new pod registers in its DB all the tags podA is interested about
Sending of messages
When a user writes a public post with a #tag
- UserA writes a public post with a #tag
- PodA checks which pods it knows are interested about this tag
- PodA sends the message to these pods (even if UserA doesn't have anyone from this pod in his contact)
How will the migration happen?
Users are already following tags, and all the pods are not going to upgrade to the version introducing this feature in the same time so, how are we going to push the solution in the network?
We want to avoid to see pods telling "I'm interested about this tag" to pod which didn't upgrade and are not able to understand this message. For this kind of problem, we will need to split the changes in two different releases of diaspora*.
The first one needs to add the following features to a pod:
- to be able to register in its database that a pod is interested about a tag when it receives the message telling so.
- when one of its user write a public post with a tag, to check if some pods said they are interested about this tag and to send it to them
Then, the following release (at least six weeks later if we use a minor release) needs to add:
- all the mechanisms listed in the protocol above and not implemented by the previous release
- a rake task to populate the interested tag table with the already followed tag
- a message with all the interested tags to inform every pod known, exactly like when a new pod is discovered