The Banana protocol.
I love building unconventional things, and this one might take the cake. Iām learning and flexing in Rust and distributed systems, and Iām actively working on Banana Protocol, PeerāAssisted Local Memory (PALM). This is a work in progress; Iām still exploring and iterating.
Abstract
- PALM is a localāfirst, peerātoāpeer (P2P) storage system that aggregates unused disk capacity across devices on the same local network (home WiāFi, campus, office, community mesh).
- Goals: privacy, fault tolerance, and efficiency without central servers or cloud dependence.
- Approach: threshold erasure coding + decentralized discovery (mDNS/gossip) + contentāaddressed fragments.
Overview
- Devices on a LAN cooperate to store files. Data is split into n fragments and recoverable from any k fragments (k ⤠n).
- Privacy by design: fragments are nonāinformative below the recovery threshold.
- Focus: simple setup, LAN performance, low operational overhead.
The Banana Metaphor
- File = bunch of bananas; fragment = single banana.
- Lose a few bananas, and you can still reconstruct the bunch if enough remain.
- A single banana reveals nothing useful on its own.
Core Concepts
- Erasure Coding: ReedāSolomon or fountain codes; kāofān recovery.
- Fragment Distribution: no single peer stores the full file; placement balances capacity and availability.
- Content Addressing: cryptographic hashes for integrity, deduplication, and lookup.
Properties
- Fault Tolerance: redundancy and parallel retrieval mitigate churn and offline peers.
- Privacy: fragments are useless in isolation; threshold decoding is required.
- Efficiency: leverages LAN speeds; avoids internet latency and egress costs.
- Decentralization: mDNS and lightweight gossip; no master index or central coordinator.
How It Works
- Upload: split ā encode ā assign ā distribute fragments based on capacity/health.
- Storage: mutual hosting with quotas and local policies.
- Retrieval: request by content ID ā locate peers ā fetch ā„ k fragments (in parallel) ā reconstruct locally.
- Discovery/Membership: local presence via mDNS; fragment availability and health via gossip.
- Integrity: contentāaddressed fragments; optional signatures for provenance.
Remote Access (Exploratory)
- Voluntary relay peers; holeāpunching where possible.
- No fixed central relay; multiple relays for robustness.
- May remain optional to preserve localāfirst simplicity.
Comparison
- IPFS: wideāarea/global; PALM is LANāfirst, lightweight, offlineāfriendly.
- Storj: decentralized cloud with central elements; PALM avoids servers, purely local P2P.
- TahoeāLAFS: secure global storage with heavier setup; PALM prioritizes simplicity and LAN performance.
Planned Tech Stack
- Language: Rust (performance, safety, async).
- Coding: ReedāSolomon or fountain codes.
- Networking: QUIC preferred; TCP/UDP fallback.
- Discovery: mDNS + lightweight gossip.
- Storage: contentāaddressed fragments with local persistence and quotas.
Use Cases
- Campus/dorm collaboration and sharing.
- Offline events/workshops.
- Community/disasterāresilient local meshes.
- Edge clusters with limited backhaul.
- Lowābandwidth environments.
- Educational demos in distributed systems and coding theory.
Project Status (Work in Progress)
- Stage: very early; active prototyping.
- Current work:
- Encoding/decoding reliability.
- Local peer discovery/membership.
- Fragment placement/replication strategies.
- Recovery under churn.
- CLI for endātoāend testing.
- Code: not public yet; rapid iteration expected.
Open Questions
- Choosing k/n per file size, SLA, and peer reliability.
- Placement policies balancing capacity, latency, and churn.
- Gossip scope and rate control on dense LANs.
- Optional relay design that preserves decentralization.
- Security: signatures, access control, abuse prevention.
- UX: onboarding, quotas, failure visibility, conflict resolution.
Call for Feedback Iād love input from folks working on localāfirst systems, P2P networking, Rust, and erasure codingāespecially on placement strategies, recovery tradeāoffs, and realāworld LAN constraints.
Conclusion Banana Protocol (PALM) aims to make private, resilient, and fast LAN storage practical through threshold coding and cooperative peersāavoiding cloud costs and central points of failure. Iām still building and learningāone fragment at a time. šš