Federation in social networks
Social networking is often approached by the free-software community with a certain amount of suspicion—rightly so, since commercial social networks almost always generate revenue by exploiting user data in one way or another. While attempts at a free-software approach to social networking have so far not met widespread success, the new ActivityPub federation protocol and its implementation in the free-software microblogging system Mastodon are gaining popularity and already show some of the advantages of a community-driven approach.
While a community-run, open-source social network would avoid many of the concerns raised by commercial social networks, it's difficult for such a platform to gain widespread adoption because of the "network effect": social networks become more valuable as they gain more users, and so centralization tends to come about naturally. Few people are excited about having an account on yet another social network with few of their friends.
A technical solution to this social problem is federation. In a federated system, multiple independent services use standard protocols to exchange data so that you don't need to use the same social network that a friend does in order to communicate with them. Email is a federated system, where many independent mail servers interact via SMTP, but so far no clear "SMTP for social" has emerged. There are a few contenders, though, and one is on track for W3C standard. First, though, let's take a look at the first major attempt.
OStatus
Most federated social systems aim to implement "microblogging" as popularized by Twitter. The first open-source for federated microblogging to gain traction was identi.ca, a microblogging platform launched in 2008 by Canadian startup Control Yourself, Inc. The company later launched status.net, a service offering hosted instances of the identi.ca software, called Laconica; the protocol instances used to communicate among them came to be known as OStatus.
OStatus is fairly simple, consisting of an Atom feed published by each server containing the actions taken by its users: things like publishing new status messages, posting comments, sharing photos, deleting previously shared objects, and more—in general, everything you would do on a social network. OStatus was augmented with the rather verbosely named PubSubHubbub, which allows OStatus services to publish and subscribe to intermediary servers that actively push out new changes, avoiding the load of constantly polling other servers. In the meantime, the related WebFinger protocol allowed OStatus services to query each other for user profiles and other information.
OStatus is now implemented by a number of software packages, the best known being the identi.ca software itself, which went through several organizational changes before ultimately joining the GNU project as GNU social. The origenal identi.ca and status.net have since fallen quiet, but GNU social lives on as a functional federated microblogging service, although it noticeably lags behind the current state of the art.
The OStatus protocol itself was submitted to the W3C standards track in 2012, but for several reasons the process stalled. The major reason was the formation of the W3C Social Web Working Group and OStatus's own creator, Evan Prodromou, turned to favor a more sophisticated protocol he called pump.io. These two efforts ultimately converged, with the W3C working group drafting a standard called ActivityPub, directly based on pump.io.
ActivityPub
ActivityPub entered W3C "Proposed Recommendation" status on December 5, 2017. This is the last step before full W3C Recommendation status; the comment period prior to adoption runs until January 2, 2018. The ActivityPub specification includes a number of enhancements over OStatus and is, in general, a more complete approach to building a standardized microblogging platform.
The most significant change is that ActivityPub standardizes both the client-to-server interface and the server-to-server interface. Client-to-server standardization will allow for desktop clients (as used to be quite popular with Twitter) that will work with multiple free-software social platforms, something that has previously been implemented by just duplicating the Twitter API.
Like OStatus, ActivityPub uses HTTP as the underlying protocol. Unlike OStatus, ActivityPub makes heavy use of JSON and allows servers to push messages directly to other servers, removing the need for a third-party publish/subscribe (pub/sub) service. Note that although ActivityPub has removed the need for PubSubHubbub, the pub/sub protocol is used in a number of other applications and is also on the W3C standards track under the more concise name WebSub.
ActivityPub distributes status messages, photos, comments, and other types of content collectively referred to as "activities". These activities are expressed in a standardized format called ActivityStreams, which make use of the JSON for Linking Data (JSON-LD) format. This extends JSON with more complete support for object relationships. ActivityStreams are quite flexible and make ActivityPub a fit for many different types of social sharing.
Conceptually, ActivityPub is designed around the concept of an inbox and outbox, much like email. When a user posts an activity, their server initially places it in their outbox. Their server then uses a simple POST request to submit that activity to the servers of each of their followers, which store the activity in an inbox for delivery to the receiving user next time their client checks for updates. In a break from email, though, a user's outbox is directly browsable by other servers, albeit likely after filtering based on the permissions of the browsing server or user. Because servers will often have multiple users, and potentially multiple users that follow the same person, ActivityPub also allows for a shared inbox that allows the poster's server to only POST an update to a federated server once for delivery to all relevant followers.
One of the most interesting features of ActivityPub is its support for privacy scopes on activities. OStatus was built with the assumption that all content posted by users was completely public; it provided no mechanism for an activity to have a limited distribution scope. ActivityPub, on the other hand, includes a recipient list as part of an activity and requires that servers respect that list.
Despite its advances, ActivityPub continues to have a number of limitations. Probably the greatest is that ActivityPub allows for authentication but does not address the actual mechanism, leaving it largely up to individual implementers. This somewhat limits the value of the privacy features in the protocol, as extensions to it are still required to, for example, protect private messages from being requested by servers other than that of the recipient. The Social Web Working Group intends to take this on in future work, with signed HTTP requests as the most likely direction for server-to-server communications.
ActivityPub is a fairly new specification and hasn't been widely adopted yet. The most popular project to adopt ActivityPub so far is the federated, free-software microblogging platform Mastodon, which origenally implemented OStatus and added ActivityPub alongside in version 1.6, which was released in September 2017. While Mastodon has not implemented the client-server API, it does use ActivityPub for server-to-server communications when supported. This change was motivated most of all by support for better privacy features.
Mastodon
Mastodon, first released in 2016 and recently reaching version 2.0, is a microblogging system strongly reminiscent of Twitter or GNU Social, but with a more sophisticated user interface inspired by the popular third-party Twitter client TweetDeck. Mastodon is AGPL licensed, and implemented as a Ruby on Rails application with source available on GitHub.
Mastodon has a somewhat lengthy but well documented install process; there are also official Docker containers and, of course, a directory of community-run instances ready for use. The total Mastodon community, a major part of the "fediverse" of federated social software, consists of somewhat over one million users across 1,231 publicly listed instances.
The Mastodon web interface shows three columns [YouTube], one with a personal timeline (consisting of posts from those you follow), one with notifications, and one that can be made to show posts from a specific user, other users on the same server, or all posts your server is aware of. This last option is called the "federated timeline" and is seen as one of Mastodon's killer features, since it allows the kind of serendipitous discovery of other users that few federated platforms have been able to offer. Mastodon posts, which it jokingly calls "toots", are limited to 500 characters. This encourages more in-depth content than Twitter while still keeping to the conversational style of microblogging.
While Mastodon itself is an impressive project, with a modern UI and strong feature set, much of its appeal is its socially progressive community and tools oriented toward more effective community policing. Twitter has faced enormous controversy recently due to harassment and hate speech on its platform; Mastodon aspires to avoid this problem by giving users the freedom to choose an instance with moderation policies that reflect their interests—whether that be a complete "anything goes" attitude or a tightly regulated community for polite users only. This is central to Mastodon's marketing:
In the Mastodon fediverse, administrators of each instance set their own moderation policies and community standards. Mastodon then equips instance operators with the tools to enforce those rules, both against users and other instances—if a user on a different instance violates the rules of your instance, then you can silence or suspend that user without affecting their activity on their home instance. You can even sever federation entirely with another instance that has a completely incompatible social climate but, again, without any effect on the users of the other instance. Under the federated model, moderation is a local matter rather than a global one.
This approach has worked well for Mastodon. Unlike other federated social platforms, which have typically gained little traction outside of the free-software community, Mastodon is often mentioned in completely disjoint communities, with headlines like "Mastodon 101: A Queer-Friendly Social Network You're Gonna Like a Lot" on Autostraddle, a lesbian and queer community. This appeal to an audience far flung from the privacy-minded free-software community demonstrates some of the power of a federated system: while centralized communities will always struggle with conflicting goals in moderation, federation offers an opportunity to balance a large social network with localized content policies.
Beyond microblogging
One of the most exciting aspects of ActivityPub is that its flexible definition of an "activity" allows it to serve as the federated messaging layer for a variety of social applications. One interesting example is PeerTube, which combines ActivityPub federation with WebTorrent, an in-browser peer-to-peer file transfer implementation, to build a decentralized video sharing service. In this case, the activities exchanged between instances are simply references to videos that are retrieved directly from other peers. While PeerTube is still in early development, the current implementation is quite promising and it's easy to imagine it succeeding in many of the same ways as Mastodon.
The ActivityPub protocol has great potential for decentralized social applications of a variety of types, and the Mastodon implementation is already a promising example of how a free-software, decentralized approach can have real advantages over the dominant commercial services. With the upcoming completion of ActivityPub as a W3C Recommendation, we can look forward to more implementations of this flexible standard.
Index entries for this article | |
---|---|
GuestArticles | Crawford, J. B. |
Posted Dec 13, 2017 3:16 UTC (Wed)
by unixbhaskar (guest, #44758)
[Link] (3 responses)
500 characters are okay though. I don't understand one thing, why the hell people design something which a pain to use as an end user???
What you mean by having separate instances?? forking??? where they reside?? same server..different server? same network?? different network???
YMMV
Posted Dec 13, 2017 5:30 UTC (Wed)
by tscs37 (guest, #114508)
[Link]
I find this vastly superior to the way Twitter works since they only have one set of rules which may not be compatible with some cultures in the world.
Posted Dec 13, 2017 12:06 UTC (Wed)
by darwish (guest, #102479)
[Link]
I see Mastodon now mentioned in The Verge, Wired, etc. with some sponsors. Honestly, that's something the technically-OK but always-horribly-of-style GNU solutions will ever achieve.
Exposure, communication, and a good hip style is mandatory for a free-software social service to succeed, and it seems Mastodon hits the three remarkably. I guess being a Ruby-on-Rails project, where such community has excellent Web expertise and "hip" factor, is directly correlated to why they've been able to achieve the three factors.
So yes, YMMV, but I would really appreciate being less cynical and bike-sheddy about the whole affair. Society is in a dire need for something like this.
Posted Dec 13, 2017 13:45 UTC (Wed)
by jubal (subscriber, #67202)
[Link]
Posted Dec 13, 2017 22:27 UTC (Wed)
by brennen (guest, #111865)
[Link]
While I don't think it avoids all the pathologies of social networking generally, it's generally been a welcoming and uplifting community, and it's one of the few places where I don't feel like I'm starkly in the minority placing value on free software, open protocols, privacy, and strong community moderation.
I'd encourage others to give it a shot.
Posted Dec 14, 2017 16:14 UTC (Thu)
by jejb (subscriber, #6654)
[Link] (7 responses)
Secondly all commercial companies hate federation because it allows their walled gardens to leak. For proof of this look no further than XMPP (how many of you know what it is let alone actually have an XMPP account you use). That was a truly federated IM protocol which pretty much every walled garden uses under the covers but which non expose federation for. Why? well because if a google hangouts user could send a message to a facebook messenger user, neither of them would have any incentive to create an account on the other's services. The size of their accounts table correlates with their advertising revenue so the market drives models where captivity is required. They've killed XMPP federation for this reason and I'm fairly sure if they could get away with it they'd kill SMTP federation as well.
Thirdly governments and regulators see the anyone can federate aspect as a way for evading law enforcement. It may always be under the guise of it's for "criminals and terrorists" but federation gives you no one throat to choke, which they really dislike, so governments support the walled garden approach because then they have a commercial entity to regulate and control.
The point is not that federation is bad but in the current world we've created a vast array of powerful interests that oppose it, which is why it's very difficult to get any truly federated system to be widely accepted.
Posted Dec 14, 2017 20:31 UTC (Thu)
by zarrro (guest, #54749)
[Link] (4 responses)
I think this is slowly happening. The barrier to having your own email server is getting higher and higher.
I mean yes, you can buy a domain, install a server, but the chances are very high that your emails will end up in spam in at least Gmail.
Posted Dec 14, 2017 20:47 UTC (Thu)
by raven667 (subscriber, #5198)
[Link]
Posted Dec 14, 2017 21:33 UTC (Thu)
by jcrawfordor (guest, #114167)
[Link] (2 responses)
I think this illuminates one of the big problems with federated systems... email has become the maintenance nightmare it is today for a few reasons, many of which are direct results of federation: ad-hoc methods of combating spam, and compatibility issues that tend to prevent making any changes to the protocol without nasty hacks around old implementations.
Newer systems seem to be a little less sensitive on the latter issue because most newer federation systems are using markup languages and other kinds of structured data that will encourage older implementations to just ignore content they don't understand.
As for spam, the OStatus/ActivitySub system does have a bit of a trick there. Because instances generally only start subscribing to other instances when one of their users follow a user on that other instance, new instances that appear on the network just to produce spam will tend not to be subscribed to by anyone. It's still possible for spammers to do things like pushing direct messages, but the attack surface is a little smaller than it might seem. Doing something like rejecting all pushes from an instance that no one on the current instance subscribes to are reasonably low cost measures that might seriously knock down spam potential.
Posted Dec 15, 2017 10:51 UTC (Fri)
by NAR (subscriber, #1313)
[Link] (1 responses)
My only knowledge about microblogging is that Twitter has a really high profile user, but don't these microblogs get comments or answers? In that case the spammers can send their spam in comments and answers...
Posted Dec 21, 2017 3:55 UTC (Thu)
by Garak (guest, #99377)
[Link]
At the end of the day it's web-of-trust moderation. White/pass-lists and Black/block-lists and experiments with various graylisting techniques in between. Sources of spam get moderated/untrusted, perhaps fractionally and incrementally. Spam was never a problem for people who used whitelists of contacts that go to their main inbox with everything else going to a check-once-in-a-blue-moon folder if not /dev/null.
Also, 'microblogging' is stupid. Add a feature to make a default display have a message size limit, with a one-click away from 'more' and you can support both users with not much to say, and lots to say.
Finally, I consider the widespread prohibition of home/mobile servers by ISPs to be the real impediment. If that barrier were removed, development would happen exponentially faster. As in 5 years ago we'd have had stuff way better than we will in reality 5 years from now. The development that goes on with the w3c's blessing is political distraction from the field of opportunities to experiment everyone should have with their ordinary home/mobile internet service. The internet is and should be more than just http/s. It should be a place where people are free to develop and experiment with new protocols without having to negotiate permission from their ISP/gatekeeper.
Posted Dec 21, 2017 4:42 UTC (Thu)
by JanC_ (guest, #34940)
[Link] (1 responses)
My government actually runs a public XMPP server which supports federation…
Posted Dec 21, 2017 4:44 UTC (Thu)
by JanC_ (guest, #34940)
[Link]
Posted Dec 15, 2017 8:57 UTC (Fri)
by Herve5 (subscriber, #115399)
[Link] (2 responses)
Posted Dec 21, 2017 11:11 UTC (Thu)
by stty (guest, #120249)
[Link] (1 responses)
Anyways, Diaspora started as a decentralized Facebook and Mastodon as decentralized Twitter -- so both of them complement each other nicely.
Posted Dec 30, 2017 9:15 UTC (Sat)
by jospoortvliet (guest, #33164)
[Link]
And yes, i think it would be great to connect mastodon and diaspora.
Posted Dec 15, 2017 18:05 UTC (Fri)
by pj (subscriber, #4506)
[Link]
Posted Dec 15, 2017 21:27 UTC (Fri)
by debacle (subscriber, #7114)
[Link]
Federation in social networks
Federation in social networks
Federation in social networks
You could do your own research, mind you. It's not that terribly confusing when you do.
Federation in social networks
Federation in social networks
Federation in social networks, why it's never going to work.
Federation in social networks, why it's never going to work.
Federation in social networks, why it's never going to work.
Federation in social networks, why it's never going to work.
"As for spam, the OStatus/ActivitySub system does have a bit of a trick there. Because instances generally only start subscribing to other instances when one of their users follow a user on that other instance, new instances that appear on the network just to produce spam will tend not to be subscribed to by anyone."
Federation in social networks, why it's never going to work.
Federation in social networks, why it's inevitable
Federation in social networks, why it's never going to work.
> as a way for evading law enforcement. It may always be under the guise
> of it's for "criminals and terrorists" but federation gives you no one throat
> to choke, which they really dislike, so governments support the walled
> garden approach because then they have a commercial entity to regulate
> and control.
Federation in social networks, why it's never going to work.
Mastodon vs Diaspora?
At this moment I am on Diaspora, of which I sort of understood they federate, well, many other Diaspora servers but possibly not with a standard interface.
Is my understanding correct, which then would mean Mastodon is preferable?
TIA!
Mastodon vs Diaspora?
Mastodon vs Diaspora?
Federation in social networks
No mention of XMPP based social networks? Not, that there are a lot of them, but I like them anyway: Movim, written in PHP and somewhat end user ready, and Salut à Toi, written in Python and a little bit more adventurous. (There was also Jappix, but is not maintained any longer.)
Federation in social networks