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

DString implementation needs rework #27

Open
marcus-pousette opened this issue Nov 24, 2022 · 3 comments
Open

DString implementation needs rework #27

marcus-pousette opened this issue Nov 24, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@marcus-pousette
Copy link
Member

The current implementation of DString is like a canvas. Anyone can write anywhere on the canvas by inserting string at an offset with length. The current implementation does not support efficient deletion by pruning the DAG, the operation data type itself does not out of the box support this.

Consider instead the xi-editor that uses the rope data structure

Regarding xi-editor, here is some interesting discussion/critique on the implementation that xi-editor brings forward.

@marcus-pousette marcus-pousette added the enhancement New feature or request label Nov 24, 2022
@Erudition
Copy link
Contributor

Erudition commented Jul 27, 2023

Consider also the approach taken by Diamond Types:
https://github.com/josephg/diamond-types

As seen in https://josephg.com/blog/crdts-go-brrr/

and the deletion strategy used by Replicated Object Notation:
http://replicated.cc/rdts/rga/

@marcus-pousette
Copy link
Member Author

Yea! I have going back and forth through all these for some time.. In order to get it to work with Diamond types one need to find a nice integration with the log implementation that already exist in this repo (which has many very nice memory optimizations for recovering from disc, especially in the browser).

@marcus-pousette
Copy link
Member Author

and the deletion strategy used by Replicated Object Notation:
http://replicated.cc/rdts/rga/

Have not seen this, interesting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants