<p><span>Build robust, production-ready microservices in gRPC Go to enhance the scalability and efficiency of your APIs in real-world applications</span></p><p><span>Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Discove
gRPC Go for Professionals: Implement, test, and deploy production-grade microservices
β Scribed by Clement Jean
- Publisher
- Packt Publishing
- Year
- 2023
- Tongue
- English
- Leaves
- 260
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Build robust, production-ready microservices in gRPC Go to enhance the scalability and efficiency of your APIs in real-world applications
Purchase of the print or Kindle book includes a free PDF eBook
Key Features
- Discover essential guidelines to steer clear of pitfalls when designing and evolving your gRPC services
- Develop your understanding of advanced gRPC concepts such as authentication and security
- Put your knowledge into action as you build, test, and deploy a TODO list microservice
Book Description
In recent years, the popularity of microservice architecture has surged, bringing forth a new set of requirements. Among these, efficient communication between the different services takes center stage, and that's where gRPC shines. This book will take you through creating gRPC servers and clients in an efficient, secure, and scalable way. However, communication is just one aspect of microservices, so this book goes beyond that to show you how to deploy your application on Kubernetes and configure other tools that are needed for making your application more resilient. With these tools at your disposal, you'll be ready to get started with using gRPC in a microservice architecture.
In gRPC Go for Professionals, you'll explore core concepts such as message transmission and the role of Protobuf in serialization and deserialization. Through a step-by-step implementation of a TODO list API, you'll see the different features of gRPC in action. You'll then learn different approaches for testing your services and debugging your API endpoints. Finally, you'll get to grips with deploying the application services via Docker images and Kubernetes.
What you will learn
- Understand the different API endpoints that gRPC lets you write
- Discover the essential considerations when writing your Protobuf files
- Compile Protobuf code with protoc and Bazel for efficient development
- Gain insights into how advanced gRPC concepts work
- Grasp techniques for unit testing and load testing your API
- Get to grips with deploying your microservices with Docker and Kubernetes
- Discover tools for writing secure and efficient gRPC code
Who this book is for
Whether you're interested in microservices or looking to use gRPC in your product, this book is for you. To fully benefit from its contents, you'll need a solid grasp of Go programming and using a terminal. If you're already familiar with gRPC, this book will help you to explore the different concepts and tools in depth.
Table of Contents
- Product Information Document
- Networking Primer
- Probuf Primer
- Introduction to Grpc
- Setting up a Project
- Type of gRPC End points
- Consideration in designing APIs
- Out of the box features
- More Essential Features
- Production-Grade APIs
β¦ Table of Contents
Cover
Title Page
Copyright and Credits
Contributors
About the reviewers
Table of Contents
Preface
Chapter 1: Networking Primer
Prerequisites
Understanding HTTP/2
RPC operations
Send Header
Send Message
Send Half Close
Send Trailer
RPC types
Unary
Server streaming
Client streaming
Bidirectional streaming
The life cycle of an RPC
The connection
The client side
The server side
Summary
Quiz
Answers
Chapter 2: Protobuf Primer
Prerequisites
Protobuf is an IDL
Serialization and deserialization
Protobuf versus JSON
Serialized data size
Readability
Schema strictness
Encoding details
Fixed-size numbers
Varints
Length-delimited types
Field tags and wire types
Common types
Well-known types
Google common types
Services
Summary
Quiz
Answers
Chapter 3: Introduction to gRPC
Prerequisites
A mature technology
What is gRPC doing?
The server
The client
The read/write flow
Why does gRPC matter?
REST
GraphQL
Comparison with gRPC
Summary
Quiz
Answers
Chapter 4: Setting Up a Project
Prerequisites
Creating a .proto file definition
Generating Go code
Protoc
Buf
Bazel
Server boilerplate
Bazel
Client boilerplate
Bazel
Server and Dial options
grpc.Creds
grpc.*Interceptor
Summary
Quiz
Answers
Chapter 5: Types of gRPC Endpoints
Technical requirements
Using the template
A Unary API
Code generation
Inspecting the generated code
Registering a service
Implementing AddTask
Calling AddTask from a client
Bazel
The server streaming API
Evolving the database
Implementing ListTasks
Calling ListTasks from a client
The client streaming API
Evolving the database
Implementing UpdateTasks
Calling UpdateTasks from a client
The bidirectional streaming API
Evolving the database
Implementing DeleteTasks
Calling UpdateTasks from the client
Summary
Quiz
Answers
Chapter 6: Designing Effective APIs
Technical requirements
Choosing the right integer type
An alternative to using integers
Choosing the right field tag
Required/optional
Splitting messages
Improving UpdateTasksRequest
Adopting FieldMasks to reduce the payload
Improving ListTasksRequest
Beware the unpacked repeated field
Packed repeated fields
Unpacked repeated fields
Summary
Quiz
Answers
Chapter 7: Out-of-the-Box Features
Technical requirements
Handling errors
Bazel
Canceling a call
Specifying deadlines
Sending metadata
External logic with interceptors
Compressing the payload
Securing connections
Bazel
Distributing requests with load balancing
Summary
Quiz
Answers
Challenges
Chapter 8: More Essential Features
Technical requirements
Validating requests
Buf
Bazel
Middleware = interceptor
Authenticating requests
Bazel
Logging API calls
Tracing API calls
Bazel
Securing APIs with rate limiting
Bazel
Retrying calls
Bazel
Summary
Quiz
Answers
Challenges
Chapter 9: Production-Grade APIs
Technical requirements
Testing
Unit testing
Load testing
Debugging
Server reflection
Using Wireshark
Turning gRPC logs on
Deploying
Docker
Kubernetes
Envoy proxy
Summary
Quiz
Answers
Challenges
Epilogue
Index
Other Books You May Enjoy
π SIMILAR VOLUMES
<p><span>Build robust, production-ready microservices in gRPC Go to enhance the scalability and efficiency of your APIs in real-world applications</span></p><p><span>Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Discove
Build super fast and super secure microservices with the gRPC high-performance messaging protocol and powerful Go language. In gRPC Microservices in Go youβll learn: β’ Designing and implementing resilient microservice architecture β’ Testing microservices β’ Deploying microservices to the cloud
The full stack - OpenResty, Circus and Flask -- OpenResty -- Circus -- Docker-based deployments -- Docker Compose -- Introduction to Clustering and Provisioning -- Summary -- Chapter 11: Deploying on AWS -- AWS overview -- Routing - Route53, ELB, and AutoScaling -- Execution - EC2 and Lambda -- Stor
The full stack - OpenResty, Circus and Flask -- OpenResty -- Circus -- Docker-based deployments -- Docker Compose -- Introduction to Clustering and Provisioning -- Summary -- Chapter 11: Deploying on AWS -- AWS overview -- Routing - Route53, ELB, and AutoScaling -- Execution - EC2 and Lambda -- Stor
Microservice architecture is sweeping the world as the de facto pattern to build web-based applications. This book describes web development using the Rust programming language and will get you up and running with modern web frameworks and. Finally, you will be taken through examples of how to tes