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

Create F2F agenda - 25 October 2018 #1303

Closed
jatindersmann opened this issue Apr 20, 2018 · 23 comments
Closed

Create F2F agenda - 25 October 2018 #1303

jatindersmann opened this issue Apr 20, 2018 · 23 comments

Comments

@jatindersmann
Copy link

jatindersmann commented Apr 20, 2018

Where

Location: TPAC, Lyon, France.
When: 9AM, October, 25, 2018

Minutes

Attendance

Please let us know if you're planning on attending the F2F meeting.

Agenda

The agenda is subject to change reflecting the progress of the work. Please update it if you notice things outdated or missing.

Implementer update

Share implementation status and issues, performance issues, compatibility issues, etc.

  • Discuss on the concerns Safari folks had around the push API.

Changes & bugs

WPT status

TODO: Update this section.

Interesting feature requests

V1

Should have been done by this point.

@wanderview
Copy link
Member

If possible I'd like to discuss a proposal for a new API to help sites measure the performance of their FetchEvent handlers. It spans both the WebPerf and ServiceWorker API surface. I'm going to be discussing it in WebPerf on Friday, but I'd also like to discuss with the ServiceWorker group on Thursday if possible.

The explainer for this proposal can be found here:

https://github.com/wanderview/fetchevent-worker-timing/blob/master/explainer.md

Thanks!

@jakearchibald
Copy link
Contributor

@jatindersmann huge thank you for getting the agenda together. I realise I've been totally useless this time around.

If we get time, I'd like to discuss:

  • cache.match generating partial responses #913.
  • I'd like to get cross-implementation feelings about performance state & goals, and I promise not to say "static routes" (this is a lie).

And that's it, @jatindersmann already captured everything else 🎉

@jakearchibald
Copy link
Contributor

Also: We didn't have a meet-up this year. Was that a bad thing?

@tomayac
Copy link
Contributor

tomayac commented Oct 23, 2018

One thing that came up in the Devices and Sensors WG and that I would like to discuss is geofencing and how it relates to service workers. Abstracting from that, essentially we are looking for some sort of mechanism ("Alarms API") to wake up a service worker based on an event (which could be a geofence being crossed but should not be limited to that) to do some work. Here is the related issue: w3c/geolocation-sensor#22.

@jakearchibald
Copy link
Contributor

A couple of folks today have mentioned the complexity of testing service workers (@yoavweiss, @rniwa). We could introduce something specific for testing mode (we did something similar for background fetch), but maybe we can do something that would benefit regular users too?

@jakearchibald
Copy link
Contributor

jakearchibald commented Oct 23, 2018

@tomayac

we are looking for some sort of mechanism ("Alarms API") to wake up a service worker based on an event

Isn't this covered by https://w3c.github.io/ServiceWorker/#extensibility?

@tomayac
Copy link
Contributor

tomayac commented Oct 23, 2018

Isn't this covered by https://w3c.github.io/ServiceWorker/#extensibility?

@jakearchibald This is exactly what I would want to discuss. Or if there needs to be another primitive.

@jakearchibald
Copy link
Contributor

@tomayac could you write up an issue or DM me about this? I think I can answer this before Thursday, & it doesn't need to take up the time of the room. If it turns out it does need the room to discuss, at least we'll have the problem written up in a way that gets everyone caught up quickly.

@tomayac
Copy link
Contributor

tomayac commented Oct 23, 2018

A chat with @jakearchibald indeed removed the need to discuss this. It's covered by https://w3c.github.io/ServiceWorker/#extensibility.

@wanderview
Copy link
Member

Maybe we should discuss the cache API ordering issues:

#823 (comment)

@jakearchibald
Copy link
Contributor

Action item: Now's the time to provide something like .ready for a specific registration.

.ready returns the same promise forevermore, which is confusing. Look at deprecating and doing something better.

@ewilligers
Copy link

I'd also like to discuss File Handling.

@jakearchibald
Copy link
Contributor

Action: start using the "decided" tag again.

@jakearchibald
Copy link
Contributor

jakearchibald commented Oct 25, 2018

F2F: Things linkedin would like this see:

  • unregister({ force: true }) - unclaims pages.
  • skipWaiting({ deadline: 0 }) - kill the current active service worker regardless of events after this time.
  • worker.skipWaiting() - please.
  • Adding a timeout on waitUntil proper

Will things break if we fire controllerchange when the controller becomes null.

skipWaiting({ deadline: 0 }) is higher priority than unreg, but only just.

Instead of skipWaiting({ deadline }), how about serviceWorker.terminate() / self.terminate(). Also useful for tests. Or unsafelyDispose()? @wanderview is worried that it's a footgun.

EDIT by falken: Merged in some of the minutes into here.

@jakearchibald
Copy link
Contributor

AI for @jakearchibald create an issue for a rough static routes proposal.

@DeltaEvo
Copy link

Hello,

I was interested in Foreign Fetch, is something has been discussed to cover it's use cases?

Sorry to bother you and thanks for your attention 😄

@wanderview
Copy link
Member

@DeltaEvo We did not end up discussing foreign fetch use cases at this meeting. Sorry.

@asakusuma
Copy link

asakusuma commented Oct 30, 2018

@jakearchibald
FWIW, there's already a terminate() for web workers. Not sure if using the same name would be confusing or better. Probably confusing if we add service worker specific options.

It's unclear to me what exactly unregister({ force: true }) vs terminate() would mean. I believe the simplest MVP to accomplish what we (linkedin) want would be to add options to unregister() that allow immediately stopping any new events being sent to the service worker (even for already opened clients) and then terminating all associated workers (and their associated tasks) with some time guarantee. For instance:

// Immediately stop sending events to the service worker, all
// workers will be completely gone within 10 seconds.
navigator.serviceWorker.unregister({
  unclaim: true,
  terminateDeadline: 10000
});

I believe "unregister" is simpler, because it doesn't have to deal with transitioning events to another worker, which is needed if the active worker is terminated and there's a waiting/installed worker.

@mfalken
Copy link
Member

mfalken commented Oct 31, 2018

@asakusuma It'd be better to discuss on the dedicated issues, #1292 in this case. Can you repost it there?

@asakusuma
Copy link

@mattto good call, though I'm not actually sure which issue to move to. #614 or #1296 might also fit

@mfalken
Copy link
Member

mfalken commented Oct 31, 2018

@asakusuma Ah fair enough, we can continue here. As an implementor I feel I like the contract of unregister(force) or skipWaiting(timeout) over terminate(). Whether to declaim clients or evict the active worker is only indirectly related to whether the active worker is actually running. I can imagine some race conditions where we terminate the active worker but it gets woken up before activation can be triggered.

@asakusuma
Copy link

@mattto not sure I follow the theoretical race condition. How would the terminating worker get woken up if events are no longer being sent from the clients?

If we can table terminate for now, let's move the conversation to #1303

@arpit-gagneja
Copy link

@jakearchibald any updates on #1026?
I wish service worker API can provide us the ability to bypass the service worker for certain cases. I have experienced the performance regression on the page load time when there are too many network requests.

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

10 participants