Project

Microservice API Patterns (MAP)

Goal: While much has been said about microservices in general and about supporting infrastructure architectures, the actual service design has received less attention:
- How many services should be exposed? What is an adequate size for them?
- How to ensure that services are loosely coupled? How much data do they exchange, and how often does this happen?
- What are the most suitable message representations? How to agree on the meaning of each message?

Answering these questions is what Microservice API Patterns is about: https://microservice-api-patterns.org/

Date: 31 October 2016

Updates

0 new
14
Recommendations

0 new
5
Followers

0 new
16
Reads

1 new
164

Project log

Olaf Zimmermann
added 5 research items
Remote Application Programming Interfaces (APIs) are technology enablers for distributed systems and cloud-native application development. API providers find it hard to design their remote APIs so that they can be evolved easily; refactoring and extending an API while preserving backward compatibility is particularly challenging. If APIs are evolved poorly, clients are critically impacted; high costs to adapt and compensate for downtimes may result. For instance, if an API provider publishes a new incompatible API version, existing clients might break and not function properly until they are upgraded to support the new version. Hence, applying adequate strategies for evolving service APIs is one of the core problems in API governance, which in turn is a prerequisite for successfully integrating service providers with their clients in the long run. Although many patterns and pattern languages are concerned with API, service design, and related integration technologies, patterns guiding the evolution of APIs are missing to date. Extending our emerging pattern language on Microservice API Patterns (MAP), we introduce a set of patterns focusing on API evolution strategies in this paper: API Description, Version Identifier, Semantic Versioning, Eternal Lifetime Guarantee, Limited Lifetime Guarantee, Two in Production, Aggressive Obsolescence, and Experimental Preview. The patterns were mined from public Web APIs and industry projects the authors had been involved in.
The design and evolution of Application Programming Interfaces (APIs) in microservices architectures is challenging. General design issues in integration and programming have been covered in great detail in many pattern languages since the beginnings of the patterns movement, and service-oriented infrastructure design patterns have also been published in the last decade. However, the interface representations (i.e., the content of message payloads) have received less attention. We presented five structural representation patterns in our previous work; in this paper we continue our coverage of the API design space and propose five interface quality patterns that deal with the observable aspects of quality-attribute-driven interface design for efficiency, security, and manageability: An API Key allows API providers to identify clients. Providers may offer rich data contracts in their responses, which not all consumers might need. A Wish List allows the client to request only the attributes in a response data set that it is interested in. If a client makes many API calls, the provider can employ a Rate Limit and bill clients according to a specified Rate Plan. A provider has to provide a high-quality service while at the same time having to use its available resources economically. The resulting compromise is expressed in a provider's Service Level Agreement.
Olaf Zimmermann
added an update
Our pattern language for API and service design forms the core of a forthcoming Signature Series book to be published by Addison Wesley Professional in December 2022.The book will be called “Patterns for API Design: Simplifying Integration with Loosely Coupled Message Exchanges”.
In the book, we emphasize microservices less than on our pattern website. Its 44 patterns certainly are applicable when architecting service-oriented systems and Web APIs, but also when creating message-based remote APIs in other settings. The book contains patterns that cover topics such as endpoint roles, message structure, API quality and evolution. It also provides an introduction to API fundamentals, a domain model for APIs, and a decision model identifying pattern selection questions, options and criteria. A third part applies the patterns to real-world cases.
More information and pointers to website, video interview, articles: https://medium.com/olzzio/new-book-patterns-for-api-design-announced-bb1fb45bb8d8
 
Olaf Zimmermann
added an update
Data Element, ID Element, Link Element, Metadata Element, see https://microservice-api-patterns.org/news
 
Olaf Zimmermann
added an update
In 2020, we got 11 responsibility patterns peer-reviewed (or, in pattern lingo, workshopped) at EuroPLoP. Please find the two papers here: https://microservice-api-patterns.org/publications
Two examples: The endpoint-level pattern "Data Transfer Resource" lets two or more applications exchange data in a loosely coupled fashion (via API calls), and the operation responsibility "State Transition Operation" describes update semantics (from simple actions to entire business process flows). Next up: Element Stereotypes (ID, Link, Metadata).
 
Olaf Zimmermann
added an update
Start your pattern-oriented API design journey here: https://ozimmer.ch/patterns/2020/05/07/MAPMetaPost.html
And if you are thinking about writing a pattern language yourself, some lessons learned on the MAP pro-bono project are captured in this retrospective (and outlook) 2016-2020: https://ozimmer.ch/patterns/2020/04/29/MAPRetrospective.html
 
Olaf Zimmermann
added an update
Java Spektrum, a German magazine, features MAP in its Tool Tips column (edited by Thomas Ronzon) in the January/February 2020 issue: “Best Practice Patterns (nicht nur) für Microservices”: http://www.sigs.de/publications/download/Artikel/ronzon_JS_01_20_lklo.pdf
 
Olaf Zimmermann
added a research item
The Microservice API Patterns (MAP) language and supporting website premiered under this name at Microservices 2019. MAP distills proven, platform-and technology-independent solutions to recurring (micro-)service design and interface specification problems such as finding well-fitting service granularities, rightsizing message representations, and managing the evolution of APIs and their implementations. In this paper, we motivate the need for such a pattern language, outline the language organization and present two exemplary patterns describing alternative options for representing nested data. We also identify future research and development directions.
Olaf Zimmermann
added an update
We now have a quickstart page that collects all entry points into the pattern language and the website: https://microservice-api-patterns.org/quickstart and a beginner-level tutorial: https://microservice-api-patterns.org/patterns/tutorials/tutorial0
Feedback appreciated!
 
Olaf Zimmermann
added a research item
Microservice API Patterns (MAP) take a broad view on API design and evolution, primarily focussing on message representations – the payloads exchanged when APIs are called. These payloads have structure. The representation elements in the payloads differ in their meanings as API endpoints and their operations have different architectural responsibilities. Furthermore, the chosen representation structures strongly influence the design time and runtime qualities of an API. Finally, the evolution of API specifications and their implementations has to be governed. Our Microservice API Patterns capture proven solutions to design problems commonly encountered when specifying, implementing and maintaining message-based APIs in terms of their structure, responsibilities, and quality.
Olaf Zimmermann
added an update
Published patterns include structural ones such as Pagination, quality related ones such as API Key, Rate Limit, Request Bundle, SLA and Wish List, and evolution patterns such as Aggressive Obsolescence and Two in Production.
Feedback and input appreciated!
 
Olaf Zimmermann
added an update
One foundation pattern and seven evolution patterns were workshopped at EuroPLoP 2019, including API Description, Aggressive Obsolescence and Two in Production. See https://microservice-api-patterns.org/news
 
Olaf Zimmermann
added an update
Please find 15/45 remote API design patterns here: https://microservice-api-patterns.org/
 
Olaf Zimmermann
added a project goal
While much has been said about microservices in general and about supporting infrastructure architectures, the actual service design has received less attention:
- How many services should be exposed? What is an adequate size for them?
- How to ensure that services are loosely coupled? How much data do they exchange, and how often does this happen?
- What are the most suitable message representations? How to agree on the meaning of each message?
Answering these questions is what Microservice API Patterns is about: https://microservice-api-patterns.org/