In this chapter, we will complete our application's process for sending push notifications. The implementation is a little complicated; it requires many moving pieces to get things working (in my experience, this is true of any push notifications implementation, on mobile or web). The exciting part is that we get to interact with a lot of new areas of knowledge, such as Device tokens and Cloud functions.
Before we begin, let's take a minute to outline the process for setting up push notifications. As of now, we have our messaging service worker up and running. This service worker will sit there and wait to be called with a new notification. Once that happens, it'll handle everything to do with displaying that notification, so we don't have to worry about that (at least).
What is up to us is sending that message to the service worker. Let's say that we have 1,000 users for our application, each with one unique device. Each device...