ArtisanTinkerer.github.io

Blog

View on GitHub

title: “Building-Microservices” date: 2018-09-07 layout: default —

https://martinfowler.com/articles/microservices.html

Alternative to monolith

Microservices

### Smart endpoints and dumb pipes

### Decentralized Data Management

### Infrastructure Automation

### Design for failure

### Evolutionary Design

# Sam Newman - Building Microservices

## Loose Coupling

## Synchronous Versus Asynchronous

###Two styles of architecture:

#### Orchestration Central brain guides and drives the process.

#### Choreography Inform each part of the system of it’s job and let it work out the details (finding their way and reacting to others around them. ).

Example: uses Orchestration and request/response, customer service is the brain and can therefore track where a customer is in the process.

With choreographed approach

** I strongly prefer aiming for a choreographed system, where each service is smart enough to understand its role in the whole dance. **

Callbacks?

RPC

REST

Hypermedia As the Engine of Application State (HATEOAS)

### Implementing Asynchronous Event-Based Collaboration

### Complexities of Asynchronous Architectures

### DRY and code reuse

### Access by reference

### Versioning

zzzz

### Summary

Prefer choreography over orchestration.

## Splitting the Monolith

### Example: Shared Static Data Country codes used by several services, options:

1, Db with them in for each service - data consistency challenge 2, Treat static data as code - property file or enum - same consistency challenge 3, Static data in a service. Page 160

### Transactional Boundaries

#### What to do? Eventual consistency is easier to build.

### Reporting

### Cost of Change

## Chapter 6 Deployment ## Chapter 7 Testing Mocking or stubbing - maybe my portal - azure tests are wrong (end-to-end tests?)

## Chapter 8 Monitoring ## Chapter 9 Security ## Chapter 10 Conway’s Law and System Design

Yawn

Pakt press books