Question 101 · 288 in bank
You are a program manager for a team of developers who are building an event-driven application to allow users to follow one another's activities in the app. Each time a user adds himself as a follower of another user, a write occurs in the real-time database. The developers will develop a lightweight piece of code that can respond to database writes and generate a notification to let the appropriate users know that they have gained new followers. The code should integrate with other cloud services such as Pub/Sub, Firebase, and Cloud APIs to streamline the orchestration process. The application requires a platform that automatically manages underlying infrastructure and scales to zero when there is no activity. Which primary compute resource should your developers select, given these requirements?
Show answer
Answer: B
Explanation
Given the requirements of automatically managing underlying infrastructure, scaling to zero when there is no activity, and integrating with other cloud services like Pub/Sub, Firebase, and Cloud APIs, the appropriate compute resource for your developers to select would be Cloud Functions in Google Cloud Platform (GCP). Cloud Functions is a serverless compute service that allows you to run event-driven code in a fully managed environment. It is designed to execute short-lived functions in response to various events, such as database writes, file uploads, HTTP requests, and Pub/Sub messages.
Source: Adapted from community discussion — cookieMr