Relay servers for public posts: Difference between revisions

From diaspora* project wiki
(New proposal for relay functionality for public posts)
 
(Add diagrams)
Line 46: Line 46:


Relay already has a cached list of pods and what hashtags they want so relay will deliver post to pods that are interested in one or more of the hashtags in this post. Relay is not for public message keeping - it will delete any posts as soon as they have been pushed out.
Relay already has a cached list of pods and what hashtags they want so relay will deliver post to pods that are interested in one or more of the hashtags in this post. Relay is not for public message keeping - it will delete any posts as soon as they have been pushed out.
== Diagrams ==
=== Data flow ===
[[File:Relay1.png]]
=== Process of post delivery ===
[[File:Relay2.png]]


[[Category: Proposals]]
[[Category: Proposals]]

Revision as of 14:22, 13 October 2013

The problem

Diaspora is an excellent communication platform for sharing ideas and discussing them. Decentralization however, while bringing benefits also causes some issues. One of those "make or break" issues is the lack of federation for public posts. Setting up your own pod at the moment doesn't really make sense since you will instantly lose one of the biggest features - tag following. Since posts are generally only delivered to pods where there are participants for that post, lonely pods will not generally get a bulk of the public posts going around.

This creates a broken network and this proposal aims to fix that in a way that in a more lighter way than just pushing all public posts to all pods (which technically is not a good thing to do).

Concepts of the solution

The central hub

We need a central hub. This central hub should be maintained by appointed community members until proper foundation resources can be used. For transparency ALL the data stored on the central hub should be public. The functionality of the central hub would be to hold an official pod list (opt in for podmins of course) and relating to this relay server functionality proposal hold a list of tags each participating pod is subscribing to.

Summa summarum;

  • Central hub that is maintained by appointed community members
  • ALL data on central hub should be open (REST API)
  • Pods add themselves and maintain their data (opt in)
  • Pods can also list tags they are interested in

Relay server

A relay server is a lightweight server app that has only one function - passing of messages from one place to another. Technical specs could be, for example (just to not be too Ruby specific :));

  • NodeJS
  • Redis

There should not be only one relay server. There should be many relay servers and anyone in the community should be able to run one. When someone runs a relay server, that relay will notify the central hub that they are open for business. The central hub in turn notifies pods (when they ask for this) about a list of relays available.

If the relay app could use the normal Diaspora protocol for communication it should.

Events

Someone on a pod adds a hashtag to his/her followed hashtag lists

If pod is not already subscribing to this hashtag, it will notify the central hub that it wants these posts.

Someone on a pod unfollows a hashtag

If no one else on the pod follows this hashtag, pod will notify central hub that it doesn't want these posts any more.

Someone writes a public post with one or more hashtags

If podmin has opted in to relay functionality, pod will randomize one of the cached relays and delivers that post to the designated relay.

Relay receives a post from a pod

Relay already has a cached list of pods and what hashtags they want so relay will deliver post to pods that are interested in one or more of the hashtags in this post. Relay is not for public message keeping - it will delete any posts as soon as they have been pushed out.

Diagrams

Data flow

File:Relay1.png

Process of post delivery

File:Relay2.png