The application process architecture

Our application has many pieces--a lot of them new, and some borrowed from the previous implementations:

  • Firebase admin SDK: This module is provided by Firebase, and acts as the interface between our server application and the Firebase cloud APIs. We are going to be modifying our data using this SDK, which will also make use of the key we downloaded in the previous section to authorize the API call.
  • Core module: This is the core module of the application process, which will be responsible for initializing the Firebase SDK and updating the Realtime Database every time new readings come in. This will also be the starting point of the application.
  • Sensor module: This module is borrowed from the previous implementations, and does not need to be changed. It will function the same way it was functioning before, with the purpose of obtaining readings from the sensor on our Pi's GPIO pins:

The overall flow will look something like this:

It is important to note that this process is self-contained, and is closed to outside communication.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.16.51.3