0 votes
in Cloud Computing by

A client of yours has asked you for advice because he is looking for a quick and convenient solution for adding functionalities to an Application.
Whenever a new customer is created in the Firebase database, he wants to perform a series of welcome activities and a series of follow-up actions, regardless of the specific function that recorded the new customer record.
Which of the following solutions will you suggest (choose 1)?

A. Compute Engine and Managed Instances
B. App Engine Flexible Environment
C. App Engine Standard Environment
D. Cloud Functions
E. Cloud Run (fully managed)

1 Answer

0 votes
by

Correct Answer: D
Any of these environments can host the additional functionalities required.
The best solution is with Cloud Function, because you can handle events in the Firebase Realtime Database with no need to update client code.
Cloud Functions may have the full administrative privileges to ensures that each change to the database is processed individually.
Furthermore Cloud Functions are a decoupled economic solution, because of the pay-as-you go model.
Functions handle database events in 2 ways; listening for specifically for only creation, update, or deletion events, or you can listen for any change of any kind to a path.
These Cloud Functions event handlers are supported

  • onWrite(), which triggers when data is created, updated, or deleted in the Realtime Database.
  • onCreate(), which triggers when new data is created in the Realtime Database.
  • onUpdate(), which triggers when data is updated in the Realtime Database.
  • onDelete(), which triggers when data is deleted from the Realtime Database.

Related questions

0 votes
asked Dec 1, 2021 in Cloud Computing by DavidAnderson
0 votes
asked Dec 1, 2021 in Cloud Computing by DavidAnderson
...