Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • briar briar
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 785
    • Issues 785
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • briar
  • briarbriar
  • Wiki
  • Blog Sharing Client

Last edited by Daniel Lublin Jan 18, 2022
Page history

Blog Sharing Client

The blog sharing client is a BSP client that allows users to share blogs with their contacts, who may accept or decline the invitations. It is used in conjunction with the blog client.

Identifier

The client's identifier is org.briarproject.briar.blog.sharing. The major version is 0.

Groups

The client uses a separate BSP group for communicating with each contact. The group descriptor is a BDF list containing the unique IDs of the contacts' identities, sorted in ascending order as byte strings.

Roles

All communication happens between two contacts, who have symmetrical roles.

Sessions

The messages exchanged between two contacts referring to a given blog constitute a session. The blog's unique ID is used as the session ID.

Message types

The protocol uses five message types.

0: INVITE - Sent by either party to start or restart a session. The message body is a BDF list with four elements: messageType (int), previousMessageId (unique ID or null), descriptor (list), and text (string or null).

previousMessageId is the ID of the previous message in this session, if any. descriptor is the descriptor of the blog being shared. The blog ID must be calculated from the descriptor, as it is used by subsequent messages in the session. text is an optional message from the inviter to the invitee explaining the invitation.

The sender sets the blog's visibility to VISIBLE when sending an invite message.

1: ACCEPT - Sent in response to an invite. The message body is a BDF list with three elements: messageType (int), blogId (unique ID), and previousMessageId (unique ID).

previousMessageId is the ID of the previous message in this session.

The sender sets the blog's visibility to SHARED when sending an accept message. The recipient sets the blog's visibility to SHARED when receiving an accept message.

2: DECLINE - Sent in response to an invite. The message body is a BDF list with three elements: messageType (int), blogId (unique ID), and previousMessageId (unique ID).

previousMessageId is the ID of the previous message in this session.

The inviter sets the blog's visibility to INVISIBLE when receiving a decline message.

3: LEAVE - Sent by either party when unsubscribing from the blog, if the blog's visibility is VISIBLE or SHARED. The message body is a BDF list with three elements: messageType (int), blogId (unique ID), and previousMessageId (unique ID).

previousMessageId is the ID of the previous message in this session.

The sender sets the blog's visibility to INVISIBLE when sending a leave message. The recipient sets the blog's visibility to INVISIBLE when receiving a leave message.

4: ABORT - Sent by either party when recieving a message that is valid but unexpected in the current state. The message body is a BDF list with three elements: messageType (int), blogId (unique ID), and previousMessageId (unique ID).

previousMessageId is the ID of the previous message in this session.

The sender sets the blog's visibility to INVISIBLE when sending an abort message. The recipient sets the blog's visibility to INVISIBLE when receiving an abort message.

State machine

state-machine-4

state-machine-4.odg

Aborting from any state returns the session to the START state.

Validity policy

  • A message is valid if it is well-formed and its previous message (if any) is a valid message in the same session.

Storage policy

  • All messages are stored.

Sharing policy

  • All local messages are shared.
Clone repository
  • A Quick Overview of the Protocol Stack
  • Adding support for new architectures in Tor
  • Android Power Management
  • BDF
  • BQP
  • BSP
  • BTP
  • Blog Client
  • Blog Sharing Client
  • Client API Notes
  • Connect at a distance
  • Create Account
  • Design options for multi block messages
  • Development schedule for private message deletion
  • FAQ
View All Pages