Skip to content

Re-playable Event Graph (REG) storage format specification #8

Description

@streamich

This is a proposal to formalize and document serialization formats for Re-playable Event Graphs (REGs).

What are REGs? I am not an expert on REGs, but essentially it is a way to represents a sequence of all editing events in a format like this:

export interface ConcurrentTrace {
  kind: 'concurrent';
  endContent: 'string';
  numAgents: number;
  txns: ConcurrentTraceTransaction[];
}

export interface ConcurrentTraceTransaction {
  parents: number[];
  numChildren: number;
  agent: number;
  patches: [position: number, remove: number, insert: string][];
}

The key here is that:

  1. The full editing history is stored.
  2. The operations are stored in the local form [position: number, remove: number, insert: string]. (There is no CRDT metadata.)
  3. Full causal graph is stored, i.e. each transaction has a list of parents: [], which is a set of operations that this transaction depends on (knows about at the time of creation).

What I would like to get from this issue:

  1. Firstly, I would like to see if there is any interest for having a shared formal specification for the REG serialization format.
  2. Requirements: what would be a list of requirements for a REG serialization format?
  3. Implementation details: any tricks/gotchas/suggestions of the low-level implementation details?

cc @josephg @ept @dmonad @mweidner037 @gritzko @archagon @zxch3n

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions