home / blog / podcasts / videos / notes / photos / about / more

Thoughts about Tent

and the future of the protocol

Posted by Jeena

Since about two months I am active in the Tent community. This post ist about Tent interna so if you're not interested in it, just move along :-) If you want to know more about Tent and how to use it or set up your own server, have a look at tenti.co.

I just had a lengthy discussion with another developer, ^tobiastom.tent.is, about the main structure and purpose and future development of the Tent-protocol, servers and applications.

How I saw the protocol

I've always seen Tent like a big key-value store with following possibilities. Everybody could just put in what ever data they want and later on get it out and people following woule be able to be notified about changes. The server would be compleatly agnostic about the content and the types only are there for applications to query for the kind of data they understand.

So if I wanted to make for example a new type of data like ^beberlei.tent.is did with Favorites then I would just come up with it, document and publish it, made a application which can post and read posts of this type and try to encourige other app developers to implement at least reading of the data. No changes to any server would be necessary and you could just move from one server to another without any problems because the server would be agnostic of the content.

Right now in version 0.1 the only server out there is implemented exactly like that, therefor ^mwanji.tent.is was able to implement ^beberlei.tent.is's Favourites and Bookmarks and everybody who uses either Zelten or Essayist is able to enjoy this new post type and it doesn't matter on which server you are.

So in my mind post types were just documentation so developers could implement it into their apps.

How Tobias saw the protocol

Tobias, on the other hand, had something different in mind. In his world post types were essential for the server because the server would determin if a post was valid or not. And to do that it would need the information of the post type, which would be the scheme on which the server would validate the JSON comming from the application.

The server then could for example send email notification when the post type needs it or push notifications for your iPhone or Android app, it could prepare/resize/crop images as needed and even crosspost a video you posted to Tent on YouTube and so on.

To do that, the server would need to be very familiar with the post type and what it needs to do with it. Therefor it would also kind of need to reject the posts with a type it isn't aware of exists.

In this scenario it would not be possible for ^beberlei.tent.is to implement his own Favorites post type to be used by everybody with their own servers. He would need to be the server provider and have a server which is aware of the existence of the Favorites post type and what to do with it and how to validate it before saving it. And ^mwanji.tent.is could only offer this functionality to people who run a server which is aware of this functionality too.

How it really is

Honestly, I have no idea whose model is the one the Tent-protocol developers are thinking of when they work on the protocol, but I assume the truth is somewhere in the middle, even if I don't know where exactly and it seems not so easy to determine it. We both have the same sources of information but we both interpret it quite different.

I must admit that since I've been trying to get more information it more and more leans to Tobias' interpretation. For example, types are defined as:

The post type describes the schema and semantics of the content object.

Ok it doesn't say that the server should reject the type if it doesn't know it but it is not like it always is agnostic. Even if it is not always validating the incomming data it already does it for the type status. I tried to post a status post which was longer then 256 characters and even if the server didn't reject it it only saved the first 256 characters so the person I was writing to didn't get more then the first 256 characters.

One of the todos for tentd (the reference server) says:

Add data validation/normalization.

And for v0.3 of the protocol in late january 2012 it says:

Machine Readable post type schemas

Which also would suggest that some day the right thing to do for a server if it can not validate a post against such a post type schema would be to reject it. In theory the URIs which represent protocol types right now could be URLs to machine readabla post type schemas so you could still invent your own post type and make it usable for everyone on every server. In reality such schemas are quite complicated.

So what is Tent, a key-value store like WebDav with following abilities or is it more like a social media equivalent to the XMPP protocol where everything is predefined by the protocol and mostly companies can add extensions like Google does for its Google Talk?

Taking the data with you

The biggest advantage of Tent in my opinion is that they promisse that you will be able to switch servers:

Can I switch Tent servers?
Absolutely! And you can take your relationships – your followers with you. If a service provider changes its terms, shuts down, is acquired, discontinues a product, no problem – you can take your data and relationships with you and set up somewhere else – on your own server or at another provider.

Can I get my data out of Tent?
Of course! There are two simple ways: with an app or another Tent server. Just authorize a Tent app or a new Tent server to view the content and it will transfer over automatically.

At least that is what they promisse, but if the server is not agnostic of the data, how would implementing of this functionality be possible? If one company adds a post type with a schema and stuff happening on the server like emails being send or push notifications to iPhone, etc. then when the user moves to another server the new server will not know what to do with the unknown post type and will just reject to import your data.

Then, in my opinion, we have the same situation like we have with Twitter or Facebook, the user is locked and needs to use this companies server if she doesn't want to lose her data.

But perhaps I am missing some fundamental detail which would resolve all this problems?

[Update 2012-12-06]:

I just got some more info of ^daniel.tent.is (one of the core devs of the Tent protocol):

Great discussion. Tent servers are event-orientated data stores. They're closer to key value as servers aren't (for now) intended to validate post types. i.e. for email, you could have a Tent app that was also an SMTP server. When it saw a "mail type" post in the user's feed, it would parse the post and send it out as an email. Similarly if it received an email over SMTP, it could create a new post of that type. Machine readable schemas are meant to help apps, not servers, read types.

Of course this also makes transferring data simple, as the posts just need to be copied between servers. Servers communicate using the Tent protocol with apps and other Tent servers. Other Tent apps will communicate with other protocols.

I'll try to put together a philosophy of Tent post for the tent.io blog soon.

Have you written a response? Let me know the URL:

There's also indie comments (webmentions) support.