Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

multicore ideas

Jim Pick edited this page Jan 16, 2018 · 1 revision

Core terms:

Try not to re-use terms that are used in Automerge in Metamerge, as it just gets confusing.

Automerge terms:

  • Document - a set of changes by a number of actors that has been merged together
  • Actor - an owner of a sequence of changes
  • Change - a mutation owned by an actor, with dependencies on prior changes
  • Sequence - a stream of changes by an actor

Metamerge terms:

  • View - defined by a set of cursors, which identify changes to apply to generate a document
  • Discoverable View - an advertised view that people can join to either watch, collaborate on, or fork
  • Non-discoverable View - a non-advertised view, useful for storing snapshots, viewing history, triaging changes, etc. in the user interface
  • Collaborator - the person controlling an actor in the set of cursors used to define a view
  • Fork - a new discoverable view based on a previous discoverable view with a set of forked cursors
  • Cursor - identifies a position in sequence of changes by an actor. A cursor can be set to "follow" the latest changes as they arrive, or be set to a specific sequence number (for use in snapshots and forks).
  • "Ghost" cursor - when a fork happens, we may want to hold a reference (cursor) to a previous change by an actor in the old discoverable view before that collaborator has created any new changes in the forked discoverable view. When the collaborator creates a change (eg. creates a new actor) in the new discoverable view, the "ghost" cursor can be replaced with a new cursor that points to the new change that has a dependency on the old change

Proposed operations:

  • Create a discoverable view
  • Create an actor
  • Create a cursor
  • Add a cursor to a discoverable view
  • Add a change to an actor's sequence
  • Tell a cursor to follow the latest change in an actor's sequence
  • Pin a cursor at a specific change in an actor's sequence
  • Create a non-discoverable view
  • Get the document for a view
  • Be notified when the document for a view changes
  • Fork a view to create a new view (with ghost cursors)
  • Collaborator writes a new change to a forked view with a ghost cursor and a new actor and cursor is created

Questions:

  • Should non-owner collaborators be allowed to modify the cursors on a discoverable view?
Clone this wiki locally