Making Fetch (Requests) Happen

Madé Lapuerta
Google Cloud - Community

--

The third week of my being a developer relations intern at Google in NYC revolved around learning Google Cloud Functions. As someone who learned to code by playing around with link hovers and custom cursors on Tumblr, naturally I wanted to embed my new knowledge of Cloud Functions into a web app. Was this a challenge? Absolutely.

Of course, first I needed to come up with an idea for my app.

I must confess and say that I knew almost nothing about machine learning until I started my internship at Google, which is why I so intrigued by playing around with the Google Vision AI. I decided my super cool, tech-savvy, machine learning web app was going to make a call to this vision AI: I would send it a picture and return the data obtained from the cloud.

This is where Google Cloud Functions comes into play. Something I learned the hard way (read: after hours of painful confusion and visits to StackOverflow) is that making calls to any service in the Google Cloud requires several levels of authorization. Cloud Functions acts as a server that handles all of this work for you — hooray!

Additionally, calling the Vision AI from a Cloud Function as opposed to from the JavaScript in your front end means your credentials (private key IDs, billing account data, and the like), are handled securely and free from potential hackers.

--

--

Madé Lapuerta
Google Cloud - Community

Big nerd writing about the intersection between technology & fashion. Spanish/Cuban turned New Yorker. Founder & Editor at Dashion: medium.com/dashion.