LWN.net Logo

Tent pitches a new social networking protocol

By Nathan Willis
October 3, 2012

The free software community produces a constant stream of ideas about how to displace the proprietary network services that dominate so much online interaction. In mid-2012, Tent became the latest entrant in the conversation, heralding an "open, decentralized, and built for the future" social networking solution that "changes everything." Beyond the project's manifesto, however, there was scant detail, particularly on how Tent related to other distributed social networking efforts like OStatus, the protocol used by StatusNet and Identi.ca. September 21 brought the first look at something more concrete, courtesy of a reference Tent server and initial documentation of the system's protocols.

Staking out the turf

Tent's general idea is familiar enough: a functional replacement for proprietary social networking services like Twitter, Flickr, and Facebook, but built with free software and designed so that individual users retain control over their data (including not handing over personal information to a third party). A key part of making such functionality possible is devising a mechanism for distinct installations to interoperate, thus allowing users to converse, share content, and subscribe to content posted by others — without demanding any permanent ties to other users' software.

This goal is much the same as that of the OStatus community, which led a number of people to open issues on the Tent bug tracker asking what justifies starting the new project. The Tent FAQ (on the project home page) says that "the architects of Tent investigated existing protocols for the distributed social web. Each of them lacked several critical features necessary for modern users." Elsewhere the FAQ comments that OStatus and Diaspora were "first steps" but does not go into detail about what they lack. On the issue tracker, however, developer Jonathan Rudenberg lists three features not covered by existing federated social networking projects: support for private messages, a server-to-client API, and the lack of a "social graph" specification (e.g., existing "friend" or "following" relationships) enabling users to export their user-to-user connections for portability between services. Developer Daniel Siders reiterated those issues in a Hacker News discussion about Tent.

Several commenters found those features to be weak justification for writing entirely new protocols, however. Dave Wilkinson II argued that OStatus does not address private messaging because it does not attempt to address identity management, but that the related standards Webfinger and PubSubHubbub together can be used to implement private messaging. He also said that migrating social graph information is trivial in OStatus precisely because OStatus does not bind to the user's identity. OStatus co-author Evan Prodromou said private messages were in development for PubSubHubbub 0.4 (and subsequently OStatus), and pointed to ActivityPub as an effort to develop a generic server-to-client API.

The Tent project's documentation also sees its definition of "decentralized" web services as being fundamentally different than OStatus's definition of "federated" services. Prodromou suggested on the issue tracker that this distinction was inaccurate, and that what Tent describes is no different than the federation functionality of Status.Net and Diaspora. Siders replied that:

To us, a service is federated instead of decentralized when first class features are not specified in the federation protocol. Federation protocols provide a least common denominator for the transport of messages and may not have 1:1 mapping with the internal services of each node.

In other words, he continued, Tent differs from federated social networking systems because it combines the server-to-server and client-to-server communication protocols, akin to unifying SMTP and IMAP. "Tent is not a federation protocol because it provides end to end communication between users, not just servers."

The 0.1 specification

Abstract principles aside, the Tent team released version 0.1 of its protocol documentation on September 21, as well as tentd, a demonstration server written in Ruby that implements a Twitter-like service. The documentation outlines the basics of Tent's messaging and network design, the server-to-server protocol, the server-to-client API, and descriptions of post and profile data fields. In general, Tent uses JSON to format all messages, with OAuth 2 authentication for applications and HTTP MAC access authentication to cryptographically verify individual requests and responses.

Every Tent user (or "entity") is associated with a separate server, which is expected to always be online and accessible over HTTPS. Servers are meant to be found through HTTP Link headers and HTML link tags that point to the user's profile URL. Requesting the profile URL returns the user's profile data as a JSON object. Currently the server-to-server protocol addresses only Twitter-style "follower" relationships; user A can follow user B by POST-ing a request that includes user A's own entity URL, the flavors of post the user wishes to subscribe to, the licenses acceptable to user A, and a URL to which user B should send posts. Assuming user B approves the follow-request (which is not addressed in the documentation), user B's server sends its MAC to user A so that subsequent posts can be authenticated.

The documentation does not address private messages directly, other than their usage of MAC authentication. However, the post documentation mentions a permissions object that, in the examples, can be marked as public or list specific entities or groups that are allowed access. Groups and their representation are not currently defined. The notion of "acceptable licenses" is not explained in detail, either; it seems to place the burden on the publishing server to filter out content that individual subscribers do not find acceptable on licensing grounds (the only license example used is Creative Commons Attribution 3.0). The server-to-server API also defines methods for requesting another user's list of followers, the entities that the user is following, canceling or altering a follow-request, and fetching another user's posts (either in bulk or by querying parameters like publication date).

