Decentralized Tech Research

Decentralized Tech Research
Alternatives To Decentralized Tech Research
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Moodlebox96
3 days ago10agpl-3.0Jinja
A Moodle server and Wi-Fi router on Raspberry Pi 3 and 4
Pithub4
7 years agoapache-2.0Shell
Software to help operate an offline git repo hosted on a raspberry pi
Decentralized Tech Research3
5 years ago
Pirateplayer1
3 years agomitPython
Offline audio player for pirate-audio
Alternatives To Decentralized Tech Research
Select To Compare


Alternative Project Comparisons
Readme

decentralized-tech-research

Project Description GitHub ⭐
IPFS A global content-addressed DAG. Just immutable data, but a name service layer called IPNS lets you assign changable names to immutable content. 12,708
DAT Decentralized protocol for sharing data. The Beaker browser can open links to dat content. 6,670
Scuttlebutt Offline-first protocol and social network, with a few clients like Patchwork. 6,670
ShareDB A real-time database for editing JSON docs concurrently. 1,820
Mastodon Federated self-hosted microblogging 13,226
Statebus Reactive JS framework reminiscent of Meteor 46

the "quick take"

Based on an early look into what's out there, the easiest way to get photos and simple message sharing for offline devices with minimal setup would be:

to setup Patchwork on each device--and then instead of running the server through electron, we could run expose each backpack's instance as website accessible by anyone in the network.

Projects

IPFS

IPFS works like Bittorrent for files in a global namespace.

It's easy to install: a single binary or build from go source. A Raspberry Pi installer also exists.

IPFS is a low level tool for syncing data across devices. A survey of awesome-ipfs, a list of things made on top of IPFS:

  • An early version of a message board called ipfs-boards - here's an example board I made in ipfs-boards. Text-only.

  • The Yjs project has an IPFS "connector." Its example page has some nice demos of live decentralized editing.

DAT

Tom MacWright has a helpful blog post with a comparison between DAT and IPFS.

It's also easy to install: via Beaker knows how to open dat:// links to content on the DAT network.

Some DAT projects:

Fritter is a prototype Twitter clone on DAT. No image support.

Rotonde is a social network built on DAT.

Used by a small community. Supports sharing images.

Services like Hashbase exist where you can pin DAT content for a fee.

Scuttlebutt

Clients discover each other a LAN with multicast UDP and "gossip" the social network's data with other people they follow. Projects like MinBase could form the basis for a simple and minimal server run by each rpi. Patchwork is a solid, themable client. All backpacks could, when they have internet access, join a specific pub server so that they know to sync with each other.

A major con would be that to be recognized as a unique "person" on Scuttlebutt, you'd need to run a client--i.e., if everyone whose phones are connected to a backpack uses its scuttlebutt instance, everyone is "posting" as the same identity. Not sure this is actually a problem for our use-case though...

Raspberry Pi Installation

Currently no ARM7 binaries exist for an easy installation of Patchwork/SSB--there's an issue for that.

There's also issues running electron apps with the newest version of electron--this thread was helpful in finding an electron version that actually worked.

Here's the install process:

# add github.com to known_hosts
ssh-keyscan github.com

# upgrade node and npm
sudo apt-get remove nodejs
sudo apt update
sudo apt full-upgrade -y
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt install -y nodejs
npm install -g npm

# increase swapfile size for compiling patchwork
sudo vi /etc/dphys-swapfile

# in the file above, uncomment the CONF_SWAPSIZE and make it read:
CONF_SWAPSIZE=1024

# modify package.json to use an older version of electron
vim package.json

# edit the "electron" entry in the "devDependencies" section to read
"electron": "~1.7.9"

# install patchwork
git clone https://github.com/ssbc/patchwork
cd patchwork
npm install
npm start

After a long time, patchwork should appear on screen. Unfortunately, it looks like the CPU usage on my RPI 2 is pretty unusable. Connecting to a pub and syncing messages, which usually takes a few seconds on a laptop, took 15+ minutes on the RPI.

Additionally, after digging into the source to see how feasible a "headless" mode might be, where clients might be able to connect to a website and post on behalf of the backpack, it looks like the code is pretty reliant on being an electron-first app, instead of a hybrid app layering native functionality on top of an HTML-first app.

I also saw that a more minimal SSB client called minbase was linked to from on the patchwork github, so I tried installing that:

cd ~
git clone https://github.com/evbogue/minbase.git
cd minbase
npm install
npm run build
npm start

Unfortunately there were errors:

Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at validateHeader (_http_outgoing.js:503:11)
    at ServerResponse.setHeader (_http_outgoing.js:510:3)
    at /home/pi/Downloads/minbase/node_modules/decent-ssb/plugins/ws/json-api.js:23:11

I posted an issue in their tracker.

So for now, SSB on rpi with an easy client is a no go.

Mastodon

Decentralized microblogging with federation. Relies on DNS. Skinnable, each backpack could run an instance and know to find and federate with the other instances when they are on the internet. Supports photos and private messages.

ShareDB

A low level library for making changes to a JSON document concurrently. Supports offline sync. A building block for bigger tools.

Statebus

A small library for synchronizing state across webpages. Small opinionated framework for writing JS apps that can send and receive reactive state. Impressive but no real community around it (yet).

upcoming offline-tech events

Peer-to-Peer Web has a Berlin hangout coming up.

Local

Dhruv Mehrotra's OtherNet in Bedstuy and Bushwick.

Hyperboria has resources on "meshlocals."

Popular Offline Projects
Popular Rpi Projects
Popular User Interface Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Offline
Rpi
Ipfs
Dat