Live Coding: Dealing with flaky web APIs (aka using Service Workers to retry AJAX calls)
Jess dives into handling request failures when working with a flaky API in a React environment during his first Twitch stream.

Watch on YouTube
Jess dives into handling request failures when working with a flaky API in a React environment during his first Twitch stream.
Transcript
00:05 - 00:42
Jess starts off by introducing his first Twitch stream, explaining that Jess will be tackling issues surrounding flaky API requests.
01:24 - 01:84
Jess clarifies his background in web development, aiming to share the learning process in front-end technologies like React.
02:06 - 02:50
Jess outlines the format of the streams, including live problem solving and sharing pre-canned presentations.
03:10 - 03:49
Jess expresses gratitude for his first follower while setting a goal for more followers.
03:25 - 05:50
Jess discusses the nature of the flaky API and how Jess plans to implement a retry mechanism to handle failed requests.
05:50 - 07:00
Jess explains the structure of his React application and the REST API wrapper Jess's using for making fetch calls.
07:40 - 09:00
Jess showcases how the application currently handles errors gracefully with retry buttons.
09:25 - 10:18
Jess introduces a middleware piece called Chaos Monkey which causes random request failures for testing purposes.
11:00 - 12:45
Jess continues explaining the retry logic needed for the flaky API scenario.
13:35 - 14:15
Jess presents his approach to using the fetch API to retry requests seamlessly.
15:00 - 16:05
Coding continues with his implementation details regarding handling retries using both fetch and jQuery AJAX.
16:25 - 18:23
Jess runs into a few bugs and tests different solutions to achieve proper retry behavior.
18:42 - 19:10
Jess dives deeper into the functionality of service workers and their role in handling requests.
20:15 - 21:39
More coding ensues, focusing on setting up global error handlers for AJAX requests.
22:50 - 23:25
Jess discusses user experience impacts when implementing retries, especially for users offline.
24:10 - 25:05
Jess reviews the importance of informing users about their connection status and potential API request failures.
26:10 - 28:30
Wrapping up, Jess reflects on the key takeaways from his first streaming experience, thanking participants and discussing future streams.
29:30 - 30:33
Jess confirms his goal of developing a predictable streaming schedule to engage with viewers in the future.