Skip to content
This repository was archived by the owner on Apr 9, 2021. It is now read-only.

Commit 8a79c4c

Browse files
more fixes
1 parent 9598f45 commit 8a79c4c

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

_posts/2018-11-30-grpc-stacks.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
layout: post
3-
title: gRPC Language Stacks
3+
title: Visualizing gRPC Language Stacks
44
published: false
55
permalink: blog/grpc-stacks
66
author: Carl Mastrangelo
@@ -13,22 +13,25 @@ Here is a high level overview of the gRPC Stacks. Each of the **10** default la
1313

1414
<!--more-->
1515

16-
1716
There are three main stacks in gRPC: C-core, Go, and Java. Most of the languages are thin wrappers on top of the [C-based](https://github.com/grpc/grpc/tree/master/src/core) gRPC core library:
1817

18+
### Wrapped Languages:
19+
1920
<p><img src="https://grpc.io/img/grpc-core-stack.svg" alt="gRPC Core Stack" style="max-width: 800px" /></p>
2021

21-
For example, a Python application calls into the generated Python stubs. These calls pass through interceptors, and into the wrapping library where the call is translated into C calls. The gRPC C-core will encode the RPC as HTTP/2, optionally encrypt the data with TLS, and then write it to the network.
22+
For example, a Python application calls into the generated Python stubs. These calls pass through interceptors, and into the wrapping library where the calls are translated into C calls. The gRPC C-core will encode the RPC as HTTP/2, optionally encrypt the data with TLS, and then write it to the network.
2223

2324
One of the cool things about gRPC is that you can swap these pieces out. For example, you could use C# instead, and use an In-Process transport. This would save you from having to go all the way down to the OS network layer. Another example is trying out the QUIC protocol, which allows you to open new connections quickly. Being able to run over a variety of transports based on the environment makes gRPC really flexible.
2425

26+
For each of the wrapped languages, the default HTTP/2 implementation is built into the C-core library, so there is no need to include an outside one. However, as you can see, it is possible to bring your own (such as with Cronet, the Chrome networking library).
27+
2528
### Go
2629

2730
In [gRPC-Go](https://github.com/grpc/grpc-go), the stack is much simpler, due to not having to support so many configurations. Here is a high level overview of the Go stack:
2831

2932
<p><img src="https://grpc.io/img/grpc-go-stack.svg" alt="gRPC Go Stack" style="max-width: 800px" /></p>
3033

31-
The structure is a little different here. Since there is only one language, the flow from the top of the stack to the bottom is more linear.
34+
The structure is a little different here. Since there is only one language, the flow from the top of the stack to the bottom is more linear. Unlike wrapped languages, gRPC Go can use either its own HTTP/2 implementation, or the Go `net/http` package.
3235

3336

3437
### Java
@@ -37,4 +40,4 @@ Here is a high level overview of the [gRPC-Java](https://github.com/grpc/grpc-ja
3740

3841
<p><img src="https://grpc.io/img/grpc-java-stack.svg" alt="gRPC Java Stack" style="max-width: 800px" /></p>
3942

40-
Again, the structure is a little different. Java supports HTTP/2, QUIC, and In Process like the C-core. Unlike the C-Core though, applications commonly can bypass the generated stubs and interceptors, and speak directly to the Java Core library. Each structure is slightly different based on the needs of each language implementation of gRPC.
43+
Again, the structure is a little different. Java supports HTTP/2, QUIC, and In Process like the C-core. Unlike the C-Core though, applications commonly can bypass the generated stubs and interceptors, and speak directly to the Java Core library. Each structure is slightly different based on the needs of each language implementation of gRPC. Also unlike wrapped languages, gRPC Java separates the HTTP/2 implementation into pluggable libraries (such as Netty, OkHttp, or Cronet).

0 commit comments

Comments
 (0)