Google Professional Cloud Developer Question 392
Select 2Google Cloud PlatformYou are developing a serverless web application on Google Cloud that needs to store user-uploaded images and metadata. The images should be stored securely and made accessible via signed URLs, while the metadata such as image descriptions and tags should be searchable. Which combination of Google Cloud services should you use to meet these requirements?
- A
Cloud Storage for image storage and Firestore for metadata storage
- B
Cloud SQL for storing both images and metadata
- C
Cloud Storage for image storage and BigQuery for metadata storage
- D
Cloud Spanner for storing both images and metadata
- E
Cloud Storage for image storage and a custom solution using Compute Engine for metadata storage
Show answer and explanation
Correct answers: A, C
Explanation
Cloud Storage is a natural choice for storing binary objects like user-uploaded images because it is scalable and provides features like signed URLs for secure access. For metadata storage, Firestore offers a managed, NoSQL solution that allows real-time querying, making it ideal for searching descriptions and tags. BigQuery can also be used for analyzing large-scale metadata but is less suitable for real-time use cases.
- A. Correct.
Correct: Cloud Storage is ideal for storing binary objects such as images, and Firestore is a managed NoSQL database that is well-suited for storing and querying metadata like descriptions and tags.
- B. Incorrect.
Incorrect: Cloud SQL is a relational database service and is not designed to store large binary objects like images. It would also be less efficient for querying metadata compared to Firestore.
- C. Correct.
Correct: Cloud Storage is suitable for storing images, and BigQuery can be used for analytical queries on structured metadata. However, BigQuery is better suited for large-scale analytics rather than real-time metadata searching compared to Firestore.
- D. Incorrect.
Incorrect: Cloud Spanner is a globally distributed relational database and is not optimized for storing large binary objects like images. It also might be an over-engineered solution for simple metadata storage.
- E. Incorrect.
Incorrect: While Cloud Storage is a good choice for image storage, building a custom metadata solution on Compute Engine increases complexity and maintenance overhead compared to managed services like Firestore or BigQuery.