Skip to content

Commit

Permalink
gRPC: move text above gRPC diagram (ByteByteGoHq#25)
Browse files Browse the repository at this point in the history
Update README.md  to move text above the gRPC diagram.

---------

Co-authored-by: PrakashB <[email protected]>
  • Loading branch information
dev-scripts and PrakashB authored Oct 22, 2023
1 parent 56956d3 commit 787a615
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ GraphQL can aggregate multiple REST requests into one query. GraphQL server orga

### How does gRPC work?

<p>
<img src="images/grpc.jpg">
</p>

RPC (Remote Procedure Call) is called “**remote**” because it enables communications between remote services when services are deployed to different servers under microservice architecture. From the user’s point of view, it acts like a local function call.

The diagram below illustrates the overall data flow for **gRPC**.

<p>
<img src="images/grpc.jpg">
</p>

Step 1: A REST call is made from the client. The request body is usually in JSON format.

Steps 2 - 4: The order service (gRPC client) receives the REST call, transforms it, and makes an RPC call to the payment service. gRPC encodes the **client stub** into a binary format and sends it to the low-level transport layer.
Expand Down

0 comments on commit 787a615

Please sign in to comment.