[IDEA] Sharing org files on a p2p network
Community database of interlinked org documents on the Hypercore peer-to-peer network.
Here's a mock discussion to illustrate how shared files might be organized:
/home/alice/shared-org-files ├── alice-files │ └── combining-org-mode-and-p2p.org └── bob-files └── online-deliberation.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. Files inside
alice-files are shared on the network, while
bob-files contains Bob's shared files
that were synced from the network to Alice's machine.
For initial testing, we've been using
org-id links with a special
org-id-method that prefixes each ID with the author's public key. When you follow one of these links, the package should either jump to that file+heading or attempt to fetch that peer's dataset from the network.
It might make more sense to create a new org link type to handle
hyper:// links, but for now
org-id links allow us to seamlessly integrate with org-roam.
I would be very grateful for feedback on this: Does it make sense to stick with
org-id links? If we create a new link type, how would we need to extend org-roam so that it considers backlinks which are not of
In the following examples, note that the each
:ID: is prefixed with the public key of the author, here abbreviated as "alice1234" or "bob1234":
- Alice shares
:PROPERTIES: :ID: hyper://alice1234/4edb7a91-46e9-402a-8a30-caee62b16f6b :END: #+title: Combining org mode and p2p * Let's created a shared community network of org documents! :PROPERTIES: :ID: hyper://alice1234/1e8ee2b7-43d1-44f3-9659-01d9d24774f3 :END:
- Bob shares
online-deliberation.org, linking back to Alice's post:
:PROPERTIES: :ID: hyper://bob1234/cc398998-efd6-45c8-8c7b-a64c7accd977 :END: #+title: Online deliberation * I would use [[id:hyper://alice1234/1e8ee2b7-43d1-44f3-9659-01d9d24774f3][this tool]] to deliberate important issues. :PROPERTIES: :ID: hyper://bob1234/3fdbf5f4-3e5d-4802-a5e6-9f34d0afac0b :END:
Each peer creates a 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,
join the dbs, allowing for backlinks between peer databases.
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'".