#atom

Subtitle:

Directed acyclic graphs for representing conversation history in Matrix


Core Idea:

Event graphs in Matrix are directed acyclic graphs (DAGs) that store and order all events exchanged within a room, providing a partially ordered chronological history that can handle concurrent events from multiple servers.


Key Principles:

  1. Directed Acyclic Structure:
    • Events point to their parent events, creating a graph with no cycles that flows in one direction (forward in time).
  2. Event Depth:
    • Each event has a depth value strictly greater than its parents to maintain chronological ordering.
  3. Partial Ordering:
    • Events may have multiple parent events when homeservers send messages concurrently.

Why It Matters:


How to Implement:

  1. Event Creation:
    • When sending an event, identify the current "frontier" events that have no successors.
  2. Parent References:
    • Include references to these parent events in the new event's metadata.
  3. Depth Assignment:
    • Assign a depth value that's greater than the maximum depth of all parent events.

Example:


Connections:


References:

  1. Primary Source:
    • Matrix Specification: Room Version section
  2. Additional Resources:
    • Matrix Architecture documentation
    • Matrix State Resolution Algorithm documentation

Tags:

#matrix #eventgraphs #dag #distributedcomputing #messaging #consistency


Connections:


Sources: