All Projects → ljedrz → pea2pea

ljedrz / pea2pea

Licence: CC0-1.0 license
A simple, low-level, and customizable implementation of a TCP P2P node.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to pea2pea

async
Synchronization and asynchronous computation package for Go
Stars: ✭ 104 (+235.48%)
Mutual labels:  asynchronous
asab
Asynchronous Server App Boilerplate (ASAB) is a micro-service framework for Python 3 and asyncio.
Stars: ✭ 26 (-16.13%)
Mutual labels:  asynchronous
p2p-forwarder
P2P Forwarder - a tool for farwarding tcp/udp ports. Made using libp2p.
Stars: ✭ 31 (+0%)
Mutual labels:  peer-to-peer
go-peer
Library for create secure and anonymity decentralized networks.
Stars: ✭ 74 (+138.71%)
Mutual labels:  peer-to-peer
addon-zerotier
ZeroTier One - Home Assistant Community Add-ons
Stars: ✭ 103 (+232.26%)
Mutual labels:  peer-to-peer
school21
Как подготовиться к бассйну Школы 21: изучаем терминал, vim, работаем с gcc, norminette, git, пишем первую программу на Си.
Stars: ✭ 41 (+32.26%)
Mutual labels:  peer-to-peer
bytecodec
A tiny Rust framework for implementing encoders/decoders of byte-oriented protocols
Stars: ✭ 21 (-32.26%)
Mutual labels:  asynchronous
aPRAW
Asynchronous Python Reddit API Wrapper
Stars: ✭ 49 (+58.06%)
Mutual labels:  asynchronous
TrackCOVID
An open source project which provides privacy-preserving contact tracing for communities using QR codes
Stars: ✭ 23 (-25.81%)
Mutual labels:  peer-to-peer
EnumerableAsyncProcessor
Process Multiple Asynchronous Tasks in Various Ways - One at a time / Batched / Rate limited / Concurrently
Stars: ✭ 84 (+170.97%)
Mutual labels:  asynchronous
aioudp
Asyncio UDP server
Stars: ✭ 21 (-32.26%)
Mutual labels:  asynchronous
ytpy
Python asynchronous wrapper for searching for youtube videos.
Stars: ✭ 19 (-38.71%)
Mutual labels:  asynchronous
XAsyncSockets
XAsyncSockets is an efficient Python/MicroPython library of managed asynchronous sockets.
Stars: ✭ 28 (-9.68%)
Mutual labels:  asynchronous
core.horse64.org
THIS IS A MIRROR, CHECK https://codeberg.org/Horse64/core.horse64.org
Stars: ✭ 3 (-90.32%)
Mutual labels:  asynchronous
microcore
.NET Core framework for inter-service communication
Stars: ✭ 24 (-22.58%)
Mutual labels:  asynchronous
WindFarm
Information the Wind concept, spec and upcoming events
Stars: ✭ 23 (-25.81%)
Mutual labels:  peer-to-peer
PyPPSPP
Python implementation of Peer-to-Peer Streaming Peer Protocol (PPSPP) [RFC7574]
Stars: ✭ 18 (-41.94%)
Mutual labels:  peer-to-peer
network-monorepo
Monorepo containing all the main components of Streamr Network.
Stars: ✭ 223 (+619.35%)
Mutual labels:  peer-to-peer
Master-Thesis
Deep Reinforcement Learning in Autonomous Driving: the A3C algorithm used to make a car learn to drive in TORCS; Python 3.5, Tensorflow, tensorboard, numpy, gym-torcs, ubuntu, latex
Stars: ✭ 33 (+6.45%)
Mutual labels:  asynchronous
nancy
How JavaScript Promise Works
Stars: ✭ 26 (-16.13%)
Mutual labels:  asynchronous

pea2pea

crates.io docs.rs LOC dependencies actively developed issues

pea2pea is a simple, low-level, and customizable implementation of a TCP P2P node.

The core library only provides the most basic functionalities like starting, ending and maintaining connections; the rest is up to a few low-level, opt-in protocols:

  • Handshake requires connections to adhere to the given handshake logic before anything else can be done with them
  • Reading enables the node to receive messages based on the user-supplied Decoder
  • Writing enables the node to send messages based on the user-supplied Encoder
  • Disconnect makes the node perform specified actions whenever a connection with a peer is severed

goals

  • small, simple, non-framework codebase: the entire library is ~1k LOC and there are few dependencies
  • ease of use: few objects and traits, no "turboeels" or generics/references that would force all parent objects to adapt
  • correctness: builds with stable Rust, there is no unsafe code, there's more code in tests than in the actual library
  • low-level: the user has full control over all connections and every byte sent or received
  • good performance: over 10GB/s in favorable scenarios, small memory footprint

how to use it

  1. define a clonable struct containing a Node and any extra state you'd like to carry alongside it
  2. implement the trivial Pea2Pea trait for it
  3. make it implement any/all of the protocols
  4. create that struct (or as many of them as you like)
  5. enable the protocols you'd like them to utilize

That's it!

examples

  • including noise encryption, simple interop with libp2p, or TLS connections

status

  • all the desired functionalities are complete
  • the crate follows semver, and some API breakage is still possible before 1.0
  • the project is actively developed, with all changes being recorded in the CHANGELOG
  • some of the desired features that are not yet available in Rust include associated type defaults
  • the project aims to always build with the current stable Rust compiler; legacy version support is not a goal, but they might also work
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].