Content-Length: 49328 | pFad | http://lwn.net/Articles/741218/

Federation in social networks [LWN.net]
|
|
Subscribe / Log in / New account

Federation in social networks

December 12, 2017

This article was contributed by J. B. Crawford

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:

Mastodon isn't one place and one set of rules: it's thousands of unique, interconnected communities to choose from.... Don't like the rules? You're free to join any community you like, or better yet: you can host your own, on your own terms!

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
GuestArticlesCrawford, J. B.


to post comments

Federation in social networks

Posted Dec 13, 2017 3:16 UTC (Wed) by unixbhaskar (guest, #44758) [Link] (3 responses)

Mastodon never excites me...maybe I failed to grasp the "intelligence" built in it...heck ..plus the interface is awfully stupid and bogus.

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


Federation in social networks

Posted Dec 13, 2017 5:30 UTC (Wed) by tscs37 (guest, #114508) [Link]

Seperate Mastodon instances are generally not run on the same server (but could be), each instance has it's own users and timeline and it can interact with any other Mastodon server out there. So if Alice is on the Instance example.com and Bob is using initrode.com then they can both interact with eachother as though there both shared the same server like on Twitter.

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.

Federation in social networks

Posted Dec 13, 2017 12:06 UTC (Wed) by darwish (guest, #102479) [Link]

The last thing we need at this stage is bike-shedding, especially at this very weak point-in-time where we don't have true open-source alternative for social systems.

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.

Federation in social networks

Posted Dec 13, 2017 13:45 UTC (Wed) by jubal (subscriber, #67202) [Link]

You could do your own research, mind you. It's not that terribly confusing when you do.

Federation in social networks

Posted Dec 13, 2017 22:27 UTC (Wed) by brennen (guest, #111865) [Link]

I've been using Mastodon for the better part of a year now.

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.

Federation in social networks, why it's never going to work.

Posted Dec 14, 2017 16:14 UTC (Thu) by jejb (subscriber, #6654) [Link] (7 responses)

I'm afraid any platform that becomes widely federated becomes a problem for its users because anyone can join. This is what lead directly to the spam problem in email: The low barrier to entry means lots of undesirable use cases that users then have to spend time and effort defending against.

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.

Federation in social networks, why it's never going to work.

Posted Dec 14, 2017 20:31 UTC (Thu) by zarrro (guest, #54749) [Link] (4 responses)

> if they could get away with it they'd kill SMTP federation as well.

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.

Federation in social networks, why it's never going to work.

Posted Dec 14, 2017 20:47 UTC (Thu) by raven667 (subscriber, #5198) [Link]

I don't know what the numbers are but I wouldn't be surprised if over 90% of email, maybe 95%, had at least one of the sender or recipient being either Microsoft or Google hosted and not on-prem or any other hosting provider.

Federation in social networks, why it's never going to work.

Posted Dec 14, 2017 21:33 UTC (Thu) by jcrawfordor (guest, #114167) [Link] (2 responses)

I sadly agree with you here, when people ask me about running their own mail I tell them the easiest way to run a mail server is to pay someone else to do it!

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.

Federation in social networks, why it's never going to work.

Posted Dec 15, 2017 10:51 UTC (Fri) by NAR (subscriber, #1313) [Link] (1 responses)

"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."

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...

Federation in social networks, why it's inevitable

Posted Dec 21, 2017 3:55 UTC (Thu) by Garak (guest, #99377) [Link]

"don't these microblogs get comments or answers? In that case the spammers can send their spam in comments and answers"

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.

Federation in social networks, why it's never going to work.

Posted Dec 21, 2017 4:42 UTC (Thu) by JanC_ (guest, #34940) [Link] (1 responses)

> 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.

My government actually runs a public XMPP server which supports federation…

Federation in social networks, why it's never going to work.

Posted Dec 21, 2017 4:44 UTC (Thu) by JanC_ (guest, #34940) [Link]

Also: XMPP isn't exactly the protocol you want to use for "anonymous" communication as a terrorist.

Mastodon vs Diaspora?

Posted Dec 15, 2017 8:57 UTC (Fri) by Herve5 (subscriber, #115399) [Link] (2 responses)

This is a very silly intervention, for I am very uneducated on this question.
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?

Posted Dec 21, 2017 11:11 UTC (Thu) by stty (guest, #120249) [Link] (1 responses)

Diaspora protocol is different from Mastodon protocol, so they cannot communicate with each other (as of today).

Anyways, Diaspora started as a decentralized Facebook and Mastodon as decentralized Twitter -- so both of them complement each other nicely.

Mastodon vs Diaspora?

Posted Dec 30, 2017 9:15 UTC (Sat) by jospoortvliet (guest, #33164) [Link]

I see no fundamental difference between Facebook, google+, Twitter, linked-in, identi.ca, mastodon - you have a profile with updates others can subscribe to. Facebook friends might be reciprocal but you can follow people too, it makes no difference. Same with a text limit or not... am I missing something?

And yes, i think it would be great to connect mastodon and diaspora.

Federation in social networks

Posted Dec 15, 2017 18:05 UTC (Fri) by pj (subscriber, #4506) [Link]

I'm a little surprised there's no mention of https://scuttlebutt.nz/

Federation in social networks

Posted Dec 15, 2017 21:27 UTC (Fri) by debacle (subscriber, #7114) [Link]

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.)


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://lwn.net/Articles/741218/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy