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

Question: How does gun persistence work? #16

Open
chmac opened this issue Apr 6, 2022 · 1 comment
Open

Question: How does gun persistence work? #16

chmac opened this issue Apr 6, 2022 · 1 comment
Labels
question Further information is requested

Comments

@chmac
Copy link

chmac commented Apr 6, 2022

Partly from #4, I'm realising that I have old groups which I can no longer access. The inspector just shows "loading" for the gun status, and the groups won't load on any of my browsers (including several which had loaded the groups previously).

I'm a bit unclear on how gun persistence actually works. In theory, should every record ever stored be kept forever? Or is it more like ipfs where unless a node persists the data then it will slowly age out of caches and disappear?

I'm thinking it would be neat to figure out how to communicate the persistence part clearly and then add it to the app somewhere so folks can understand what's going on with the data.

@cryptoboid
Copy link
Owner

That's a great question, which I also want to know the answer 😅 The docs are kinda chaotic (https://gun.eco/docs/DAM). I've switched from localStorage to indexedDB, so it should be a bit more resilient (eviction policies depend on each browser).

Also, I'm not sure how Gun syncs when you have more than 1 relay like splitio: does it sync with everyone? round-robin? if it fails, how many times does it retry? I've tried looking at the code but, well: https://github.com/amark/gun/blob/master/src/put.js not really straightforward 😵‍💫

I'm thinking it would be neat to figure out how to communicate the persistence part clearly and then add it to the app somewhere so folks can understand what's going on with the data.

I've added a "sync issues" dialog on the group page as a first step. I wouldn't enter in too much detail though, so non-tech people can understand it easily (open to suggestions!)

@cryptoboid cryptoboid added the question Further information is requested label Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants