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

Basic offline access. #24

Open
ultimape opened this issue May 7, 2021 · 1 comment
Open

Basic offline access. #24

ultimape opened this issue May 7, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@ultimape
Copy link
Collaborator

ultimape commented May 7, 2021

It would be nice to be able to load the website while offline and use the local data that my browser already knows about. Hypothetically once peers are available on the local network, we ought to be able to disconnect from the internet and still create and pull updates without the /gun peer being available.

It looks like this might be partly done via service workers, and since gun already uses the indexedDB for offline stuff we're like 80% of the way there.

@nsreed
Copy link
Owner

nsreed commented May 7, 2021

This will involve service workers for sure. Fortunately, there is well-established support for service workers in angular apps: https://angular.io/guide/service-worker-getting-started which I can hopefully also inject a full gun peer into. Service worker would be the only thing touching indexeddb (possibly fixing the multi-tab performance issues), each tab has an in-memory gun configuration, using the service worker's gun as a peer, which then talks to the relay/webrtc peers when it's available. There are projects with gun implemented in service workers using a similar pattern, though I forget which. Iris and/or Meething, I believe. I'll need to reach out to their discord folks to see if I can get some guidance.

@nsreed nsreed added the enhancement New feature or request label May 7, 2021
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