"An API that isn't comprehensible isn't usable."
- James Gosling
All software systems eventually need to exchange data with the outside world. In many cases, this is achieved via an API. This chapter provides a comparison between the REST and RPC patterns for building APIs and discusses some common API issues such as authentication, versioning, and security. The rest of this chapter explores the gRPC ecosystem in depth and concludes with a gRPC-based API implementation for the Links 'R' Us project.
The following topics will be covered in this chapter:
- Basic principles of RESTful APIs
- Strategies for securing APIs and pitfalls that you should avoid
- Approaches for API versioning
- gRPC as an alternative to building high-performance services
- Describing messages and RPC services using the protocol buffers definition...