3 Designing and managing microservice APIs

 

This chapter covers

  • Types of web APIs, and protocols and their main features
  • Defining the application boundaries
  • Strategies for decomposing an application into microservices
  • Managing APIs using the principles of API governance
  • Using documentation-driven development to improve the API development process

We can use a great variety of protocols and technologies to implement our microservices web APIs. It is important that we know and understand what our choices are so that we can make the best decisions for our APIs. In this chapter, we begin by studying the main types of web APIs and protocols that we can use to implement web interfaces for our microservices, and we examine their advantages and constraints. 

We also discuss two different techniques that we can use to decompose our system into microservices: decomposition by business capability and decomposition by subdomains. Service decomposition is a fundamental step in the design of our microservices strategy, since it helps us define applications with clear boundaries, well-defined scopes, and explicit responsibilities. A well-designed microservices architecture is essential to reduce the risk of ending up with a distributed monolith instead. We will see how the concepts of Domain Driven Design (DDD) can help us in this process, and what elements we need to take into account when defining the scope of a service.

3.1   Types of web APIs and protocols

 
 
 

3.1.1   Web APIs in RPC, XML-RPC, JSON-RPC

 
 
 
 

3.1.2   Web APIs in SOAP

 
 

3.1.3   Web APIs in gRPC

 
 

3.1.4   Web APIs in REST

 
 
 

3.1.5   Web APIs in GraphQL 

 
 

3.2   Defining the application boundaries

 
 
 

3.2.1   Decomposition by business capability

 
 
 

3.2.2   Decomposition by subdomains

 
 

3.2.3   Service decomposition strategies for microservices: practical and organizational matters

 
 

3.3   What is API Governance and why should you care?

 
 

3.3.1   API documentation with specification standards

 

3.3.2   Managing API changes with versioning

 
 

3.3.3   Managing the lifecycle of your APIs

 
 
 
 

3.3.4   API security and authentication

 

3.4   Introducing Documentation-Driven Development

 
 
 

3.5   Summary

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest