diff --git a/MessagingApp.markdown b/MessagingApp.markdown new file mode 100644 index 0000000..30b8fd0 --- /dev/null +++ b/MessagingApp.markdown @@ -0,0 +1,24 @@ +MessagingApp is an application that uses [BSP] to synchronise private messages. + +### Message types + +MessagingApp uses two message types: + +**0: PRIVATE_MESSAGE** - The content is a [BDF] list with two elements: message body (string) and attachments (dictionary, may be null). Each attachment's key is its name, and the value is a list with two elements: MIME type (string), and message identifier (raw, exactly HASH_LEN bytes). + +**1: ATTACHMENT** - The content is raw data. + +### Validation + +* A message of type PRIVATE_MESSAGE is valid if it is well-formed as described above +* A message of type ATTACHMENT is always valid + +### Storage policy + +* All local messages are stored +* All remote messages are stored + +### Sharing policy + +* Each local message is shared with one remote device +* Remote messages are not shared with other remote devices