From db03fdb08aedc5125580c7ec8baa7215f08fea92 Mon Sep 17 00:00:00 2001 From: Paul Grosu Date: Tue, 6 Dec 2016 18:24:23 -0500 Subject: submit --- chapter/1/gRPC.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'chapter/1/gRPC.md') diff --git a/chapter/1/gRPC.md b/chapter/1/gRPC.md index 49bdee5..741f265 100644 --- a/chapter/1/gRPC.md +++ b/chapter/1/gRPC.md @@ -40,7 +40,6 @@ The HTTP/2 protocol is now a framed protocol, which expands the capability for b The HTTP header is one of the primary methods of passing information about the state of other endpoints, the request or response and the payload. This enables endpoints to save time when processing a large quantity to streams, with the ability to forward information along without wasting time to inspect the payload. Since the header information can be quite large, it is possible to now compress the them to allow for better throughput and capacity of stored stateful information. -

1.3 Multiplexed Streams

As streams are core to the implementation of HTTP/2, it is important to discuss the details of their implemenation in the protocol. As many streams can be open simultanously from many endpoints, each stream will be in one of the following states. Each stream is multiplexed together forming a chain of streams that are transmitted over the wire, allowing for asynchronous bi-directional concurrency to be performed by the receiving endpoint. Below is the lifecycle of a stream {% cite RFC7540 %}: @@ -68,6 +67,18 @@ message Hello { Figure 3: Protocol Buffer version 2.0 representing a message data-structure.

+This message will also be encoded for highest compression when sent over the wire. For example, let us say that the message is the string "Hi". + + + + + + + + + +
TypeMeaningUsed For
0Varintint32, int64, uint32, uint64, sint32, sint64, bool, enum
164-bitfixed64, sfixed64, double
2Length-delimitedstring, bytes, embedded messages, packed repeated fields
3Start groupgroups (deprecated)
4End groupgroups (deprecated)
532-bitfixed32, sfixed32, float
+ Thus the language had to be updated to support gRPC and the development of a service message with a request and a response definition was added for version version 3.0 of Protocol Buffers. The updated implementation would look as follows {% cite HelloWorldProto %}: ``` -- cgit v1.2.3