Modern API Design with gRPC: Efficient Solutions to Design Modern APIs with gRPC Using Golang for Scalable Distributed Systems 9788197081835

Elevate Your Development with Effortless and Efficient API Communication Key Features ● Delve into core concepts of gRP

116 69 3MB

English Pages 331 Year 2024

Report DMCA / Copyright

DOWNLOAD EPUB FILE

Table of contents :
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Technical Reviewer
Acknowledgements
Preface
Errata
Table of Contents
1. API Evolution over Time
Introduction
Structure
Introduction to API
Advent of APIs
Socket-based Network Communication
Costs Associated with Traditional API Frameworks
Conclusion
Multiple Choice Questions
Answers
2. Fundamentals of gRPC
Introduction
Structure
Protocol Buffers — Foundation of gRPC
Message Encoding Using Protocol Buffers
HTTP/2
Features that Make gRPC Standout
Clean Contract
Size of Data
Serialization of Data
TCP Connection
Code Generation
Conclusion
Multiple Choice Questions
Answers
3. Getting Started with gRPC
Introduction
Structure
Folder Structure
CRUD Operations on ‘Books’
Contrasting aspects of REST and gRPC implementations
Conclusion
Multiple Choice Questions
Answers
4. Communication Patterns in gRPC
Introduction
Structure
Explaining Unary RPC
Server-Side Streaming RPC
Client-Side Streaming RPC
Bi-Directional Streaming RPC
Conclusion
Multiple Choice Questions
Answers
5. Advanced gRPC Concepts
Introduction
Structure
Interceptors
Comparisons with middlewares
Implementing logging interceptor
Implementing Recovery Interceptor
Resilient gRPC communication
Cascading failures
Context and Deadlines
Mitigating cascading failures with Timeout pattern
Mitigating Cascading Failures with Retry pattern
Mitigating Cascading Failures with Circuit Breaker Pattern
Conclusion
Multiple Choice Questions
Answers
6. Load Balancing in gRPC
Introduction
Structure
Usage of load balancing
Tricky load balancing in gRPC servers
Sticky sessions
Chink in the armour of gRPC
Various Ways to Handle Load Balancing in gRPC
Client-side Load Balancing
Look-aside load balancing
gRPC load balancing with Istio
Conclusion
Multiple Choice Questions
Answers
References
7. Secured gRPC
Introduction
Structure
Enabling TLS Security in gRPC
Certificate Generation
Authenticating gRPC Calls
Using Basic Auth
Using JWT
Conclusion
Multiple Choice Questions
Answers
8. Production Grade gRPC Applications
Introduction
Structure
Requirement of Production Readiness
Tests for gRPC
Unit Testing
Integration Testing
Observability
Integration with Prometheus
Integration with Datadog
Deployments
API testing with Postman
Conclusion
Multiple Choice Questions
Answers
9. Case Studies of Projects Using gRPC
Introduction
Structure
LinkedIn Shifted from JSON+REST to gRPC+Protobuf
Background
Challenges with JSON
Vendasta’s Decision to Move their APIs to gRPC
Background
Problem
Optimizations and Challenges
Uber’s Implementation of gRPC for RealTime Push Platform
Background
Challenges with Polling
Netflix Optimizes Backend-to-Backend Communication with gRPC and Protobuf FieldMask
Conclusion
Multiple Choice Questions
Answers
References
Index

Modern API Design with gRPC: Efficient Solutions to Design Modern APIs with gRPC Using Golang for Scalable Distributed Systems
 9788197081835

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
Recommend Papers