From 84bfa4dc0827b08fca8fb36a52d99bd1e41cc2a6 Mon Sep 17 00:00:00 2001 From: akwizgran Date: Mon, 20 Apr 2015 09:18:38 +0000 Subject: [PATCH] akwizgran deleted page: ForumApp --- ForumApp.markdown | 57 ----------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 ForumApp.markdown diff --git a/ForumApp.markdown b/ForumApp.markdown deleted file mode 100644 index 4931aa5..0000000 --- a/ForumApp.markdown +++ /dev/null @@ -1,57 +0,0 @@ -ForumApp is a [BSP application](BSP) that synchronises forum posts among groups of devices. Any subscriber to a forum can invite new subscribers, and any subscriber can post to the forum. - -### Channel identifiers - -All forums share a single invitation channel with the following random identifier: -`667e 2acb da80 2e61 3168 98f2 8ec5 8102 fcf2 3d10 04ee 3086 f5e9 94d8 30f5 b773` - -Each forum also has its own channel with a [hash identifier](BSP#channel-identifiers). The application data structure for generating the identifier is a [BDF](BDF) list with two elements: `name` (string) and `salt` (raw). The random salt prevents collisions between forums with the same name. - -The application identifer is random: -`859a 7be5 0dca 035b 64bd 6902 fb79 7097 795a f837 abbf 8c16 d750 b3c2 ccc1 86ea` - -### Message types - -**0: INVITATION** - The content is a BDF list with three elements: `forum` (list) and `note` (string, may be null). `forum` is a list with two elements, `name` and `salt`, as described above. `note` is an optional note from the inviter to the invitee. - -**1: RESPONSE** - The content is a BDF list with three elements: `invitation_id` (raw), `decision` (boolean), and `note` (string, may be null). `invitation_id` is the identifier of an invitation created by the opposite peer. `decision` indicates whether the invitee wishes to subscribe. `note` is an optional note from the invitee to the inviter. - -**2: DEPARTURE** - The content is a BDF list with one element: `invitation_id` (raw), which is the identifier of an invitation created by either peer. - -**3: POST** - The content is a BDF list with two elements: `author` (list, may be null) and `content` (list). If `author` is null, the post is anonymous. Otherwise `author` is a list with two elements: `identity` (list) and `signature` (raw). `identity` is a list with two elements: `name` (string) and `public_key` (raw). `signature` is calculated over `content`. - -`content` is a list with three elements: `parent_id` (raw, may be null), `body` (string), and `attachments` (dictionary, may be null). If `parent_id` is not null, it is the identifier of a post to which this is a response. Each key in `attachments` is the name of an attachment, and the value is a list with two elements: `mime_type` (string) and `message_id` (raw). - -**4: ATTACHMENT** - The content is raw data. - -### Validity policy - -* An invitation or response must belong to the invitation channel. -* A post or attachment must belong to a forum channel. -* An invitation is valid if it is well-formed. -* A response is valid if it is well-formed and it references a valid invitation created by the opposite peer. -* A departure is valid if it is well-formed and it references a valid invitation created by either peer. -* A post is valid if it is well-formed, its parent (if any) is a valid post, and it is either anonymous or carries a valid signature over its content. -* An attachment is always valid. - -Note that a post can be validated before its attachments have been received, and an attachment can be validated before it has been completely received. - -### Storage policy - -For the invitation channel: -* All local messages are stored. -* All remote messages are stored. - -For forum channels: -* Local messages are stored while the local peer subscribes to the forum. -* Remote messages are stored while the local peer subscribes to the forum. - -### Sharing policy - -For the invitation channel: -* Each local message is shared with one remote peer. -* Each remote message is shared with the remote peer that created it. - -For forum channels: -* Local messages are shared with all remote peers that subscribe to the forum. -* Remote messages are shared with all remote peers that subscribe to the forum.