Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build the document journal (history chain) #123

Open
TrueDoctor opened this issue May 10, 2021 · 2 comments
Open

Build the document journal (history chain) #123

TrueDoctor opened this issue May 10, 2021 · 2 comments
Labels
Architecture Involves architecture or engineering work or discussion Feature New feature or request Rust Involves Rust programming for the backend

Comments

@TrueDoctor
Copy link
Member

TrueDoctor commented May 10, 2021

Generate inverse operation for a given operation and store both in the document.
This will be used to implement the history feature

Store a chain of history events and add the ability to navigate in it.

Should be done after: #134

Complexity: 5
Involves: Document (Rust)

@TrueDoctor
Copy link
Member Author

We could consider adding unique hashes to each operation/unoperation combination to be able to uniquely some history event
special attention has to be payed to keep paths/indices consistent

@Keavon
Copy link
Member

Keavon commented May 11, 2021

Generate inverse operation for a given operation and store both in the document.

So every operation must be defined in two ways: its forward and inverse direction? An inverse operation would be like a regular operation but its action makes changes to the graph which undoes its previous (forward) operation?

This will be used to implement the history feature

I assume you mean the history chain (perhaps we should call it the Ledger). Why do we need the concept of an "inverse operation" when we could instead just roll back to the previous state of the world one ledger entry ago?

We could consider adding unique hashes to each operation/unoperation combination to be able to uniquely some history event

Is an index in the ledger (starting at 0 from the first event) not sufficient? I don't think there would ever be references to future points in history, so if you undo enough to invalidate a reference to another point in history (using an index number), that reference shouldn't exist anymore and it wouldn't be a problem. The only problem I see with using indices is that we might someday implement a history collapse feature which would consolidate the journal history by removing redundant events (like those which were later deleted but didn't have an effect on later points in history).

@TrueDoctor TrueDoctor added Architecture Involves architecture or engineering work or discussion and removed Available Architecture Involves architecture or engineering work or discussion labels May 11, 2021
@Keavon Keavon added this to the Sprint 5 (upcoming) milestone May 23, 2021
@TrueDoctor TrueDoctor changed the title Generate undo operations Building the history journal (history chain) May 23, 2021
@Keavon Keavon changed the title Building the history journal (history chain) Building the document journal (history chain) May 23, 2021
@TrueDoctor TrueDoctor added Feature New feature or request Architecture Involves architecture or engineering work or discussion labels May 23, 2021
@Keavon Keavon added the Blocked label May 26, 2021
@Keavon Keavon added the Rust Involves Rust programming for the backend label Jun 10, 2021
@Keavon Keavon changed the title Building the document journal (history chain) Build the document journal (history chain) Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Involves architecture or engineering work or discussion Feature New feature or request Rust Involves Rust programming for the backend
Projects
Status: Blocked
Development

No branches or pull requests

2 participants