WEBVTT

00:00.260 --> 00:00.530
All right.

00:00.530 --> 00:07.460
So next up, I'm going to show you how we can refactor our microservices instead of using TCP as our

00:07.460 --> 00:12.170
transport layer for all of our microservices, we're instead going to use gRPC.

00:12.740 --> 00:19.370
Now, if you're unfamiliar with gRPC, I'm going to provide links to both a introduction to gRPC where

00:19.370 --> 00:25.970
you can quickly read up on what gRPC is, as well as the language guide for it, where you can learn

00:25.970 --> 00:30.860
more about Proto, which is the language that runs gRPC.

00:31.100 --> 00:35.160
So I'll include links to both of these later on in the course.

00:35.180 --> 00:40.250
However, just for a brief overview, we can see a great description of what gRPC is.

00:40.250 --> 00:47.180
So we can see here that gRPC is going to allow our client applications to call methods on our server

00:47.180 --> 00:53.420
as if they were a local object, which makes it really easy for us to build distributed applications.

00:53.720 --> 01:01.140
So in gRPC we define a service, the methods that the service can be called and all of the data that

01:01.140 --> 01:02.520
is involved with those services.

01:02.520 --> 01:09.270
So the parameters, the return types, all of this is going to be defined in these proto files that

01:09.270 --> 01:10.640
we're going to build.

01:10.650 --> 01:16.740
So we can see here that regardless of the client we're using, whether it's a Ruby client, an Android

01:16.740 --> 01:21.650
client or any other client, the gRPC stub is going to be exactly the same.

01:21.660 --> 01:28.070
We're going to talk to the server as if it was a local in-memory process and get a response back.

01:28.080 --> 01:34.140
So this makes it super easy to write our code once to define what our services look like, and then

01:34.140 --> 01:38.850
any number of our clients can reuse this, which cuts down on duplication.

01:39.000 --> 01:47.190
So as I said before, gRPC runs on protocol buffers, which we are going to work on building next in

01:47.190 --> 01:49.320
our microservices.

01:49.320 --> 01:51.470
So let's go ahead and jump right in.

01:51.480 --> 01:57.060
I'll leave links to both this introduction and the language guide for protocol buffers if you'd like

01:57.060 --> 01:57.870
to learn more.

01:57.900 --> 02:03.090
Otherwise, let's jump right in and see how we can implement gRPC in our microservice.
