pea2pea

pea2pea is a P2P library designed with the following use cases in mind:
- simple and quick creation of custom P2P networks
- testing/verifying network protocols
- benchmarking and stress-testing P2P nodes (or other network entities)
- substituting other, "heavier" nodes in local network tests
goals
- small, simple codebase
- ease of use
- interoperability
- good performance
non-goals
no_std
- becoming a framework
- support for multiple
async
runtimes (it should be simple enough to change it, though)
- any functionality that can be introduced "on top" (e.g. DHT, advanced topology formation algorithms etc.)
current state: beta
- all the planned functionalities are available and operational
- benchmarks demonstrate very good performance (over 1GB/s in favorable scenarios)
- the public APIs are unstable
- more tests, benches and examples wouldn't hurt
how to use it
- define a clonable struct containing an
Arc<Node>
and any extra state you'd like to carry
impl Pea2Pea
for it
- make it implement any/all of the protocols
- create that struct (or as many of them as you like)
- enable protocols you'd like the node(s) to utilize
that's it!
- the
tests
directory contains some examples of simple use
examples
contain more advanced setups, e.g. using noise encryption