Intent to Remove: Budget API

200 views
Skip to first unread message

Peter Beverloo

unread,
Aug 15, 2018, 10:07:25 AM8/15/18
to blink-dev
Primary eng (and PM) emails

Summary
The Budget API describes three functions that were intended to help developers reason about browser-specific behaviour surrounding the Push API, particularly the need to display a notification. We shipped reserve() in M60, and experimented with getCost() and getBudget() between M60–62.


Motivation
The experiment for getCost() and getBudget() ended without feedback, nor any developer feedback for bringing them back. Given that they're not exposed anymore, we can remove them immediately.

The reserve() method indeed is exposed to the Web, but has seen 20 calls in the past month(!). There is no documentation on it other than our own, so I'm hopeful that we can jump straight to removal.

Mozilla's Martin Thomson made an alternative proposal that we could pursue, but given that demand seems infinitesimal we won't prioritize this anytime soon.


Interoperability and Compatibility Risk
The Budget API is not supported by any other vendors. Since we're seeing less than a call a day, real usage out there will be zero.

Edge: Not supported
Firefox: Not supported
Safari: Not supported

Alternative implementation suggestion for web developers
Always show a notification when the `push` event is triggered in the Service Worker, unless there is an opened and focused window for its origin.

Usage information from UseCounter
As mentioned before, 20 calls in the past month for reserve(), zero for the others. This is tracked by Blink.BudgetAPI.QueryBudget and Blink.BudgetAPI.Reserve.

Entry on the feature dashboard

Philip Jägenstedt

unread,
Aug 15, 2018, 10:19:29 AM8/15/18
to Peter Beverloo, blink-dev
LGTM1 to remove ASAP if you do not feel that this API will get traction and become interoperable. Thank you for taking care of this!

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAE8XsdiOTJ%3D4216bE%2Bwcb%3Dpw9qKvBGPj6Z-qMTuzkd3xidVSmQ%40mail.gmail.com.

Rick Byers

unread,
Aug 15, 2018, 10:21:29 AM8/15/18
to Philip Jägenstedt, Peter Beverloo, blink-dev
LGTM2

Yes, thank's for following up! I see our ability to try speculative ideas out and cleanly remove them when they fail to gain significant traction as key to enabling rapid improvement of the platform without being paralyzed by fear anytime we ship something new...

Alex Russell

unread,
Aug 15, 2018, 11:45:50 AM8/15/18
to Rick Byers, Philip Jägenstedt, Peter Beverloo, blink-dev
LGTM3

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAFUtAY9%3D%2B2ijh3wOzK4983FkMMMPdMgPFxJ%2BXo9FxBOgMoO-nw%40mail.gmail.com.

nekr....@gmail.com

unread,
Aug 16, 2018, 3:51:48 PM8/16/18
to blink-dev
Tbh, this API wasn't advertised at all and hence not used at all.

Joe Medley

unread,
Aug 17, 2018, 12:03:19 PM8/17/18
to Peter Beverloo, blink-dev
"Given that they're not exposed anymore..."

When did this happen?
Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Joe Medley

unread,
Aug 17, 2018, 12:04:17 PM8/17/18
to Peter Beverloo, blink-dev
Never mind. I forgot this was an origin trial.

Joe Medley | Technical Writer, Chrome DevRel | jme...@google.com | 816-678-7195
If an API's not documented it doesn't exist.

Reply all
Reply to author
Forward
0 new messages