Changes

no edit summary
Line 1: Line 1: −
Packets' structure:
+
== Packets format ==
   −
* '''PUSH''' packet:
+
Packets are tarball files with {{Code|.packet}} suffix.
:* {{Code|type}}: {{Code|push}}
+
 
 +
On logic level, every packet consists of:
 +
 
 +
* one header, a dictionary of key-value pairs;
 +
* records, a dictionary of key-value pairs and optional data depending on record type.
 +
 
 +
== Header ==
 +
 
 +
Header is being stored in JSON notation in {{Code|/header}} file in packet tarball.
 +
 
 +
* {{Code|src}}, sender's GUID
 +
* {{Code|dst}}, optional destination GUID
 +
* {{Code|filename}}, suggested file name for packet file, it is assumed to be unique
 +
 
 +
== Record types ==
 +
 
 +
* '''sn_push''':
 +
:* {{Code|cmd}}: {{Code|sn_push}}
 
:* {{Code|src}}: sender's identity to push from
 
:* {{Code|src}}: sender's identity to push from
 
:* {{Code|[dst]}}: receiver's identity to push to, optional for packets from master
 
:* {{Code|[dst]}}: receiver's identity to push to, optional for packets from master