Choose your thread type

Persistent Threads & Ghost Threads

Choose the correct thread for your app!

Use this page to determine which thread type is best for your use case before getting started. Thread type must be decided when the thread is first created. Once a thread is created, these settings cannot be changed; a new thread must be created if you wish to change to the type.

3Box Threads are available as either persistent threads where messages are available in a persistent OrbitDB feed store shared between users unless explicitly removed by the author or a moderator, or ghost threads, where messages are not persisted in a database but whose history is kept in-memory by online peers and can be requested by new users. For ghost threads, if all peers go offline then messages disappear.

In this documentation, threads are described according to the following convention: Thread Type + Write Access Control + Read Access Control.

For example, Persistent Members Open describes a persistent thread where only members can write but everyone can read.

Persistent Threads πŸ’¬

Persistent Threads are best suited for commenting, messaging, or content feeds with one or more of the following requirements:

  • write and read access control permissions

  • strong message persistence

  • high thread availability

  • can tolerate offline peers

​See example use cases for Persistent Threads​

Persistent threads are less scalable and chatty than ghost threads, making them less suited for high throughput chatrooms since every persistent threads message is saved in an append-only OrbitDB log which can get very long. This can cause persistent threads to load slowly on the client at scale.

Types of Persistent Threads

Persistent threads support various write and read access control permissions to give you greater control over how the threads function within your application. The matrix below outlines the available types of persistent threads based on your access control requirements. Additional detail on each type can be found further down this page.

Which thread should you use?

Read: Public

Read: Restricted (multi-user)

Read: Restricted (single user)

Write: Public

Open

-

-

Write: Restricted (multi-user)

Members Open

Members Confidential

-

Write: Restricted (single user)

Personal Open

-

Personal Confidential

Persistent: Open

Access control settings: β€’ Write: Public β€’ Read: Public

In persistent open threads, any user that knows the thread name can post new messages but moderators and authors can remove posts. Any user can read all messages.

β€‹πŸ’‘Idea: Open public commenting systems

With open threads, you can add an open commenting system to your app or website. This would allow all users of your service to comment openly on various topics or objects ranging from news articles, to collectibles, to URLs, and more. In this kind of system, you can permit everyone to post messages, but allow moderators to govern the thread.

Try it today! We provide 3Box Comments, which is a simple drop-in UI component to add a public commenting system to your webpage or application which uses persistent open threads. Explore the comments plugin.

Persistent: Members Open

Access control settings: β€’ Write: Members β€’ Read: Public

In persistent members open threads, only members can post new messages but moderators and authors can remove messages. Any user can read all messages.

β€‹πŸ’‘Idea: Restricted public forums

With persistent members open threads, you can add restricted commenting systems to your app or website. This would restrict posting permissions only to members of a certain group or community, but still enable messages to be read by everyone that visits the site. This type of feature would be similar to restricted subreddits where only members can post but every user can read the subreddit, and could also be particularly useful in community chats and DAO proposal systems where only members of the DAO are permitted to post messages in the thread.

Recommended! Members threads are the safest because there is less concern of spam and inappropriate content.

Persistent: Members Confidential

Access control settings: β€’ Write: Members β€’ Read: Members

In persistent members confidential threads, only members can post new messages but moderators and authors can remove posts. Only members can read messages.

β€‹πŸ’‘ Idea: Direct Messages and Group Chats

With persistent members confidential threads you can enable private messaging systems such as direct messages (2 users) and group chats (3+ users) to your application. Messages can only be added and read by members of the thread.

Persistent: Personal Open

Access control settings: β€’ Write: Personal β€’ Read: Public

Persistent personal open threads are a specific kind of members thread that allow only a single user to post new messages and moderate their own thread. Everyone can read the thread.

Personal threads are achieved when the firstModerator does not add additional moderators or members.

β€‹πŸ’‘Idea: Personal public content feeds

With persistent personal open threads, you can allow users to create a personal feed of content or information, such as photo streams, shopping lists, follower lists, status updates, and much more. In the 3Box Hub App, we use personal threads for the following feed, which allows a 3Box user to add and remove other users that they are following from a personal list that others can view.

Persistent: Personal Confidential

Access control settings: β€’ Write: Personal β€’ Read: Personal

Persistent personal confidential threads are a specific kind of members thread that allow only a single user to write to, read from, and moderate their own thread.

β€‹πŸ’‘Idea: Private Lists

With persistent personal confidential threads, you can allow users to create a private list that only they can read from and add items to. This type of thread is useful for personal shopping carts, personal playlists, and more.

Ghost Threads πŸ‘»

Ghost Threads are best suited for high throughput chatrooms that have one or more of the following requirements:

  • many messages

  • lots of activity/updates

  • fast load speeds

  • disappearing ephemeral messages

​See example use cases for Ghost Threads​

The drawback to ghost threads is that messages are weakly persisted, since they only exist ephemerally in the memory or peers. If all peers simultaneously go offline, the message history will be lost.

Types of Ghost Threads

Unlike persistent threads, ghost threads do not yet support access control options, so every thread is open. If you need access control, we recommend persistent threads.

Which thread should you use?

Read: Public

Read: Restricted (multi-user)

Read: Restricted (single user)

Write: Public

Open

-

-

Write: Restricted (multi-user)

-

-

-

Write: Restricted (single user)

-

-

-

Ghost: Open

In ghost open threads, any user that knows the space and chatroom name can join and post new messages in the thread. Any user or visitor to the website can read messages.

β€‹πŸ’‘Idea: High-traffic chatrooms or trollboxes

With ghost threads, you can host chatrooms or trollboxes meant for fast-paced discussions between a few or many users that don't need to be persisted anywhere. This is particularly useful if your threads will be very long.