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.

peer statechart View in full resolution.

Sequence diagrams

Handshaking between two peers :
Handshaking

Publishing new entities :
Publishing

Algorithms

Processing advertisement :
Flowchart
View in full resolution.

Checking list of pending entities :
Flowchart
View in full resolution.

Checking user :
Flowchart

Checking message :
Flowchart
View in full resolution.

Checking operation :
Flowchart
View in full resolution.

Advertising user :
Flowchart
View in full resolution.

Advertising message :
Flowchart
View in full resolution.

Advertising operation :
Flowchart
View in full resolution.

Peer synchronization :
Flowchart
View in full resolution.