Hi Ankit,
I'm glad to see your interest toward learning gRPC. There are two talk posted on
https://grpc.io/docs/talks/ I would personally like to recommend to you:
* gRPC Intro - Jayant Kolhe, May 2018
* gRPC Deep Dive - Sree Kuchibhotla, May 2018
The gRPC Deep Dive will give you thorough idea of how gRPC is working under the hood.
> On the client side, the client has a local object known as stub (for some languages, the preferred term is client) that implements the same methods as the service. The client can then just call those methods on the local object, wrapping the parameters for the call in the appropriate protocol buffer message type - gRPC looks after sending the request(s) to the server and returning the server’s protocol buffer response(s).
Also, you may need to have a basic concept about what is ProtoBuf and what does it do.
If you got all the prerequisites, let's get to the code itself.
For line 29, it creates an insecure channel as client. It is using `with` semantics to conveniently close the channel after use. Alternatively, you can create the channel and assign it to an variable, then close it later.
For line 30, it creates an stub used to invoke RPC calls. It is imported from the generated code.
For line 31, it invoked an RPC with the ProtoBuf message instance and saved the response. It is also defined and imported by the proto file.
Feel free to ask further questions.
Cheers,
Lidi Zheng