Skip to content

Add support for server-side commit mutation #4

@ProTip

Description

@ProTip

What? Why?

When the server processes a commit it could be desirable to modify or completely replace it. Some reasons may be:

  • Commit rejected
  • Commit invalid but fixable by the server
  • Some other mutation needs to occur in reaction to the commit to satisfy business rules

How

Currently when the committer receives confirmation for a pending commit it just drops the inflight and bumps the version since:

  1. The commit has just been confirmed as correctly ordered
  2. The client has already applied

To support server side modification the client may need to undo and replace the inflight commit. This could be tackled one of two ways:

  • The protocol be updated to indicate the server modified the commit, and the client could undo and replace it
  • The client could always undo the inflight commit and replace it with the confirmed commit

There are benefits to adding extra metadata to the commit confirmation regardless. For example the client may need to take action or present information to the user when a commit is mutated by the server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions