tent.io/output/docs.html
2012-09-06 22:24:19 -04:00

117 lines
No EOL
5.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head><meta content="width=device-width, initial-scale=1.0" name="viewport" />
<title>Protocol Introduction · Tent - the decentralized social web</title>
<link href="/assets/css/bootstrap-cb0b9b6b1fd.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/css/bootstrap-responsive-cb034fa29d4.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/css/style-cba5092b759.css" media="screen" rel="stylesheet" type="text/css" />
<link href="/blog.xml" rel="alternate" title="Atom feed" type="application/atom+xml" />
<script type="text/javascript">var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34258323-1']);
_gaq.push(['_setSiteSpeedSampleRate', 50]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();</script></head>
<body><div class="navbar navbar-static-top">
<div class="navbar-inner">
<a class="brand" href="/">Tent</a>
<ul class="nav"><li ><a href="/blog">Blog</a></li><li class="active"><a href="/docs">Docs</a></li></ul>
</div>
</div><div class="container doc">
<div class="row">
<div class="span2">
<ul class="nav nav-list well">
<li class="nav-header">Tent</li>
<li><li class="active"><a href="/docs">Protocol Introduction</a></li></li>
<li><li ><a href="/docs/server-protocol">Server Protocol</a></li></li>
<li><li ><a href="/docs/app-auth">App Authentication</a></li></li>
<li><li ><a href="/docs/app-server">Server API for Apps</a></li></li>
<li class="nav-header">Types</li>
<li><li ><a href="/docs/post-types">Post Types</a></li></li>
<li><li ><a href="/docs/info-types">Profile Info Types</a></li></li>
</ul>
</div>
<div class="span8">
<div class="alert alert-block">
<h4>Alpha Documentation </h4>
<p>These docs are very rough, incorrect, and incomplete. They will be modified heavily over the next few weeks.</p>
<p>Please contribute by making Pull Requests and Issues on the <a href="https://github.com/tent/tent.io">GitHub repository</a>.</p>
</div><h2>The Tent Protocol</h2>
<p>Tent is a protocol for distributed social networking. It allows you to control
your data, who has access to it, and what can be done with it.</p>
<h3>API Overview</h3>
<p>Tent is a social layer over HTTP using <a href="http://en.wikipedia.org/wiki/JSON">JSON</a>.</p>
<p>Requests are authenticated with <a href="http://en.wikipedia.org/wiki/Hash-based_message_authentication_code">HMAC</a>
signatures, and apps use <a href="http://en.wikipedia.org/wiki/OAuth">OAuth 2</a> to access
content on behalf of users.</p>
<h3>Users</h3>
<p>Tent users are called entities and are defined by a URI.</p>
<p><strong>Example:</strong> John Smith&#39;s entity might be <code>https://johnsmith.me/</code>, implying a <a href="http://en.wikipedia.org/wiki/HEAD_%28HTTP%29#Request_methods">HEAD
request</a> to
<code>https://johnsmith.me/</code> would respond with a <code>Link</code> header pointing to
a Tent profile (e.g. <code>https://tent.johnsmith.me/profile</code>)</p>
<h3>Profiles</h3>
<p>Every Tent entity has a profile JSON file describing it. The most basic profile
has a single object containing the Tent version, the entity name (e.g.
johnsmith.me), an array of supported licences, and an array of servers
containing canonical API roots.</p>
<p>You may have multiple versions of the same info type in your profile (e.g. you
might need to support multiple versions of Tent.)</p>
<h3>Servers</h3>
<p>Tent servers are the protocol core. A server handles these responsibilities:</p>
<ul>
<li>Persisting data</li>
<li>Notifying other servers about new data</li>
<li>Ensuring content is only pushed to recipients accepting associated licences</li>
<li>Managing a list of servers (entities) it is following</li>
<li>Managing a list of servers (entities) that are following it</li>
<li>Authorizing apps to access data</li>
<li>Notifying apps about new or modified data they have access to</li>
</ul>
<h3>Apps</h3>
<p>Tent apps are typically where content is created and consumed.</p>
<p>For example:</p>
<ol>
<li>ian-hanson.me (Ian) posts a status update (post) from a micro blogging app authenticated with his server.</li>
<li>The app publishes the post to his server.</li>
<li>His server sends a notification to every server following him or mentioned in the post with permission to see the post.</li>
<li>If anna-collins.me (Anna) is following Ian, her server will receive a notification from Ians server containing the post.</li>
<li>If Anna has an app setup for consuming status updates, her server will send it a notification with Ians post.</li>
<li>Anna can now read Ians post from the status app.</li>
<li>If Anna decides to reply, her response will follow a path inverse to Ians post.</li>
</ol>
<h3>Posts</h3>
<p>Tent posts can be used to describe anything. The term used to describe a piece
of content is <strong>post</strong>. Posts each have a post type which describes its data.</p>
<h3>Notifications</h3>
<p>Tent notifications are used when a server needs to let another server or app
know about new content updates. Notifications are JSON POST requests containing
posts.</p>
</div>
</div>
</div><footer>© 2012 Apollic Software, LLC</footer></body>
</html>