Crates.io | melnet2 |
lib.rs | melnet2 |
version | 0.3.3 |
source | src |
created_at | 2022-09-06 21:08:04.424245 |
updated_at | 2024-07-05 22:42:22.540677 |
description | JSON-RPC/nanorpc-based, low-level auto-peering RPC protocol used throughout Themelio for peer-to-peer communciations |
homepage | |
repository | https://github.com/themeliolabs/melnet2 |
max_upload_size | |
id | 659748 |
size | 80,830 |
melnet2
is Mel's peer-to-peer protocol. It is an overlay network that can be built over any nanorpc
transport. The two important items are:
Backhaul
, which is a trait that fully describes an underlying protocol (e.g. JSON-RPC over TCP, JSON-RPC over HTTP)
TcpBackhaul
, an high-performance, pipelined implementation of JSON-RPC over TCPSwarm
, which wraps around a Backhaul
to implement an auto-peering peer-to-peer network of nodes implementing some nanorpc
RPC protocol.
Swarm
essentialy adds functionality for discovering peers and forming a randomly structured gossip network to any nanorpc
-based system.See examples/mn2-gossip
for an example program.