Chapter 6. Project 2: Skill Service with Cloud Run
In Chapter 5, you used a Cloud Function to collect Stack Overflow tags from the BigQuery public dataset and store the results as an object in Cloud Storage. In this chapter, you will use these tags to develop an interactive service that offers skill suggestions to users as they type.
Note
The code for this chapter is in the skill-service
folder of the
GitHub repository.
Requirements
Let’s explore what’s needed for this project.
User Story
The user story for this piece of functionality is shown in Figure 6-1.
Elaborated Requirements
This project also has the following specific requirements:
-
Suggestions should be presented when a user types three or more characters.
-
95% of suggestion requests should return suggestions in less than 500 ms as, anything longer than this may be perceived as slow.
-
The solution should be reliable and low cost.
-
The solution should scale to thousands of simultaneous requests without desegregation.
Solution
What is required here is a reliable and scalable solution for looking up skills from a list of tags. Given the relatively small size of the data and the need for rapid response times, you’ll keep this data in an in-memory trie data structure.
Summary of Services
Here is a summary of the Google Cloud services you will be using in this solution.
Cloud ...
Get Cloud Native Development with Google Cloud now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.