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

Introduce Snapshotting to Optimize CRDT DAG Compaction and Traversal #249

Open
mgazza opened this issue Nov 21, 2024 · 1 comment
Open
Labels
need/triage Needs initial labeling and prioritization

Comments

@mgazza
Copy link

mgazza commented Nov 21, 2024

Hi,
I've been playing with this library and it's great.
However, I'm not happy about the DAG's continuous growth, and I'd like to help.

The current implementation of go-ds-crdt maintains a DAG structure to represent state changes in a datastore. While effective, this approach has limitations:

Performance Overhead: Traversing and replaying large DAGs to compute the current state becomes costly as the DAG grows.
Garbage Collection: Stale or redundant nodes in the DAG are retained unnecessarily, increasing storage requirements.
Recovery Times: Rebuilding state after a crash or restart is slow, as it requires replaying the full DAG history.
Snapshotting introduces a mechanism to address these issues. By creating a periodic snapshot of the DAG, we can:

Compact the state into a "base snapshot."
Limit traversal to only the most recent nodes.
Facilitate faster recovery by replaying transactions only since the last snapshot.

@mgazza mgazza added the need/triage Needs initial labeling and prioritization label Nov 21, 2024
Copy link

welcome bot commented Nov 21, 2024

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

1 participant