[IDEA] Sharing org files on a p2p network

Org version of this post

Community database of interlinked org documents on the Hypercore peer-to-peer network.

File structure

Here's a mock discussion to illustrate how shared files might be organized:

├── alice-files
│   └── combining-org-mode-and-p2p.org
├── bob-files
│   └── online-deliberation.org
└── carol-files
    └── reply-to-combining-org-mode-and-p2p.org

In the above example, we are looking at Alice's computer, which contains a shared-org-files directory inside the home directory. The shared-org-files directory contains one subdirectory per peer. Alice has added combining-org-mode-and-p2p.org inside of her designated writable directory alice-files, while Bob and Carol have added files inside of their respective writable directories. Bob and Carol's messages have been synced to Alice's machine. Likewise, the contents of the alice-files directory are available for Bob, Carol, and other peers to download.

  1. Alice shares combining-org-mode-and-p2p.org:
:ID:       hyper://alice1234/4edb7a91-46e9-402a-8a30-caee62b16f6b
#+title: Combining org mode and p2p

* Let's created a shared community network of org documents!
:ID:       hyper://alice1234/1e8ee2b7-43d1-44f3-9659-01d9d24774f3

Note that the each `:ID:` is prefixed with the public key of the author, here abbreviated as "alice1234."

  1. Bob shares online-deliberation.org:
:ID:       hyper://bob1234/cc398998-efd6-45c8-8c7b-a64c7accd977
#+title: Online deliberation

* I want to use org-mode to deliberate important issues.
:ID:       hyper://bob1234/3fdbf5f4-3e5d-4802-a5e6-9f34d0afac0b
  1. Carol shares reply-to-combining-org-mode-and-p2p.org:
:ID:       carol1234/b5def8f0-6ed8-4842-8c85-5acbc66ea326
#+title: Re: [[id:alice1234/4edb7a91-46e9-402a-8a30-caee62b16f6b][Combining org mode and p2p]]

* This idea could prove useful for [[id:bob1234/cc398998-efd6-45c8-8c7b-a64c7accd977][online deliberation]]!
:ID:       carol1234/9ab51eaa-d01f-4a23-9b1b-ea7801ffeafe


Each peer creates their own sqlite cache for just their own dataset. Caches are shared with peers along with the org files. To query databases from peers as well as your own, `attach` and `join` the dbs, allowing for backlinks between peer databases.

Trust network

In addition to the org files and sqlite cache, users also share a .json (or perhaps something like YAML) file containing a series of trust relationships between peers. Taking inspiration from TrustNet, we can use this data for community curation while retaining user control of their sources of information.

This trust network allows for queries like "show me all of the backlinks to the heading at point which were published by peers I trust for the topic of 'Emacs'".

Please let me know what you think of this idea! I am grateful for feedback.

Hello! My name is Joseph Turner. I’m part of Ushin, a small organization that’s currently developing the idea described in my last post. Our team met today, and we came up with a design for syncing org files between devices, using hyper-sdk, hyperdrive, and mirror-drive .

Once the network layer is functional, we’ll need some help on the Elisp side of development. We want to extend org-roam to be able to query multiple sqlite DBs in parallel with attach. We also want to add an interface for viewing and manipulating trust data.

We are looking for people who are familiar with org-roam and sqlite to help with the project. Familiarity with Hypercore or p2p networks is not necessary.

Please send an email to contact@ushin.org if you are interested!

Thank you!


I updated the original post:

  • Add a link to the Hypercore website.
  • Update the examples to demonstrate linking to headings by ID.
  • Remove the custom REPLY_TO property in Carol’s response. Instead, just link back to Bob’s heading the #+TITLE.
  • Remove the custom “reply view”.
  • Describe querying multiple dbs.
  • Remove restriction on edits after publication.
  • Remove description of sparse replication, since it’s not part of the current design.
  • Describe trust network.
1 Like