mirror of
https://github.com/ByteByteGoHq/system-design-101.git
synced 2026-04-01 16:57:23 -04:00
gRPC: move text above gRPC diagram (#25)
Update README.md to move text above the gRPC diagram. --------- Co-authored-by: PrakashB <prakash.bhandari@bigtincan.com>
This commit is contained in:
@@ -169,14 +169,14 @@ GraphQL can aggregate multiple REST requests into one query. GraphQL server orga
|
|||||||
|
|
||||||
### How does gRPC work?
|
### 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.
|
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**.
|
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.
|
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.
|
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user