Recently, I have completed two Google Cloud certifications, - Professional Cloud Architect and Professional Data Engineer. The team at Google Tel-Aviv were nice about it and gave me a Google Home device as a token of their appreciation (thank you Nir Atias & Ifat Yanai!)
Now that I got my new toy, it’s time for some fun!
My kids are going to a school on the other side of town and are commuting with a school bus, so I wanted to know when they are going to be home, without taking out my phone and using Find my iPhone app. I also was looking for opportunity to write some Google Assistant actions ;-)
I decided that I wanted my ETA estimator to be serverless all the way. I choose to use Cloud Functions (which now can be written in Python!), as my endpoint, Cloud Datastore as my persistent storage layer and Cloud KMS as a secure way to store secrets.
Once a user activates the action (called school bus), he will be asked for his child name (if you’re like me having more than one kid). Then the cloud function will be called.
The cloud function will retrieve from Datastore all the necessary data and will get the location using Find My iPhone API.
Once we have the location, a call to Google Maps Direction API is made in order to get the ETA. The ETA is returned to Google Assistant which will play/display it to the use.