A number of Microservice API Patterns (MAP) realization examples can be found in the interface
layers of the Java backends that implement the Lakeside Mutual microservices.
Pattern | Example (Class) | Backend Microservice(s) |
---|---|---|
Quality Management and Governance | ||
API Key | APIKeyAuthenticationManager.java | Customer Core |
Rate Limit | RateLimitInterceptor.java | Customer Self Service |
Error Report | ErrorController.java | Customer Core |
ErrorController.java | Customer Management | |
ErrorController.java | Customer Self Service | |
ErrorController.java | Policy Management | |
CustomerInformationHolder.java | Policy Management | |
Data Transfer Parsimony | ||
Wish List | CustomerInformationHolder.java | Customer Core |
PolicyInformationHolder.java | Policy Management | |
Wish Template | tba | |
Request Bundle | CustomerInformationHolder.java | Customer Core |
Conditional Request | tba | |
Reference Management | ||
Embedded Entity | customerProfile in CustomerDto.java |
e.g. Customer Management |
Linked Information Holder | CustomerInformationHolder.java | Policy Management |
Pattern | Example (Class) | Backend Microservice(s) |
---|---|---|
Atomic Parameter | CitiesResponseDto.java | Customer Core |
Atomic Parameter List | AddressDto.java | Customer Core |
Parameter Tree | CustomerResponseDto.java | Customer Core |
Parameter Forest | CustomersResponseDto.java | Customer Core |
Pagination | CustomerInformationHolder.java | Customer Core |
PaginatedCustomerResponseDto.java | Customer Core | |
PaginatedPolicyResponseDto.java | Policy Management | |
Context Representation | tba | |
Element Stereotypes | ||
Data Element | Data Transfer Objects (DTOs) in *.interfaces.dtos.* packages |
All microservices |
Id Element | customerId in CustomerDto.java |
Customer Management, other microservices |
Link Element | Pagination links in createPaginatedCustomerResponseDto in CustomerInformationHolder.java |
Customer Core |
Metadata Element | Control variant: instances of Pagination (e.g., PaginatedCustomerResponseDto.java) | Customer Core |
Aggregation variant: counts and averages in risk reports (CSV) | Risk Management | |
Provenance variant: tba |
Note that some classes appear in several projects; microservices are not supposed to share code libraries because that would break their independent deployability, one of the defining microservices tenets.
Some answers to these questions can be found on the MAP website.