PRIYANKA VERGADIA: Welcome to "Get
Cooking in Cloud," where we share the best recipes
to apply in your Cloud kitchen.
I'm Priyanka, and in this episode,
we're wrapping up the mobile backend app recipe with Jen.
[MUSIC PLAYING]
JEN PERSON: It's bittersweet that this
is our last mobile app backend recipe.
I've had so much fun cooking with you.
PRIYANKA VERGADIA: Ah, well, it's
been great having you visit my kitchen.
So tell me about this last recipe.
What are we cooking up today?
JEN PERSON: Today's solution combines REST or gRPC
with Compute Engine.
PRIYANKA VERGADIA: Ah, so the ingredients then,
are some sort of API with REST or gRPC and Compute Engine?
JEN PERSON: Exactly.
PRIYANKA VERGADIA: So I talked about Compute Engine
in the first season.
I'll link the video below for any of our viewers
who didn't catch it.
Well, Compute Engine lets you create and run virtual machines
on Google infrastructure.
You have admin rights to the server and full control
over its configuration, but this also
means that you are responsible for updates and maintenance.
JEN PERSON: Exactly, Priyanka.
Compute Engine gives you more configuration control
than my previous recipes, but that puts the onus
on the developer to monitor and maintain it.
Now there are two main protocols used
to connect to Compute Engine instances, REST and gRPC.
Like all of my recipes, the choice you make here really
depends on your app's particular needs.
PRIYANKA VERGADIA: So I know that Rest
is an architecture for network app
that uses an HTTP request to post, read and delete data.
You can build REST APIs on Compute Engine, the App Engine
standard environment, and the App Engine flexible environment
instances that your app can call to access
the backend service you build.
In this case, we're specifying Compute Engine.
JEN PERSON: Yes.
And gRPC is a framework that makes
it possible for a mobile app to directly call
methods on a backend service as if it were a local object.
gRPC uses the HTTP/2 standard, which
introduces bi-directional streaming, flow control, header
compression, and the ability to multiplex requests
over a single TCP connection.
You can use gRPC to make your mobile app more
bandwidth efficient and to reduce latency
between your app and backend service running on GCP.
You can write gRPC clients and servers
in any of gRPC's supported languages.
So you could, for instance, create a gRPC server in Java
with clients in Go, Python or Ruby.
PRIYANKA VERGADIA: That is great overview of gRPC.
We also talked about REST and Compute Engine so far.
In which scenario would you recommend this recipe?
JEN PERSON: I recommend Compute Engine with REST or gRPC
for porting an existing backend service running
on an on premises server or a virtual machine,
and backend services that require a custom server
or third party libraries.
PRIYANKA VERGADIA: So this could be
good solution for handling my legacy on prem
code for Priyanka's Kitchen.
JEN PERSON: Exactly.
But if your app requires automatic real time
data synchronization across devices,
I recommend using one of our Firebase solutions instead.
PRIYANKA VERGADIA: What if I prefer automatic maintenance
and scaling?
JEN PERSON: Well, then this isn't the solution for you,
since you must maintain and upgrade the server yourself,
and you must manually configure and manage in autoscaler.
PRIYANKA VERGADIA: Where can developers
learn more about using Compute Engine with REST or gRPC
in their apps?
JEN PERSON: There is an end-to-end sample
app called Sticky Notes that sends text
to the service, which responds by returning a generated image.
The Sticky Notes sample is available in both REST
and gRPC versions, so you can compare the two protocols.
PRIYANKA VERGADIA: All right, Jen, that sounds great.
I cannot wait to take a look at the Sticky Notes sample app.
That's all for today on "Get Cooking in Cloud."
With this, we have wrapped up the mobile app backend recipes
on Google Cloud.
If you would like to know more about today's recipe
or any of the ones we have covered in this season,
check out the links in the description below.
JEN PERSON: If you like this video,
then check out the other episodes in the series.
And don't forget to subscribe to our channel,
so you can be notified about new episodes
of "Get Cooking in Cloud," as well as other great Google
Cloud content.
[MUSIC PLAYING]