Each of these methods has a corresponding method in the client API; in practice user A's front-end software would relay these requests to the user's Tent server, which would in turn handle the nitty-gritty of subscribing or querying user B's server. As it stands, the scheme is quite simple; there are six post types defined: status (a short, 256-character message), essay (a longer, unlimited-length text entry), photo, album (for a collection of photos), repost (a pointer to another user's post), profile (a notification of changes to a user profile), and delete (a notification that another post has been expunged).

Currently unaddressed are activity-style posts (e.g., Facebook-style "likes," geographic check-ins, or any number of other actions). There was some discussion on the Tent issue tracker about adopting the ActivityStreams format for these post types. User profiles are defined; there are three required fields (entity URL, the licenses under which the entity publishes content, and the canonical API root URL needed to interact with the entity's server). A handful of other properties are defined as well (avatar image, bio, location, etc.).

Interested users can sign up for a free Tent account at tent.is. The site runs the TentStatus application, although free accounts are only permitted to send status-type posts; access to essays and photos costs $12 per month.

Tent invented here

Tent 0.1 is bare-bones, to say the least. Several of the key features that are supposed to differentiate it from OStatus, Diaspora, and other systems are simply not present, which makes it difficult to assess fairly. For example, there is no way to export one's social graph to import it into a separate tent.is account. There are several existing standards for social graph-like information, such as the RDF-based FOAF and XML-based XFN. The Tent team has been critical of using anything other than JSON in its debates on the issue tracker; it would be interesting to see how they implement the social graph functionality.

But there are also aspects of Tent 0.1 that simply need stress-testing. The fact that subscribers tell publishers which licenses they find acceptable for future posts is puzzling, and it will be interesting to see whether that scales well in practice. The diagrams on the Tent site appear to indicate that each publisher sends a separate copy of each status update to each subscriber. When multimedia content is allowed, that could be problematic (and it is one of the problems PubSubHubbub was created to address, regardless of whether or not one finds it an acceptable solution).

At a more fundamental level, though, several commenters in the issue tracker and other discussions are unconvinced that Tent's decision to associate a user identity with a URL is wise. The prevailing wisdom is that users (particularly non-developers) associate URLs with content, not with individuals. Many consider OpenID's requirement that every user have an OpenID URL as an identifier to be one of its greatest flaws. As long as tent.is remains the only Tent site (and tentd the only Tent implementation), the URL identity question will remain unexplored because all users exist in the same namespace.

Of course, until there are other Tent servers and applications, none of the federation/decentralization features can really be put to the test, either —not to mention shaking out Siders's assertion that Tent is not "federated" because it connects users rather than servers ... even though every user is required to have a separate server.

In short, the interesting bits are still theoretical. One only hopes that we will get to examine these other bits before too long. It is not immediately convincing that Tent's approach of bundling identity, server-to-server, and client-to-server into a single API is a strength. But it is clear that by starting over from scratch on all of these topics the Tent team has carved out a much larger task for itself than it would have if it had attempted to implement private messaging in OStatus.

Toward the end of discussions like the OStatus issue tracker thread, a lot of the reasons for design decisions seem to boil down to personal preference: JSON versus XML, HTTP versus Webfinger, and so on. There is certainly nothing wrong with building an application to suit one's own preferences, but in the long run it is a difficult way to establish a standard. The Tent FAQ ends with a statement affirming the project's commitment to "open governance models leading to a ratified standard." But, as Steve Klanik observed, "Working with existing standards is way less fun than just building your own." That said, the OStatus suite of protocols is indeed slow-moving and feature-incomplete; perhaps Tent can spur that community on — it has certainly reinvigorated the discussion already.


(Log in to post comments)

Distributed social networking is a hard problem

Posted Oct 4, 2012 22:07 UTC (Thu) by Baylink (subscriber, #755) [Link]

And here's an example of why:

Say that I, Bob, want to block Charlie, so he can't see what I post, and vice versa.

I don't, however, want our mutual friend Alice *to know that I have blocked Charlie*, *the knowledge of the block belongs inside my personal privacy sphere*.

The problem with distributed systems like this with no central trusted third party is that the Usenet-like flooding algorithms used to move things from user to user *cannot* implement that sort of blocking-privacy-protection; in order to tell Alice's servent not to forward my messages to Charlie, *I have to tell her that*. And as distributed gaming designers long ago learned, *if the code is in physical control of the user, you cannot assume they don't know anything it does*.

This was the first thing that occurred to me when Diaspora came out, and -- alas -- the only place I could point it out was on their Kickstarter page. I've always hoped that had nothing to do with what followed...

Distributed social networking is a hard problem

Posted Oct 4, 2012 22:20 UTC (Thu) by dlang (✭ supporter ✭, #313) [Link]

I don't care what technology you want to use, saying that you want to send something out to some people and not have it get to other people doesn't work

This is especially bad if you don't want to tell the people you are sending it to that you don't want the third person to see it as they have no reason _not_ to forward it, or quote it to that person

as for inbound messages, your system should accept them and then delete them. Yes it eats bandwidth, but it is both simple and reliable.

Distributed social networking is a hard problem

Posted Oct 5, 2012 21:43 UTC (Fri) by rillian (subscriber, #11344) [Link]

> The problem with distributed systems like this with no central trusted third party [...]

One idea the developers have, which wasn't very clear at launch, is to use copyright licenses to enforce this sort of thing. That is, recourse to the legal system is the 'trusted third party'; what cannot be done in computer code can be done in legal code.

"Tent posts can have licenses attached. Licenses are basically contracts, like terms of service on a specific post. [...] For example a license could be created that prohibited the receiving user from reposting any posts with the license attached or requiring all users who received the post to store it only on an encrypted server." -- http://tent.io/blog/tent-basics

Interesting idea.

Distributed social networking is a hard problem

Posted Oct 5, 2012 22:08 UTC (Fri) by Baylink (subscriber, #755) [Link]

Perhaps, but it doesn't address the class of problems I identified.

Distributed social networking is a hard problem

Posted Oct 7, 2012 0:19 UTC (Sun) by giraffedata (subscriber, #1954) [Link]

It's an interesting idea, but since copyright was not designed, and has never been used, to protect confidentiality, I see nothing but frustration.

A non-disclosure agreement (NDA) would make a lot more sense. In order to get Bob's posts, Alice would have to agree to restrictions on reposting them. I don't know how information travels around in these systems; maybe it isn't feasible to make an NDA a prerequisite for accessing the information.

Distributed social networking is a hard problem

Posted Oct 7, 2012 14:58 UTC (Sun) by Baylink (subscriber, #755) [Link]

Yes, but this still requires me, Bob, to *tell* Alice whom I don't want to see my posts.

This is why a trusted third party, who *does* know the shape of the graph, but does not tell any of the participants, is essential to allow the sort of restrictions on distribution that we've become accustomed to on, say, Facebook.

The sort of *problem* we're trying to fix here, of course, is the one I have right now. At 12:26EDT Friday, I bought an ad on FB, to promote an FB event. Apparently, this is Suspicious Behavior; my account was locked out the same minute, and I'm told their "upload us a picture of your government ID" process to unlock it can take *three to 15 days*.

Oh: yes, they accepted the ad, 3 hours later, and they are, presumably, happily charging me for it, though I couldn't log in to cancel it if I wanted to. So, clearly, I encourage thought about how to get *around* this category of problem, as unfruitful as I think it might be...

Distributed social networking is a hard problem

Posted Oct 7, 2012 17:34 UTC (Sun) by giraffedata (subscriber, #1954) [Link]

Yes, but this still requires me, Bob, to *tell* Alice

Yes, as you posted before, the copyright scheme isn't meant to address the problem of keeping the block confidential, and the NDA scheme is just a possibly effective alternative to what the copyright scheme does mean to address.

The sort of *problem* we're trying to fix here ... Apparently, this is Suspicious Behavior; my account was locked out the same minute. ...

So you're saying as long as one company owns social networking, that company can exclude someone arbitrarily and unfairly, but if it were an open, ungoverned social network, that could not happen, right? I suspect the ungoverned version would be worse. Facebook is trying (probably effectively) to solve a real societal problem with these imperfect detections of suspicious activity. I don't know what it is, but it's probably preventing some kind of theft or other thing I'm against.

So if we did have a viable open, distributed version of Facebook, I think people would insist on the same kind of protections.

Distributed social networking is a hard problem

Posted Oct 11, 2012 17:18 UTC (Thu) by wmf (guest, #33791) [Link]

I don't know of any DiSo systems that use flooding and I don't know why they would. When you send something to your friends, it should go directly from your server to each of your friends' servers with no intermediaries involved. The only way something would go from you to Alice to Charlie is if Alice manually copied and pasted it, which she can do in any system (even a centralized one).

Distributed social networking is a hard problem

Posted Oct 12, 2012 20:35 UTC (Fri) by filteredperception (guest, #5692) [Link]

Well, all these communications systems (usenet, email, facebook) sort of do both 'flooding' for _public_ posts, as well as 'less than flooding' with posts that are made directed at a subset of the public. Of course all of this depends on being able to run/host servers against an internet connection that respects the 'Right To Serve'[1]. But there I go with my own social network flooding techniques... :)

[1] http://cloudsession.com/dawg/downloads/misc/kag-draft-2k1...

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