Deployment Platform/Sneakernet/Packets format
Packets format
Packets are tarball files with .packet
suffix.
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 /header
file in packet tarball.
src
, sender's GUIDdst
, optional destination GUIDfilename
, suggested file name for packet file, it is assumed to be unique
Record types
- sn_push:
cmd
:sn_push
src
: sender's identity to push from[dst]
: receiver's identity to push to, optional for packets from mastersequence
: Sequence associated with packet's payload
- ACK packet:
type
:ack
src
: master's identitydst
: receiver's identity ack is intended forpush_sequence
: original PUSH packet's sequencepull_sequence
: Sequence after merging original PUSH packet
- sn_pull, pull Sugar Network data.
cmd: sn_pull
;sequence
: sequence to pull.
- files_pull, pull files from shared directory.
cmd: files_pull
;directory
, synchronized directory to pull;sequence
, sequence to pull.