Motivation # In order for more efficient synchronization of conversational messages, information should be provided allowing a node to more effectively synchronize the dependencies for any given message.
Format # We introduce the metadata message which is used to convey information about a message and how it SHOULD be handled.">
Motivation # In order for more efficient synchronization of conversational messages, information should be provided allowing a node to more effectively synchronize the dependencies for any given message.
Format # We introduce the metadata message which is used to convey information about a message and how it SHOULD be handled." />
Dean Eigenmann <ahref="mailto:dean@status.im">dean@status.im</a>
,
Andrea Maria Piana <ahref="mailto:andreap@status.im">andreap@status.im</a>
,
Oskar Thorén <ahref="mailto:oskar@status.im">oskar@status.im</a>
</li>
</ul><p>In this specification, we describe a method to construct message history that will aid the consistency guarantees of <ahref="/spec/2">2/MVDS</a>. Additionally, we explain how data sync can be used for more lightweight messages that do not require full synchronization.</p>
<h2id="motivation">
Motivation
<aclass="anchor"href="#motivation">#</a>
</h2>
<p>In order for more efficient synchronization of conversational messages, information should be provided allowing a node to more effectively synchronize the dependencies for any given message.</p>
<h2id="format">
Format
<aclass="anchor"href="#format">#</a>
</h2>
<p>We introduce the metadata message which is used to convey information about a message and how it SHOULD be handled.</p>
</span></span></span></code></pre></div><p>Nodes MAY transmit a <code>Metadata</code> message by extending the MVDS <ahref="/spec/2#payloads">message</a> with a <code>metadata</code> field.</p>
<td>list of parent <ahref="/spec/2#payloads"><code>message identifier</code>s</a> for the specific message.</td>
</tr>
<tr>
<td><code>ephemeral</code></td>
<td>indicates whether a message is ephemeral or not.</td>
</tr>
</tbody>
</table>
<h2id="usage">
Usage
<aclass="anchor"href="#usage">#</a>
</h2>
<h3id="parents">
<code>parents</code>
<aclass="anchor"href="#parents">#</a>
</h3>
<p>This field contains a list of parent <ahref="/spec/2#payloads"><code>message identifier</code>s</a> for the specific message. It MUST NOT contain any messages as parent whose <code>ack</code> flag was set to <code>false</code>. This establishes a directed acyclic graph (DAG)<supid="fnref:1"><ahref="#fn:1"class="footnote-ref"role="doc-noteref">1</a></sup> of persistent messages.</p>
<p>Nodes MAY buffer messages until dependencies are satisfied for causal consistency<supid="fnref:2"><ahref="#fn:2"class="footnote-ref"role="doc-noteref">2</a></sup>, they MAY also pass the messages straight away for eventual consistency<supid="fnref:3"><ahref="#fn:3"class="footnote-ref"role="doc-noteref">3</a></sup>.</p>
<p>A parent is any message before a new message that a node is aware of that has no children.</p>
<p>The number of parents for a given message is bound by [0, N], where N is the number of nodes participating in the conversation, therefore the space requirements for the <code>parents</code> field is O(N).</p>
<p>If a message has no parents it is considered a root. There can be multiple roots, which might be disconnected, giving rise to multiple DAGs.</p>
<h3id="ephemeral">
<code>ephemeral</code>
<aclass="anchor"href="#ephemeral">#</a>
</h3>
<p>When the <code>ephemeral</code> flag is set to <code>false</code>, a node MUST send an acknowledgment when they have received and processed a message. If it is set to <code>true</code>, it SHOULD NOT send any acknowledgment. The flag is <code>false</code> by default.</p>
<p>Nodes MAY decide to not persist ephemeral messages, however they MUST NOT be shared as part of the message history.</p>
<p>Nodes SHOULD send ephemeral messages in batch mode. As their delivery is not needed to be guaranteed.</p>
<h2id="copyright">
Copyright
<aclass="anchor"href="#copyright">#</a>
</h2>
<p>Copyright and related rights waived via <ahref="https://creativecommons.org/publicdomain/zero/1.0/">CC0</a>.</p>