For the sake of brevity in our proof of concept, the email and SMS services will utilize a similar code base to demonstrate how background services can be designed within Google Cloud. While these components are meant to provide isolated services, in our example, we will use common code to demonstrate their functionality. In a real-world situation, the communication component presents an opportunity for a common code base to be replicated/extended for different solutions (for example, email, bots, SMSes, pagers, and more).
The Cloud Pub/Sub topic we previously created pushes the data to be consumed by the communication components. In this instance, the lab report data object represents a JSON file that is used to communicate lab results:
It is worth pointing out that we have not actually referenced the data passed in the lab report, nor do we know the...