Public post federation
The lack of public post federation in Diaspora is IMHO a make or break feature. The whole network is a little broken as small pods are cut of most of the posts on the network due to the way current federation works.
Here is my proposal for solving this issue, please see wiki post here.
It is not a comprehensive solution that can just be implemented now. It is a high level suggestion for going forward with talking about such a feature.
diaspora* started with MongoDB which didn’t work for some reason.
Sarah Mei (a previous developer for Diaspora) wrote this article about why MongoDB didn't work.
makes it possible to search users within the network (regardless of the pod)
It is already possible to search for users on other pods. Melroy, the problems you're encountering (including some of those on your to-do list) may be because you've set up a new pod for yourself very recently. One of the software's problems is the case when a new pod connects to the network for the first time - at first it doesn't have established connections with other pods, so things such as search and following #tags return no results. This is a real problem, and it is something that could usefully be tackled.
It may be that changing the database isn't the answer to your problem: simply running your pod for a while, making connections with other pods, will bring the results you're looking for.
@goob far enough, however... I got 2 registered persons, who doesn't do anything.. nothing happens with the system, it will not 'connect with other pods', meaning it will not share information among other pods including myself.
That is the problem, the base of a social system should be sharing. That is where DHTs kicks-in, however, this requires a whole different way of thinking
@melroyvandenberg what is you d* handle - or add me at jaywink@iliketoast.net
Yeah as @goob said, this is a huge problem. We need some addition to the protocol to support network wide searching (imho hackish and a large burden to the network) - OR a central hub that would be queried (opt-in publishing handle there).
Unfortunately the opposition to any "central helpers" is kinda strong here - maybe that sentiment will change :)
More info on wiki:
http://en.wikipedia.org/wiki/Distributed_hash_table
That is the problem, the base of a social system should be sharing.
The basis of Diaspora is sharing. Every pod in the network shares data (where appropriate) with every other pod. The problem you are experiencing - and it is a major problem, which needs solving - is how to get your pod to start connecting and sharing data with enough other pods to receive all relevant content.
I don't think it's a problem with the type of database being used - it's a problem of your pod, new to the network, knowing what other pods are part of the network and how to find them in order to be able to access their databases.
Have a look at our tutorial series on getting started, which will tell you how the network should work, once your pod is connected to other pods.
I made a proposal to help in certain situations, one being when a new pod is added to the network, here. Apparently some of my proposals would not be scalable as the network grows in size, but there are various ideas knocking around related to this problem of the experience of new pods. If you can help solve this problem, that would be fantastic.
I still think the solution could be DHT, please read the Bittorrent DHT spec about nodes / node ID's and route tables:
http://www.bittorrent.org/beps/bep_0005.html
And read '5.4 Bootstrapping' of the Facebook Cassandra PDF:
http://www.cs.cornell.edu/projects/ladis2009/papers/lakshman-ladis2009.pdf
EDIT, even Patrick McFadin says it:
http://youtu.be/B_HTdrTgGNs?t=1h3m49s
Glad to see there's still interest in this topic. I've made some progress on a prototype solution for public post federation using Pastry; I'll update this thread when it's ready for testing on real pods.
In case this needs more clarification: the local database for a pod, regardless of whether it's a relational database or a key-value store (and hard experience taught the D* team that a key-value store is not the appropriate choice), is completely distinct from the DHT-based distributed network layer (Pastry, in this case) I'm proposing to use to implement federated public post features. This is a "third way" which avoids the type of naive network search that puts a large burden on the network, while also avoiding the need to introduce central hubs.
IMO central hubs would weaken D* by creating a dependency on special, well-connected, resource-intensive nodes, which would be too expensive for the average person to run. This would erode much of the benefit of a decentralized D* network; it would make it much less democratic, more susceptible to interference and obstruction. It would also be a less robust solution than distributing responsibility for doing federated processing across many/all D* pods.
@markwilliams2 looking forward to seeing your update!
I guess @melroyvandenberg 's point is that if we want to federate all public posts, currently this would require every pod to receive and save all public posts locally.
Saving posts locally is ok as long as only the posts from contacts in aspects of users of the pod are saved. This isn't much data, at least on small pods. But saving all public posts requires a lot of more space and resources, doesn't it?
@melroyvandenberg 's idea seems to be dynamically getting the posts from other pods only if requested by the user. I don't know whether this can work, but this is my understanding of the issue.
I'm a little skeptical to introduce a whole new concept like DHT. It may seem appropriate, but I also detect faint amounts of "if all you know is a hammer, everything looks like a nail" ... ;)
So, what about the pseudo PubSub stuff we have going for relaying interactions on posts to/from different pods? I suppose that could be extended into a full-blown PubSub system where users could actually subscribe to contents on other pods...
@florianstaudacher the requirement IMHO is that everything is transparent. If a user follows a tag - posts should be in an ideal situation seen from all around the network - just like on Twitter. That is at least something I would see that would be the only way it would work - normal users will just be confused if they have to do additional work to "enable" content from other pods.
@jasonrobinson Exactly my point.
@melroyvandenberg, do you suggest that pods should be connected on a database level (Cassandra) instead/in addition to the protocol level?
@macieklozinski
I think that would be indeed a wonderful solution. Except that you should think about privacy in transporting this data between the pods, similar to the way that privacy is also important of the current data which is sent using the current protocol.
This way we can see other posts from every pod in the world, meaning we are fully finally connected between the pods (just like a big network). Which is your main goal after all, right?
Started thinking of a hacky non-core code requiring solution that would allow users to participate via pod looking relay servers. Terrible in terms of privacy compared to the original proposal, but it would be easier to implement :P
If it worked and would be wanted, then core code could be introduced to make it transparent.
i kind of like the way diaspora forms communities and groups in sort of an organic way, if there were a common aggregate of all public posts like a global pubsubhubbub or whatever it would maybe kind of change the way of it...
That works fine for medium to large pods, but single user and small pods are lonely places until they share with lots of contacts. One shouldn't be required to follow hundreds of users just to see public posts.
ya starting my pod i more or less had to find contacts on jd and then search for the same contact from my pod to add it, a real pain... would be great if a new pod could get a feed of public posts from one of the larger pods, at least for few weeks after being added to the network
Updated proposal specifications - and now with some PoC code
See here: https://wiki.diasporafoundation.org/Relay_servers_for_public_posts
I'll continue working on the code part and hopefully aim to submit a PR to diaspora core for at least post relaying within my summer holiday (so under 2 weeks).
hey @jhass @dennisschubert and others. What do you think about the proposed pod settings this stuff would need? I'm kinda ready to implement the last part of the relay ie querying single pods and pushing posts out to them. So I could also do the PR towards diaspora - for the inbound configuration part first, then second the outbound configuration.
statistics.json/NodeInfo is about metadata, not protocol extensions, that is protocols shouldn't make decisions based on its output.
I'd say just add a .well-known route, /.well-known/x-diaspora-relay or something.
@jhass Fair enough, that might make sense. I'm supposing it should be constructed by the diaspora-federation gem?
But in general, you or other core members don't object to the extra configuration for diaspora as proposed, assuming the change is that it is reflected in .well-known, not nodeinfo?
Well, it's needed for the feature to work, right?
@jhass as written currently, yes. The other option is each podmin configures their web server to serve a manually maintained file :P
But really, if the configuration would not be accepted to diaspora, as a fall-back I would centralize the idea to the-federation.info and add to it a form for podmins to register their subscription preferences. The send part is more difficult, that would require a patch commit that podmins could pull in if they wanted.
I personally don't see any harm in including the configuration in diaspora itself. I believe this is a good way forward to attempt to fix some of the issues caused by the federation model ie small pods not able to receive enough public posts for it to make sense to set up a single user pod. Also, this would allow pods to customize their scope to specific interest areas, if the solution gets wider adoption within the network.
I'll make it .well-known/diaspora-relay. RFC5785 doesn't state prefixing names with x- and it doesn't seem common looking at the registry. I'll submit a registration request also for this .well-known.
Thinking about it, we should really put version and protocol generic information in .well-known/diaspora, not in headers/statistics as currently is done. But not in scope of this :)
Or actually, it should probably be .well-known/social-relay, not diaspora-relay. Nothing in the relay concept the way I think about it is diaspora specific, except the initial implementation is geared towards diaspora.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"id": "http://the-federation.info/social-relay/well-known-schema-v1.json",
"type": "object",
"properties": {
"subscribe": {
"type": "boolean"
},
"scope": {
"type": "string",
"pattern": "^all|tags$"
},
"tags": {
"type": "array",
"items": {"type": "string"},
"uniqueItems": true
}
},
"required": [
"subscribe",
"scope",
"tags"
]
}
social-federation can now generate it.
Actually, @jhass @dennisschubert do you want the .well-known/social-relay generation in diaspora core or diaspora-federation gem? It's not really part of the federation, more like add-on system to push posts around, so I'm kinda hesitant to push it there. Can I just add a new route/controller/presenter etc, like the current statistics.json is done?
Or should I make a gem well-known-social-relay? :P
I guess having it in the core would be okay for now, should be fairly easy to push elsewhere if needed.
Okay I read the specification and discussed with @jasonrobinson on IRC about it.
First of all Jason, thank you very much for dealing with this important problem of diaspora*.
Although this proposition solves most of the problem, there are some points we should should be careful about:
- [Warn] External dependency for a core feature is dangerous. To send messages to other pods is the core feature of a pod. To use external app servers to do that means the network would have a big dependency to a few servers, which can be attacked or not correctly maintained. This looks dangerous to me.
- [Warn] On the same topic, to use a centralized list of pods is a potential vector of attack / problem. We're loosing part of the force of diaspora* here.
- [Warn] Pods are not equal anymore. Until now, the difference between pods was on side features like services enabled or chat. With this proposition, we would have to explain to user that, depending where they choose to register, they will not have the same content available. This is the opposite of what we always said, and this is exactly the problem we are trying to solve: we don't want users to choose a pod because they have to go there, because that's where the content is.
- [Blocking] The interactions on posts that are transmitted by relay are not federated. This point is a blocking point to me. It completely breaks the usage of diaspora* and means a lot more complains about the federation being broken. I don't see the point of displaying a post if I know that only the users of my pod will see my reaction on it. Most of the time, I want to answer to the author of the post.
For those reasons, I think your proposition is not a good solution. I'll try to propose something else soon.
For those reasons, I think your proposition is not a good solution. I’ll try to propose something else soon.
This is not a proposition any more. It stopped being one when I changed the original one not to depend on the core so much. Right now it depends on only the carbon copying of posts outwards - even if that which is now in develop was reverted I could do a single commit patch which podmins could pull in if they want.
So this is pretty much live now, just not fully functional. I already see diasporapr.tk sending posts out to the relay :) I'll push the latest changes to the relay live early next week so posts will be relayed for the first time and start real world testing.
[Warn] External dependency for a core feature is dangerous.
It's not a core feature. The core feature is to NOT deliver posts by design to all pods. And that works and will continue to work.
[Warn] On the same topic, to use a centralized list of pods is a potential vector of attack / problem. We’re loosing part of the force of diaspora* here.
Part 2 would be decentralizing the relays themselves. Initially yes each pod configuring a single relay makes it weaker. But less weaker than pod email delivery or hosting, which is the weakest part of diaspora, users being locked into a single server for life. And since this is not a core feature, like user login is...
[Warn] Pods are not equal anymore.
They are even less equal now. Right now it makes sense to join a large pod, to see many public posts. Setting up your own pod doesn't make sense. Using relays will make pods more equal.
But, the relay will also enable pods to be more strongly themed, for example a pod could subscribe to only linux and open source posts, ignoring all the other stuff.
[Blocking] The interactions on posts that are transmitted by relay are not federated.
Well, the same problem is with reshares. And the interactions can be solved, just have to decide which way to go, to relay them or to only use relays for the initial post delivery. I think only using this in real world will tell which is better. Anyway, it needs to happen before 0.6 is released and also before that the participations bloat needs to be dealt with and the federation tuned to be more efficient. Will be submitting something for both these for consideration.
I don’t see the point of displaying a post if I know that only the users of my pod will see my reaction on it.
Not entirely true. Since a pod which gets a post via a relay will fetch the author contact (by diaspora protocol design), interactions will be sent to the original pod as if the pod had delivered the post. The problem is that afaict the original pod will only relay the interaction as normal, not to other pods that depend on relays. This is how I understand it:
- pod A <--- author of post
- pod B <--- contact of pod A author
- pod C <--- not in contact with pod A author
- pod D <--- not in contact with pod A author
So when pod A author sends a post it will be delivered to pod B user directly and pod C and pod D users via relay (assuming both subscribe in this case).
Initial relay concept doesn't relay interactions, so when a user on any of the pods comments:
- pod A will receive it
- pod B will receive it (since pod A relays it)
- pod C will not receive it (unless done from pod C)
- pod D will not receive it (unless done from pod D)
But this situation is fixable by defining whose responsibility is to do what. Of course, either the relay should take care of whatever "broken" links it creates OR it should create participations so that interactions flow as they should. Though as said, the current reshare concept also has these kind of bugs.
Thanks for your comments and while I'm looking forward to seeing a proposal to the core that would solve federating all posts to whoever wants them but allow still pods to not receive all posts, I really doubt that kind of solution is doable to the core and it wouldn't even make sense to bloat the core with it.
I wrote what I have in mind on https://wiki.diasporafoundation.org/Follow_other_pods_tags
I'll now read your answer ;)
In my opinion, it is a core feature to deliver the message. Currently, this feature is incomplete because it doesn't allow to follow tags on other pods. So, we have to patch the core, not to build another tool to balance its weakness. Related, the fact that pods are not equal now is due to this incomplete federation, not because of a setting. This is really important to me. In the first case, it only means we need to improve the software, when in the second case, it means the equality is broken by choice. A bad thing in my opinion.
Part 2 would be decentralizing the relays themselves.
With the "perfect situation" becoming one relay per pod? And then, to make relays to forward interactions? I can't loose the feeling that we're building another network on the top of the diaspora one instead of patching it here.
In my opinion, it is a core feature to deliver the message. Currently, this feature is incomplete because it doesn’t allow to follow tags on other pods. So, we have to patch the core, not to build another tool to balance its weakness.
Well I still disagree - the core doesn't have to be a does everything solution. It's bloated as it is and already takes too much resources to run. Granted, the relay system will increase the load across the network, but it will increase it less than if all the pods did all the work.
Related, the fact that pods are not equal now is due to this incomplete federation, not because of a setting. This is really important to me. In the first case, it only means we need to improve the software, when in the second case, it means the equality is broken by choice. A bad thing in my opinion.
Well, as we are talking about a decentralized place, pods should be allowed to be not equal if they want to be.
I read your tag based proposal and it could be a nice improvement to the core. However, as you note, it would not help in the case of new pods which would still have to do a lot of manual work to register with this and that pod. The relay system only requires a new pod to register with a pod list - and relays could even use many pod lists or even be pod lists themselves.
Also I don't believe this is true:
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
Assuming you mean that participations would also follow the tags in the post, then this is true only to the point where users don't stop following tags. If the last user stops following a tag on a pod, the relations would stop going through.
All in all, that could be a nice addition to consider for the core (with maybe the addition that only active users tags are considered, not everybody) but IMHO it doesn't solve the broken network problem like the relay does. It only makes the broken network problem less dissipate faster, but the effect is the same for brand new pods. The solution would also be heavier on every single post for post delivery.
I read your tag based proposal and it could be a nice improvement to the core. However, as you note, it would not help in the case of new pods which would still have to do a lot of manual work to register with this and that pod.
That is true, but it is a different issue in my opinion, this is what I would call "network discovery". It is not only about tags, we can want to find users too for example.
About the tag following problem and my proposition, if the pod knew every other pod on the network, the problem would be solved. So we can choose to solve this by simply fetching the list of pod from the-federation.info, as you propose to do for the relays.
Assuming you mean that participations would also follow the tags in the post, then this is true only to the point where users don’t stop following tags. If the last user stops following a tag on a pod, the relations would stop going through.
Not sure what you meant here. What I meant was, if you write a post about #diaspora from your pod, that I receive it because my pod told yours that it is interested about diaspora*, and then Jonne answers on your post from his pod, I will receive Jonne's answer because your pod knows it sent me the message so it is able to forward Jonne's comment.
active users tags
I don't get what you're talking about?
and then Jonne answers on your post from his pod, I will receive Jonne’s answer because your pod knows it sent me the message so it is able to forward Jonne’s comment.
You mean pods would explicitly track who they've sent posts to? I think it works currently the way that contacts are checked through (sharing and shared with) when deciding where to send. I don't think posts "remember" where they have been sent. I might be wrong :)
active users tags
I don’t get what you’re talking about?
Just a small detail. For active tags it makes sense to only look at tags followed by active users. Otherwise a user that logs in once and follows a tag will cause the pod to forever follow that tag. The relay subscription prefs work (if set so) using the 6 month active users.
Added some notes and ideas regarding the participations relaying to our Paris board. Would love to discuss at least for some brainstorming.
Re: Jason's "pods should be allowed to be not equal if they want to be."
I strongly believe that which content any user wants to subscribe to should decided at the user-level rather than the pod admin level. If one user wants to follow basketball posts, and another wants to follow Linux posts, they should make that decision rather than it be imposed on them by some stranger. I don't want to join a pod only to find out the admin severed my access to one of my interests because they don't share that interest.
@richarddecal
If one user wants to follow basketball posts, and another wants to follow Linux posts, they should make that decision rather than it be imposed on them by some stranger.
I couldn't agree more. Currently, the defaults are probably not the best, for the diaspora* relay code. Could probably change them before the relay hits "mainstream" in 0.6, currently it's only in development pods.
The defaults are:
inbound:
subscribe: false
scope: tags
include_user_tags: false
pod_tags:
So, podmin must change "subsribe" to true to enable the functionality and "include_user_tags" to true, if user tags should be collected. I think the latter should be changed to "true" by default.
I'd enable the whole relay functionality for user tags on by default but that would never pass :) And since the relay is third-party stuff, it's prob a good idea to keep it off by default.
(also, the code allows mixing, podmin can define tags and still have user tags being subscribed to)
My proposals to solve the participations and relay decentralization issues.
If we use relays would that information on which relays are up be available on a site such as podupti.me as that also shows if pods are down (for what ever reason) it could help developers improve the network and identify problems
Hi guys. I'm #newhere 😃 and don't know much about the existing architecture of d* but I read through lots of this thread yesterday with interest, and have a couple of comments...
If I understand correctly, some proposals involve pushing public posts to pods that have users following certain tags. This seems problematic to me as it ignores past public posts. For example, if a user starts following #privacy and happens to be the first user on that pod to do so, they will only get future posts; they won't be able to look through the history of that tag. I don't think that would be the expected (or desired) behaviour.
The alternative that came to mind (which may well have been suggested already) is that each pod could publish a list of the tags that they have public posts for, and then they could be pulled in when needed. So, using the example above, when the first user starts following #privacy, the pod then (somehow) finds all of the other pods that have public posts for that tag and pulls them in. Something like that also gives more power to certain pods to decide what they want to pull in. Some pods might want to ignore #nsfw for example.
Anyway, just my thinking while reading this thread. Excuse me if I'm repeating what has already been said.
I think that is the whole point that pods "float" in the internet. I'm quite sure the current model isn't something that would be powerful and scalable enough to take on a network like Facebook - but the diaspora* server isn't really something that is supposed to do that IMHO. It's just server software - and there is no requirement to connect to the wider network of diaspora pods.
To make it really big the server should be just nodes that people can run that automatically enhance the network. Now things are different. Each pod is very independent with absolutely no constraints placed on how to run it or even on what configuration.
The diaspora* network really only federates on the protocol level. What uses the protocol doesn't matter. There is already Friendica (made in PHP) that talks the diaspora* protocol. There is also a Python version (Pyaspora) that also talks diaspora*.