In order to allow easy integration with arbitrary applications, the Overlay Network has a minimalist design. The main task is to provide transport channels between any nodes in the world. Exposed super peers are used to discover other nodes. If a direct connection between two nodes is not possible, the traffic is forwarded via a super peer. Each node generates an identity at the first start, through which the node can be uniquely addressed.
The network gives no guarantee that messages sent will arrive, arrive in the correct order or arrive exactly once.
At startup the drasyl node connects to an always-present root node (the super peer). The super peer helps to discover other nodes and establish direct connections to other nodes.
drasyl uses different methods to find other peers. Peers running within a JVM are automatically discovered via shared memory. Local peers running in other JVMs on the same computer are found via the file system. Remote nodes are found using the Super Peer, which acts as a rendezvous server.
Each node generates on the first start a unique identity consisting of a public/private key-pair and a proof of work (PoW). The public key is used to address the node. The PoW is required to prevent sybil attacks on the network by generating a large amount of identities. Currently a cpu-hard PoW is used. For the future a change to a memory-hard PoW is planned.
In a future release, messages wil be end-to-end encrypted.
We have created several BPMN diagrams for important components/processes within the overlay network
- Node Lifecycle
- Register at Super Peer
- Send, Relay & Receive Message
- Establish Direct Connection (P2P)