Skip to content

Commit 956dbdc

Browse files
Update README.md
1 parent 2917d2a commit 956dbdc

File tree

1 file changed

+35
-21
lines changed

1 file changed

+35
-21
lines changed

README.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
## Cloud-Python-to-Cpp
22

3-
This project was designed to leverage **several** `Google Cloud Platform` cloud services to create a robust and automated system which can be interacted with via `C++` code. Why `C++`? The use case of that programming language specifically in the context of this project would be for example, having a `C++` based physical device pull from the cloud the latest `firmware` it needs, or just any kind of data from the cloud really.
3+
This project was designed to leverage **several** `Google Cloud Platform` cloud services to create a robust and automated system which can be interacted with via `C++` code.
44

5-
Ultimately in the end, a secure API to pull data from a `BigQuery` database table was designed and it can actually be called by **any** programming language as long as the correct credentials get sent in `json` format.
5+
Why `C++`? The use case of that programming language specifically in the context of this project would be for example, having a `C++` based physical device pull from the cloud the latest `firmware` it needs, or just any kind of data from the cloud really.
6+
7+
Ultimately in the end, a secure API to pull data from a `BigQuery` database table was designed and it can actually be called by **any** programming language as long as the correct credentials get sent in `json` format to the `Auth_Func`.
68

79
The programming language `Python` is utilized to create the entire backend component on `Google Cloud Platform`.
810

911
`Firebase` is also utilized as part of the authentication system.
1012

1113
------
1214

13-
**`Google Cloud Platform` technologies:**
15+
`Google Cloud Platform` technologies:
16+
17+
- `Artifact Registry` - Stores the latest Docker image builds for `Cloud Run`
1418

15-
1. `Artifact Registry` - Stores the latest Docker image builds for the Cloud Functions / Cloud Run
19+
- `BigQuery` - Data warehouse which stores the table of data we interact with
1620

17-
2. `BigQuery` - Data warehouse which stores the table of data we interact with
21+
- `Cloud Build` - Monitors GitHub repo and automates the process of deploying new code into the cloud
1822

19-
3. `Cloud Build` - Monitors GitHub repo and automates the process of deploying new code into the cloud
23+
- `Cloud Functions (Gen 2)` - The backend for the project. Within each Cloud Function is the `Python` code.
2024

21-
4. `Cloud Functions (Gen 2)` - The backend for the project. Within each Cloud Function is the `Python` code.
25+
- `Cloud Run` - Generation 2 of `Cloud Functions` is actually `Cloud Run` behind the scenes. Therefore `Python` code executes here.
2226

23-
5. `Cloud Run` - Generation 2 of `Cloud Functions` is actually `Cloud Run` behind the scenes. Therefore `Python` code executes here.
27+
- `Cloud Scheduler` - Cron job scheduler for any job in the cloud
2428

25-
6. `Cloud Scheduler` - Cron job scheduler for any job in the cloud
29+
- `Cloud Storage` - Stores the latest `Python` code for the `Cloud Functions`
2630

27-
7. `Secret Manager` - Secure storage system for sensitive data
31+
- `Secret Manager` - Secure storage system for sensitive data
2832

29-
**`Firebase` technologies:**
33+
`Firebase` technologies:
3034

31-
1. `Authentication` - Stores the user account data
35+
- `Authentication` - Stores the user account data
3236

3337
-----
3438

@@ -41,24 +45,34 @@ Values of the 5 most recent records from the BigQuery table get returned to the
4145
----
4246
### Cloud Functions
4347

44-
1. `Auth_Func` - Publically Accessible
48+
1. `Auth_Func` - Publically Accessible (could be private as well)
4549
2. `Compute_Func` - Private
4650
3. `Insert_Int_Func` - Private
4751

4852
Let's talk about each:
4953

50-
`Auth_Func` The authentication system.
54+
1. `Auth_Func` The authentication system.
5155

52-
Everything starts here. Way before any data can be extracted from the `BigQuery` database table, a `request` from the user has to pass multiple tests before the code can proceeed.
56+
- Everything starts here. Way before any data can be extracted from the `BigQuery` database table, a `request` from the user has to pass multiple tests before the code can proceeed.
5357

54-
1. The `request` cannot be empty and the `json` must have the correct keys, `email` and `password`.
55-
2. The value of the `email` key of the `json` must be a string.
56-
3. The format of the value of the `email` key of the `json` must be in the correct format e.g. `"name@domain.com"`.
57-
4. The value of the `password` key of the `json` must be a string.
58-
5. The `email` and `password` must correlate to an existing user within `Firebase Authentication`.
58+
- 1. The `request` cannot be empty and the `json` must have the correct keys, `email` and `password`.
59+
- 2. The value of the `email` key of the `json` must be a string.
60+
- 3. The format of the value of the `email` key of the `json` must be in the correct format e.g. `"name@domain.com"`.
61+
- 4. The value of the `password` key of the `json` must be a string.
62+
- 5. The `email` and `password` must correlate to an existing user within `Firebase Authentication`.
5963

60-
If everything checks out, then the `Compute_Func` `Cloud Function` gets called directly from the `Auth_Func`.
64+
- If everything checks out, then the `Compute_Func` `Cloud Function` gets called directly from the `Auth_Func`.
65+
66+
2. `Compute_Func` The computation system. Computation in the sense of enumerating, listing out.
67+
68+
- The job of the `Compute_Func` is to simply extract the values of the 5 most recent records from a `BigQuery` table.
69+
- Those values are then placed into a list.
70+
- That list is converted to a string and then the string is returned to the `Auth_Func`.
6171

72+
3. `Insert_Int_Func` The data insertion system.
6273

74+
- The `Insert_Int_Func` operates independently from the `Auth_Func` and `Compute_Func`.
75+
- `Insert_Int_Func` is triggered every **6 hours** by `Cloud Scheduler`
76+
- A randomized integer between the ranges of 0-75 is inserted into a `BigQuery` table
6377

6478

0 commit comments

Comments
 (0)