Deployment Platform/Sneakernet/Packets format: Difference between revisions

Line 18: Line 18:
== Record types ==
== Record types ==


* '''sn_push''':
* Push changes of Sugar Network resource's properties.
:* {{Code|cmd}}: {{Code|sn_push}}
:* {{Code|cmd: sn_push}};
:* {{Code|src}}: sender's identity to push from
:* {{Code|content_type: records}};
:* {{Code|[dst]}}: receiver's identity to push to, optional for packets from master
:* {{Code|document}}, Sugar Network resource to push diff to;
:* {{Code|sequence}}: Sequence associated with packet's payload
:* {{Code|guid}}, document GUID to push diff for;
:* {{Code|diff}}, dictionary of {{Code|<prop_name>: {"value": <value>, "mtime": <mtime>}}} with changed property values.


* '''ACK''' packet:
* '''ACK''' packet:
Line 31: Line 32:
:* {{Code|pull_sequence}}: Sequence after merging original PUSH packet
:* {{Code|pull_sequence}}: Sequence after merging original PUSH packet


* '''sn_pull''', pull Sugar Network data.
* Pull Sugar Network data.
:* {{Code|cmd: sn_pull}};
:* {{Code|cmd: sn_pull}};
:* {{Code|sequence}}: sequence to pull.
:* {{Code|sequence}}: sequence to pull.


* '''files_pull''', pull files from shared directory.
* Pull files from shared directory.
:* {{Code|cmd: files_pull}};
:* {{Code|cmd: files_pull}};
:* {{Code|directory}}, synchronized directory to pull;
:* {{Code|directory}}, synchronized directory to pull;
:* {{Code|sequence}}, sequence to pull.
:* {{Code|sequence}}, sequence to pull.