Open iduartgomez opened 3 years ago
For communication a P2P network should be implemented.
The preferred transport protocol for it's attributes is QUIC, currently there are some implementations of QUIC in Rust:
quinn-proto
is executor agnostic and a custom event loop has to be provided.quinn
is the highest level one, the proto subcrate would be on par with quiche
as far as low level and can be used as a building block.
QUIC has some nice properties: efficient streams, native encryption, low latency and high throughput. This makes it ideal to build a RCP framework on-top of it which can be then used to handle communication between agents over a public network.
For peer routing Kademlia is the preferred data-structure/algorithm, libp2p.io has a working Rust implementation of it, as well as other useful building blocks. Unfortunately the QUIC protocol has not yet been added, although a PR is underway (libp2p/rust-libp2p#1334). Other building blocks that can be used from libp2p are the modules for peer discovery, streams, TLS. How could this be tied with quinn/quiche has to be explored (the undergoing PR uses quinn under the hood).
Other options: https://github.com/maidsafe/quic-p2p (does not seem mature enough?)
Since transport layer is interchangable and libp2p transport protocols are implemented through traits could start working with tcp and move to QUIC later on.
Some work done so far:
Ongoing: Groups, topic subscription and broadcasting.
The overall architecture is as follows:
Groups are an abstract type which denote a set of agents which share a feature in common. Groups are owned by one or more agents. Agents can (request) join, create or drop groups.
This is a broad issue to track any work related to the network layer. This pertains to: