Disclaimer
This article does not contain any kind of introduction and may not be easy to understand without studying the source code. Please contact me via email (mentioned at the bottom of the page) if you are interested in details.
TBD: add an introduction and describe entity types, packet types and so on.
Brief description of the protocol
- It's connection oriented, which means that data exchange is reliable, sequenced and non-duplicated. In order to achieve that, TCP is used as a transport protocol. Peers handshake before sending entities, peers send an acknowledgment after successful delivery.
- It's text-oriented, which means that packets contain text strings (in JSON format) rather than binary data.
- Protocol connections are multiplexed - all communication between two peers is performed through one TCP connection.
- Packet exchange is synchronous - a peer sends one packet and waits for response before sending another packet.
Sources
The Dscuss git repository contains the source files of the schemes
(docs/illustrations
). The schemes can be opened and edited in Dia.
Peer states
The image below represents the state diagram of some peer from the local peer view.
View in full resolution.
Sequence diagrams
Handshaking between two peers :
Publishing new entities :
Algorithms
Processing advertisement :
View in full resolution.
Checking list of pending entities :
View in full resolution.
Checking user :
Checking message :
View in full resolution.
Checking operation :
View in full resolution.
Advertising user :
View in full resolution.
Advertising message :
View in full resolution.
Advertising operation :
View in full resolution.
Peer synchronization :
View in full resolution.