Web Locks API - HTTP203 Advent
Skills:
API Design70%
Key Takeaways
Explains the Web Locks API for synchronizing tasks across tabs and workers
Full Transcript
[Music] it's December Christmas time I thought we talked about some of the features that are coming in 2018 and I'll try and describe it to you in two minutes but you can ask the questions okay I want to talk about the web blocks API go it's that like warlocks know so it's like lot like mutex locks and stuff yes what correct what is it what how right okay so the idea is in a page or in worker you would say I want a lock named the and you can give it a name any name you want it's just a string okay right and then it will wait until nothing else has a lock of that name open mm-hm and then once it's open you get a callback you usually use an async function here yeah it's expected to return a promise and you like you know return the promise to resolve the promise they return from the async function yeah once you have done the work that you are wanting to look for okay and so that lock is shared across the origin I would presume yes the whole origin yeah okay so I mean we we have locks on or above us right we have oh it's the atomic things right wait and lock yeah right so you can build a lock yes but you cannot wait on the main thread with an atomic true you can only wait in a worker whereas with this this is an asynchronous thing whoo so it can work on a page as well and it also lets you do shared locks right so okay right so it in in a shared mode you can how you can say like I want a lock on this but I'm prepared to share with other shared things okay but then when a non shared thing comes along for the same name it has to wait for all of the shared things to finish for the night so an exclusive I got read/write mutex way lots of people can read but only one person can write like read and write stuff and it means like you can kind of do some of this similar stuff with like local storage or with yeah but it you run into problems have a tab crashes or if it closes before it can are the clock whereas this will all happen because it's okay yeah you convinced is that signed off can we have it now I I'll think about it okay fair enough we have three seconds to go [Music] architecture that's buildings it's not as if the web may you got confused well the thing is that lots of other fields like enterprise engineering and gaming have like these architectural patterns when they build like really complex things no fields don't have architecture you're thinking your cities
Original Description
Tis the HTTP203 Xmas season! Jake & Surma have 2 minutes to describe a web thing they're excited about for 2018. In this episode, Jake talks about the Web Locks API for synchronising tasks across tabs & workers.
More info: https://github.com/inexorabletash/web-locks
NEW EPISODE OF HTTP203 EVERY DAY.
Check back in with us for new HTTP203 Advent episodes everyday on the Google Chrome Developers channel.
Subscribe to Chrome Developers here: http://goo.gl/LLLNvf
Watch more HTTP203: https://goo.gl/bTQMrY
Listen to the HTTP203 podcast for a full conversation & much more:
https://goo.gl/LR7gNg
Itunes: https://goo.gl/cf2yRq
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Chrome for Developers · Chrome for Developers · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Polymer Performance Patterns (The Polymer Summit 2015)
Chrome for Developers
Polymer Power Tools (The Polymer Summit 2015)
Chrome for Developers
Chrome Dev Summit 2014 – Chrome Case Studies
Chrome for Developers
Web Directions Code 2015 round up
Chrome for Developers
Maintainable Code - HTTP203
Chrome for Developers
iron-ajax… wat?! -- Polycasts #26
Chrome for Developers
The Guardian - Supercharged
Chrome for Developers
ES2015 (next version of JavaScript), Totally Tooling Tips (S2 Ep1)
Chrome for Developers
#AskPolymer: Rob answers all the questions ever -- Polycasts #27
Chrome for Developers
The Future of JavaScript - HTTP203
Chrome for Developers
Data Binding 101 -- Polycasts #28
Chrome for Developers
The Guardian part 2 - Supercharged
Chrome for Developers
The Future of Web Audio: with Chris Wilson and Chris Lowis
Chrome for Developers
Chrome 46: New motion-path animations, client hints and service worker improvements
Chrome for Developers
Sublime Snippets, Totally Tooling Tips (S2 Ep2)
Chrome for Developers
#AskPolymer: How do you make the show? -- Polycasts #29
Chrome for Developers
Critical Path CSS, Totally Tooling Tips (S2 Mini Tip #1)
Chrome for Developers
Binding to Objects -- Polycasts #30
Chrome for Developers
Player FM - Supercharged
Chrome for Developers
Where’s the Designer? #AskPolymer -- Polycasts #31
Chrome for Developers
Jake Beats Wikipedia - HTTP203
Chrome for Developers
Supercharged Observers! -- Polycasts #32
Chrome for Developers
Jai's Web blog - Supercharged
Chrome for Developers
Windows Command-line Tooling, Totally Tooling Tips (S2, Ep4)
Chrome for Developers
What about internationalization? #AskPolymer -- Polycasts #33
Chrome for Developers
Developing for Billions (Chrome Dev Summit 2015)
Chrome for Developers
Google+ Performance Improvement Comparison
Chrome for Developers
Deploying HTTPS: The Green Lock and Beyond (Chrome Dev Summit 2015)
Chrome for Developers
Progressive Web Apps (Chrome Dev Summit 2015)
Chrome for Developers
Instant Loading with Service Workers (Chrome Dev Summit 2015)
Chrome for Developers
Increase Engagement with Web Push Notifications (Chrome Dev Summit 2015)
Chrome for Developers
Engaging with the Real World: Web Bluetooth and Physical Web (Chrome Dev Summit 2015)
Chrome for Developers
Asking for Permission: respectful, opinionated UI (Chrome Dev Summit 2015)
Chrome for Developers
Polymer - State of the Union (Chrome Dev Summit 2015)
Chrome for Developers
Building Progressive Web Apps with Polymer (Chrome Dev Summit 2015)
Chrome for Developers
Introduction to RAIL (Chrome Dev Summit 2015)
Chrome for Developers
DevTools in 2015: Authoring to the max (Chrome Dev Summit 2015)
Chrome for Developers
RAIL in the real world (Chrome Dev Summit 2015)
Chrome for Developers
#ChromeDevSummit talks are up - W00T! -- Polycast #34
Chrome for Developers
V8 Performance from the Driver's Seat (Chrome Dev Summit 2015)
Chrome for Developers
Quantify and improve real-world RAIL (Chrome Dev Summit 2015)
Chrome for Developers
Owning your performance: RAIL (Chrome Dev Summit 2015)
Chrome for Developers
HTTP/2 101 (Chrome Dev Summit 2015)
Chrome for Developers
Leadership Panel (Chrome Dev Summit 2015)
Chrome for Developers
Build Processes, Totally Tooling Tips (S2, Ep 5)
Chrome for Developers
Accessibility (Chrome Dev Summit 2015)
Chrome for Developers
Binding to Arrays -- Polycasts #35
Chrome for Developers
HTTP2 - HTTP203
Chrome for Developers
Chrome 47: Splash Screens, requestIdleCallback and better desktop notifications (New in Chrome)
Chrome for Developers
Call For Submissions - Supercharged
Chrome for Developers
Cross Device Testing, Totally Tooling Tips (S2 Ep6)
Chrome for Developers
Testing AJAX with Web Component Tester -- Polycasts #37
Chrome for Developers
Slack: Extended Xmas Special - Supercharged
Chrome for Developers
Browser testing with Travis & Sauce Labs -- Polycasts #38
Chrome for Developers
Optimize for production with Vulcanize -- Polycasts #39
Chrome for Developers
Highlights from Chrome Dev Summit 2015
Chrome for Developers
Chrome 48: Custom buttons in notifications, DevTools Security panel, and Presentation mode
Chrome for Developers
Crisper: Protecting your Polymer app with CSP -- Polycasts #40
Chrome for Developers
How do I use Sass with Polymer? #AskPolymer -- Polycasts #41
Chrome for Developers
Colors – DevTools Tonight #0 (Pilot)
Chrome for Developers
More on: API Design
View skill →Related Reads
📰
📰
📰
📰
Hyundai and Kia built a UV system that kills bacteria inside a car while you are sitting in it
The Next Web AI
The latest AI news we announced in June 2026
Google AI Blog
AI-Powered Theodore Roosevelt Is Ready To Answer Your Questions
Forbes Innovation
Krafton agrees to pay Subnautica 2 bonuses after CEO who used ChatGPT to dodge them steps down
The Next Web AI
🎓
Tutor Explanation
DeepCamp AI