Preface

Nowadays software applications are often connected with each other over computer networks using inter-process communication technologies. gRPC is a modern inter-process communication style based on high-performance RPCs (remote procedure calls) for building distributed applications and microservices. With the advent of microservices and cloud native applications, the adoption of gRPC is exponentially growing.

Why Did We Write This Book?

With the increasing adoption of gRPC, we felt that developers need a comprehensive book on gRPC, a book that you can use as the ultimate reference guide in every stage of the development cycle of your gRPC applications. There are a lot of resources and code samples for gRPC all over the place (documentation, blogs, articles, conference talks, and so on), but there’s no single resource that you can use to build gRPC applications. Also, there aren’t any resources on the internals of the gRPC protocol and how it works under the hood.

We wrote this book to overcome those challenges and give you a comprehensive understanding of the fundamentals of gRPC, how it differs from conventional inter-process communication technologies, real-world gRPC communication patterns, how to build gRPC applications using Go and Java, how it works under the hood, how to run gRPC applications in production, and how gRPC works with Kubernetes and the rest of the ecosystem.

Who Is This Book For?

The book is most directly relevant to developers who are building distributed applications and microservices using different inter-process communication technologies. When it comes to building such applications and services, developers need to learn the fundamentals of gRPC, when and how to use it for inter-service communication, best practices for running gRPC services in production, and so on. Also, architects who are adopting microservices or cloud native architecture and designing how the services should communicate will get a lot of insight from the book because it compares and contrasts gRPC with other technologies and provides guidelines on when to use and when to avoid it.

We assume that both developers and architects have a basic understanding of the fundamentals of distributed computing such as inter-process communication techniques, service-oriented architecture (SOA), and microservices.

How This Book Is Organized

The book is written in such a way that the theoretical concepts are explained using real-world use cases. Throughout the book, we have extensively used code examples featuring Go and Java to give readers hands-on experience with each of the concepts that they learn. We have organized the book into eight chapters.

Chapter 1, Introduction to gRPC

This chapter gives you a basic understanding of gRPC fundamentals and compares it with similar inter-process communication styles such as REST, GraphQL, and other RPC technologies.

Chapter 2, Getting Started with gRPC

This chapter is where you get the first hands-on experience with building a complete gRPC application using either Go or Java.

Chapter 3, gRPC Communication Patterns

In this chapter, you will explore gRPC communication patterns using real-world examples.

Chapter 4, gRPC: Under the Hood

If you are an advanced gRPC user interested in knowing the internals of gRPC, this is the chapter to learn them. This chapter teaches you every step of gRPC communication between server and client and how it works over the network.

Chapter 5, gRPC: Beyond the Basics

This chapter teaches you some of the most important advanced features of gRPC such as interceptors, deadlines, metadata, multiplexing, load balancing, and so on.

Chapter 6, Secured gRPC

This chapter gives you a comprehensive understanding of how to secure communication channels and how we authenticate and control the access of users to gRPC applications.

Chapter 7, Running gRPC in Production

This chapter walks you through the entire development life cycle of gRPC applications. We cover testing gRPC applications, integration with CI/CD, deploying and running on Docker and Kubernetes, and observing gRPC applications.

Chapter 8, The gRPC Ecosystem

In this chapter, we discuss some of the helpful supporting components built around gRPC. Most of these projects are useful when building real-world applications using gRPC.

Using Code Examples

All the code examples and supplemental materials for this book are available for download at https://grpc-up-and-running.github.io. We highly recommend trying out the samples available in this repository as you are reading the book. It will give you a better understanding of the concepts that you’re learning.

These code examples are maintained and kept up to date with the latest versions of the libraries, dependencies, and development tools. Occasionally you may find that the code examples in the text and the examples in the repository slightly differ. We highly encourage you to send a pull request (PR) if you come across any issues or improvements related to the code samples.

You may use this book’s example code in your own programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.

We appreciate, but generally do not require, attribution. An attribution usually includes the title, author, publisher, and ISBN. For example: “gRPC: Up and Running by Kasun Indrasiri and Danesh Kuruppu (O’Reilly). Copyright 2020 Kasun Indrasiri and Danesh Kuruppu, 978-1-492-05833-5.”

If you feel your use of code examples falls outside fair use or the permission given above, feel free to contact us at .

Conventions Used in This Book

The following typographical conventions are used in this book:

Italic

Indicates new terms, URLs, email addresses, filenames, and file extensions.

Constant width

Used for program listings, as well as within paragraphs to refer to program elements such as variable or function names, databases, data types, environment variables, statements, and keywords.

Constant width bold

Shows commands or other text that should be typed literally by the user.

Constant width italic

Shows text that should be replaced with user-supplied values or by values determined by context.

Tip

This element signifies a tip or suggestion.

Note

This element signifies a general note.

Warning

This element indicates a warning or caution.

O’Reilly Online Learning

Note

For more than 40 years, O’Reilly Media has provided technology and business training, knowledge, and insight to help companies succeed.

Our unique network of experts and innovators share their knowledge and expertise through books, articles, conferences, and our online learning platform. O’Reilly’s online learning platform gives you on-demand access to live training courses, in-depth learning paths, interactive coding environments, and a vast collection of text and video from O’Reilly and 200+ other publishers. For more information, please visit http://oreilly.com.

How to Contact Us

Please address comments and questions concerning this book to the publisher:

  • O’Reilly Media, Inc.
  • 1005 Gravenstein Highway North
  • Sebastopol, CA 95472
  • 800-998-9938 (in the United States or Canada)
  • 707-829-0515 (international or local)
  • 707-829-0104 (fax)

We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at https://oreil.ly/gRPC_Up_and_Running.

Email to comment or ask technical questions about this book.

For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.

Find us on Facebook: http://facebook.com/oreilly

Follow us on Twitter: http://twitter.com/oreillymedia

Watch us on YouTube: http://www.youtube.com/oreillymedia

Acknowledgments

Our grateful thanks go to the tech reviewers of this book, Julien Andrieux, Tim Raymond, and Ryan Michela. Also, we would like to thank our Development Editor Melissa Potter for her guidance and support, and our Acquisitions Editor Ryan Shaw for all the support given. Last but not least we thank the entire gRPC community for creating such a great open source project.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset