# Welcome to Practical Service Workers

Practical Service Workers is a collection of live documents on thoughts, lessons learnt and opinions formed on tackling challenges around building and maintaining Service Workers in a scalable, resilient and operationally sustainable way. Especially in the context of deploying and maintaining Service Workers on real-world, large-scale website environments that need be highly available, possess a high bar of customer experience, and can do so without getting in the way of productivity when many engineers or engineering teams work together on maintaining the website.

That sounds like a lot of generic "large-scale" software engineering jargon thrown around. What does this really mean? Is this...

# Yet Another Blog on Service Workers?

There is already a vast amount of amazing and well-written articles, tutorials and other resources on the subject of Service Workers and getting started with them. A bunch of them are cited on this blog as well. The aim of Practical Service Workers instead is to delve a bit deeper into the subject matter and discuss on some of the relatively subtler aspects of developing and maintaining Service Workers on websites successfully, often drawing from real-world experiences and lessons learnt.

We hope to go beyond what is tackled by the typically more abundant "getting started" or "how to enable feature X on your website" guides where the intent by design is about getting us started on the technology or quickly show by example how to build something that works. They do not necessarily push us into thinking deeper on "bigger picture" or the "grander scheme of things" so to speak, which include but are not necessarily limited to implications on sustainability, availability, security and scale of the website (and consequentially the business) in question. Of course, there probably are some good examples of exceptions to that, which is wonderful, and Practical Service Workers aims to add to them.

We focus on Service Workers not only as the technology in itself in isolation, but some of the human or peripheral factors that play a role in the journey as well. We pay attention to aspects where there is more than meets the eye; understand the good, bad and ugly; and reason about what works, what doesn't and importantly why. We learn from mistakes that were made and perhaps again could be (because let's face it, Murphy's Law (opens new window)) and discuss what we could do to avoid them as best as we can. We look into best practices (and some even not so best ones) both within and outside our conventional wisdom and challenge assumptions when we think it is right to do so. We attempt to do all this with a pragmatic, real-world focus. Think about horror-stories where you're the on-call engineer who gets paged at 2 a.m. because somehow your website's Service Worker broke and took your entire website down with it. Is that even possible? Hint: It's easier than you think when Service Workers are not done right.

With that in mind, some articles on this blog take the approach of discussing aspects from a high-level "10,000 ft." architectural view of things while others get much deeper into some specific nitty-gritty of a certain use-case, feature, capability or API and discuss things at a much lower-level on challenges that may come our way and how we could solve them. Possibly even to the risk of being outright opinionated or nitpicky at times.

While all of this is not really about RTFM (opens new window), one could argue that it is partly about learning how to better RTFM and in the process put deeper thought on how to interpret the FM.

# Who is this for?

Practical Service Workers is for anyone interested in thinking about building and maintaining Service Workers in a scalable and sustainable way.

However, it is not intended to be a beginner-level tutorial on Service Workers. You are recommended to have some basic to intermediate knowledge of what Service Workers are and how to use them before going through this blog.

If you are not familiar with Service Workers at all, there are some great articles and tutorials which we recommend to go through first: