The read/write flow
Now that we have seen what Protobuf and gRPC are, it is time to go back to the read/write flow that we presented in Chapter 1. The goal of doing this is to make it a little bit more detailed and include what we learned.
As a quick reminder, we saw that they are mostly three levels when writing and reading data. We have the user code, the gRPC framework, and the transport layers. What is interesting for us here is mostly the user code. We did not go into too much detail in Chapter 1 but now that we are equipped with more knowledge on what gRPC is doing, we can understand the process more clearly.
The user-code layer is the code that developers write and interacts with the gRPC framework. For the client, this is calling the endpoints, and for the server, this is the implementation of the endpoints. If we keep going with our AccountService
service, we can give a concrete example of the read/write flow.
The first thing that we can do is separate the user-code...