p2panda's high-level Node API is an opiniated, out-of-the-box peer-to-peer stack which orchestrates all individual p2panda modules.
let topic = random;
let node = spawn.await?;
let = node.stream.await?;
It provides peer-to-peer networking, discovery, bootstrap, local-first sync, event streaming, causal ordering, storage, and more in one easy-to-use API.
🚧 This library is under active development and the APIs are not yet considered stable for production use. Core data types and user-facing APIs may still undergo breaking changes. Stability guarantees will improve with the release of v1.0.0.
Features
- High-level p2panda Node API for building decentralised p2p and local-first applications with minimal setup
- Unified orchestration of p2p networking, node discovery, mDNS, bootstrap, eventually consistent sync, event streaming, causal ordering, pruning, and persistence
- Topic-based Publish & Subscribe model with partial replication - sync only the data relevant to a topic
- Transport-agnostic "event delivery" architecture supporting Internet p2p today (QUIC/iroh) and future mesh/radio transports such as BLE and LoRa
- Built on single-writer append-only, fork-resistant CRDT operation logs with pruning, multi-writer causal ordering, and efficient sync
- Persistent local SQLite storage for operations, sync state, address books, stream cursors, and soon encryption/access-control state
- Event-stream-inspired consumer model with acknowledgements, replay support, at-least-once delivery semantics, and crash recovery
- Atomic transactional processing pipeline for resilience against crashes and corrupted database state
- Observable system state, events, and metrics
Getting Started
Install the Rust crate using cargo add p2panda and read our documentation and examples folder
for an introduction and code examples of the Node API.
Other languages / FFI
There's experimental support for bindings of p2panda's Node API into alternative programming languages and flavours:
p2panda-gobjectIntrospectable GLib/GObject API for various languagesp2panda-ffiNode.js, Python and Go support via UniFFI
Roadmap
- Out-of-the-box Tor support to protect IP addresses
- Filterable topic streams
- Integration of Capabilities, like Meadowcap or UCAN
- Multi-device group management with revocation
- Encryption for groups with Forward Secrecy
- Support Nodes to assure higher availability
- Event delivery via delay tolerant, replicated mesh-routing for BLE and LoRa
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in p2panda by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
This project has received funding from the European Union’s Horizon 2020 research and innovation programme within the framework of the NGI-POINTER Project funded under grant agreement No 871528, NGI-ASSURE No 957073, NGI0-ENTRUST No 101069594 and NGI0-COMMONS No 101135429.