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

How UA should manage per-scope storage for ServiceWorkers? #9

Closed
kinu opened this issue Jan 20, 2015 · 5 comments
Closed

How UA should manage per-scope storage for ServiceWorkers? #9

kinu opened this issue Jan 20, 2015 · 5 comments

Comments

@kinu
Copy link
Owner

kinu commented Jan 20, 2015

For onbeforeevict events UA needs to tell how much space each ServiceWorker should free up, but ServiceWorkers are registered per scope while UA's logical application unit for storage management may be different (e.g. Chrome's logical unit for storage management is per-origin).

/cc @inexorabletash

@wanderview
Copy link

Since the storage is per-origin, it seems to me the events should be dispatched to all ServiceWorkers registered for the same origin.

@kinu
Copy link
Owner Author

kinu commented Feb 2, 2015

Yeah I agree that that'd be the most reasonable approach. If we want to give some hints about how much more space is requested (i.e. spaceRequested) there's another question about whether all apps in the same origin should get the same number... if those scopes are a group of cooperative apps that'd be fine, but otherwise it could be a little awkward.

@wanderview
Copy link

The problem is the scope thing makes it seem like you can have "separate apps", but its kind of not true. Each of these "apps" will share permissions and storage with each other. They are certainly not isolated from each other as people would expect with apps.

Of course this is more of a problem with the SW spec than the quota API.

@kinu
Copy link
Owner Author

kinu commented Feb 4, 2015

That's true, scopes are just a unit of background operation but not a unit of app. I suppose this means that all ServiceWorkers registered for the same origin should get same events (and if the event includes some info about usage/quota the info should be also shared too). I'm going to clarify that in the spec.

@kinu
Copy link
Owner Author

kinu commented Mar 16, 2015

I think storage should just continue to be managed per-origin, and we should just remove any notion that gives the impression that the storage is managed per-scope etc. (Related: #14)

@kinu kinu closed this as completed Mar 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants