Relay servers for public posts: Difference between revisions
m (...mediawiki syntax, you suck) |
(Rewrite of public relays proposal (still wip)) |
||
Line 1: | Line 1: | ||
{{Work in progress}} | |||
{{Note|This is a proposal, not an accepted specification.}} | {{Note|This is a proposal, not an accepted specification.}} | ||
{{Note|Discussion regarding this on [https://www.loomio.org/discussions/7963 Loomio].}} | {{Note|Discussion regarding this on [https://www.loomio.org/discussions/7963 Loomio].}} | ||
Line 7: | Line 8: | ||
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). | 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). | ||
In fact, this proposal doesn't limit itself to diaspora*, but would also serve other federated social networks using the same protocol (ie ''RedMatrix'' and ''Friendica''). | |||
== Concepts of the solution == | == Concepts of the solution == | ||
=== Relay server === | === Relay server === | ||
A relay server is a lightweight server app that has only one function - passing of messages from one place to another. | A relay server is a lightweight server app that has only one function - passing of messages from one place to another. In terms of federation message support, the server needs to implement: | ||
* | * <code>/.well-known/host-meta</code> to provide discovery for the special relay handle | ||
* | * ''WebFinger'' or parts of it, to allow querying of the special relay handle | ||
* ''hCard'' for the special relay handle | |||
* <code>/receive/public</code> to receive public posts. The relay can and should ignore signature verification of authors which will be done by receiving pods anyway | |||
* <code>POST</code> of received messages to <code>/receive/public</code> of other pods | |||
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 | 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. | ||
=== Storage === | |||
The relay is not required to store messages for any longer than it needs to send them out. The storage should preferable work in a "first in first out" principle, so something like a list would do well. | |||
=== | === Pod configuration and statistics.json / NodeInfo === | ||
A pod can publish information about itself in the current ''statistics.json'' route, which in the future will be replaced by ''NodeInfo''. The attributes related to relays are as follows, in JSON format (with the first possible value as default): | |||
<pre> | |||
"relay": { | |||
"subscribe": (false/true), | |||
"scope": "(all/tags)", | |||
"tags": [] | |||
} | |||
</pre> | |||
The pod configuration file should have the following available (defaults): | |||
<pre> | |||
relay: | |||
outbound_handle: relay@defaultrelay.tld | |||
subscribe: false | |||
scope: all | |||
tags_source: users/podmin | |||
</pre> | |||
The <code>tags_source</code> setting governs how <code>tags</code> is populated in to the ''statistics.json / NodeInfo'' output. | |||
* ''users'' -- All tags that active users (6mo) follow will be added to the list | |||
* ''podmin'' -- List of tags is maintained by podmin in the admin menu (needs db table). In the admin menu to not require constant restarts. | |||
Rationale is that podmins can control whether they want the pod to focus on certain topics or let the users influence the topics. | |||
=== | === List of active pods === | ||
Where the relay gets the active pods list doesn't matter, there are several possibilities already, including http://the-federation.info, https://diasp.net/active and http://podupti.me. A relay should be flexible in falling back to other lists when needed. A relay should also cache the list of pods internally. A relay should query the podlist on a regular basis, for example daily, so newly registered pods don't have to wait for a long time. | |||
== Diagrams == | == Diagrams == | ||
Line 58: | Line 66: | ||
=== Data flow === | === Data flow === | ||
[[File: | [[File:PublicRelays2_1.png]] | ||
=== Process of post delivery === | === Process of post delivery === | ||
[[File: | [[File:PublicRelays2_2.png]] | ||
[[Category: Proposals]] | [[Category: Proposals]] | ||
[[Category: Federation]] | [[Category: Federation]] |
Revision as of 14:38, 11 July 2015
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).
In fact, this proposal doesn't limit itself to diaspora*, but would also serve other federated social networks using the same protocol (ie RedMatrix and Friendica).
Concepts of the solution
Relay server
A relay server is a lightweight server app that has only one function - passing of messages from one place to another. In terms of federation message support, the server needs to implement:
/.well-known/host-meta
to provide discovery for the special relay handle- WebFinger or parts of it, to allow querying of the special relay handle
- hCard for the special relay handle
/receive/public
to receive public posts. The relay can and should ignore signature verification of authors which will be done by receiving pods anywayPOST
of received messages to/receive/public
of other pods
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.
Storage
The relay is not required to store messages for any longer than it needs to send them out. The storage should preferable work in a "first in first out" principle, so something like a list would do well.
Pod configuration and statistics.json / NodeInfo
A pod can publish information about itself in the current statistics.json route, which in the future will be replaced by NodeInfo. The attributes related to relays are as follows, in JSON format (with the first possible value as default):
"relay": { "subscribe": (false/true), "scope": "(all/tags)", "tags": [] }
The pod configuration file should have the following available (defaults):
relay: outbound_handle: relay@defaultrelay.tld subscribe: false scope: all tags_source: users/podmin
The tags_source
setting governs how tags
is populated in to the statistics.json / NodeInfo output.
- users -- All tags that active users (6mo) follow will be added to the list
- podmin -- List of tags is maintained by podmin in the admin menu (needs db table). In the admin menu to not require constant restarts.
Rationale is that podmins can control whether they want the pod to focus on certain topics or let the users influence the topics.
List of active pods
Where the relay gets the active pods list doesn't matter, there are several possibilities already, including http://the-federation.info, https://diasp.net/active and http://podupti.me. A relay should be flexible in falling back to other lists when needed. A relay should also cache the list of pods internally. A relay should query the podlist on a regular basis, for example daily, so newly registered pods don't have to wait for a long time.