title: Scalable FCM notification model whilst app enters background
body: <p>We have vehicle positions for over 10,000 vehicles currently coming into a Firebase Realtime database. Each vehicle is updated every 5 seconds on average.</p>
  
  <p>I have been tasked with setting up a notification system with an app that allows these vehicles to be tracked.</p>
  
  <p>If a user loads the app and begins tracking a vehicle by tapping on it, and then the app goes into the background, they should receive notifications every time the vehicle moves.</p>
  
  <p><strong>My Proposal</strong></p>
  
  <p>When a user begins tracking a vehicle, have them subscribe to a FCM topic with the topic name being the vehicle registration.</p>
  
  <p>When our vehicle parsing script processes an update for a vehicle, if it has moved from its last location, send a notification to the topic.</p>
  
  <p>When the user stops tracking the vehicle, unsubscribe from the topic.</p>
  
  <p>Is this the best way of managing notifications for a Firebase setup?</p>