Go’s primary focus is the following:
- First class support for concurrency
- An elegant, modern language that is very simple to its core
- Very good performance
- First-hand support for the tools required for modern software development
goroutines + channel部分
After looking at the language, you may feel that the language doesn’t follow any particular philosophy or direction and it feels like every feature is included in here to solve a specific problem and nothing morethan that. For example, it has methods and interfaces but not classes; the compiler produces a statically linked binary but still has a garbagecollector; it has strict static typing but doesn’t support generics. The language does have a thin runtime but doesn’t support exceptions.
Here are the focus points of Protobuf:
- It’s a binary format, unlike JSON and XML, which are text-based and hence it’s vastly space efficient.
- First hand and sophisticated support for schemas.
- First-hand support for generating parsing and consumer code in various languages.
REST
the service is behaving like a monolithic system, which along with what is required is also doing n number of other things to provide the client with the intended ‘browsing’ experience.
gRPC intends to improve upon the following technical aspects over traditional HTTP requests:
- HTTP/2 by default with all its goodies.
- Protobuf as machines are talking.
- Dedicated support for streaming calls thanks to HTTP/2.
- Pluggable auth, tracing, load balancing and health checking because you always need these.