Slide 1

Slide 1 text

Microservices: Architecture to Scale Agile Eberhard Wolff Fellow, innoQ @ewolff

Slide 2

Slide 2 text

http://continuous-delivery-buch.de/

Slide 3

Slide 3 text

http://microservices-buch.de/ http://microservices-book.com/

Slide 4

Slide 4 text

http://microservices-book.com/primer.html FREE!!!!

Slide 5

Slide 5 text

> Microservices > Agility > Self-contained Systems > SCS to scale agile

Slide 6

Slide 6 text

Microservices

Slide 7

Slide 7 text

Server Server Microservices: Definition > Independent deployment units > E.g. process, VMs, Docker containers > Any technology > Any infrastructure Micro Service Micro Service

Slide 8

Slide 8 text

Components Collaborate Micro Service Micro Service Link Data Replication REST Messaging

Slide 9

Slide 9 text

Possible Microservices Architecture iOS Android Web Order Search Catalog Billing Customer Backend Backend Backend

Slide 10

Slide 10 text

Real-World Example > Team = one person > Microservices-based system > Reasons > Fast and easy deployment > Clear separation

Slide 11

Slide 11 text

Microservices can do more than scaling agile!

Slide 12

Slide 12 text

Agility

Slide 13

Slide 13 text

Iterations > Work in iterations > Not following a fixed plan > “Waterfall” paper 1970 (Royce): Do it twice! > I.e. iterations are a well- known idea for very long

Slide 14

Slide 14 text

No Iterations Goal Goal

Slide 15

Slide 15 text

Iterations Goal Goal Goal Goal

Slide 16

Slide 16 text

Cross-functional Team > Need lots of skill to develop features > Have all skills in the team > Direct communication is better

Slide 17

Slide 17 text

Self Organization > Team knows best how to solve problems > Let them decide

Slide 18

Slide 18 text

Scaling

Slide 19

Slide 19 text

Scaling > Do more > Get more stories implemented > ...and running in production TODO IN PROGRESS DONE

Slide 20

Slide 20 text

Scaling > Do more > Add more people > Let the work in parallel > Build more teams

Slide 21

Slide 21 text

Organizational Approaches Scrum of Scrums Scaled Agile Framework (SAFe) Large Scale Scrum( LeSS) Agile Path

Slide 22

Slide 22 text

Organizational Approaches Scrum of Scrums Scaled Agile Framework (SAFe) Large Scale Scrum( LeSS) Agile Path Not my expertise

Slide 23

Slide 23 text

Communication > Agile means communication > Instead of written requirements > ...story cards > + direct communication

Slide 24

Slide 24 text

# Persons vs. Potential Links

Slide 25

Slide 25 text

# Persons vs. Potential Links 0 100 200 300 0 10 20 30

Slide 26

Slide 26 text

Communication is great! Need more persons

Slide 27

Slide 27 text

Depedencies and Coordination are Problems!

Slide 28

Slide 28 text

Dependencies > Feature across teams > Team must wait for other teams‘ results

Slide 29

Slide 29 text

time Team Sprint Team Sprint Team Sprint 3 sprints

Slide 30

Slide 30 text

Functionalities Technology and Architecture What Do You Communicate About? Releases

Slide 31

Slide 31 text

Can we limit the need for communication?

Slide 32

Slide 32 text

Challenges for Scaling Agile > Dependencies cause delays > Too much communication about functionalities... > ...releasing software, > ...and technologies

Slide 33

Slide 33 text

Self-contained System

Slide 34

Slide 34 text

Deployment monolith Graphics by Roman Stranghöhner, innoQ http://scs-architecture.org

Slide 35

Slide 35 text

Cut Deployment monolith along domains …

Slide 36

Slide 36 text

… wrap domain in separate web application …

Slide 37

Slide 37 text

Self-contained System (SCS) – individually deployable

Slide 38

Slide 38 text

SCS = user interface+ business logic+ data storage

Slide 39

Slide 39 text

Web user interface

Slide 40

Slide 40 text

optional API e.g. for mobile

Slide 41

Slide 41 text

Self-contained Systems should be integrated in the web interface

Slide 42

Slide 42 text

Hyperlinks to navigate between systems. System 1 System 2

Slide 43

Slide 43 text

Dynamic inclusion of content served by another application System 1 System 2

Slide 44

Slide 44 text

Logic only shared over a well defined interface.

Slide 45

Slide 45 text

Business logic can consist of microservices

Slide 46

Slide 46 text

Avoid synchronous remote calls

Slide 47

Slide 47 text

Remote API calls should be asynchronous

Slide 48

Slide 48 text

Every SCS brings its own data storage with its own (potentially redundant) data

Slide 49

Slide 49 text

Technical decisions can be made independently from other systems (programming language, frameworks, tooling, platform)

Slide 50

Slide 50 text

Domained scoped SCS enables the development, operation and maintenance of an domain by a single team. Team 1 Team 2 Team 3

Slide 51

Slide 51 text

1 SCS = 1 Domain = 1 Web App = 1 Team = 1-n Microservices

Slide 52

Slide 52 text

SCS? iOS Android Web Order Search Catalog Billing Customer Backend Backend Backend

Slide 53

Slide 53 text

SCS? iOS Android Web Order Search Catalog Billing Customer Backend Backend Backend

Slide 54

Slide 54 text

SCS to Scale Agile

Slide 55

Slide 55 text

Challenges for Scaling Agile > Dependencies cause delays > Too much communication about functionalities... > ...releasing software, > ...and technologies

Slide 56

Slide 56 text

Challenges for Scaling Agile > Dependencies cause delays > Too much communication about functionalities... > ...releasing software, > ...and technologies

Slide 57

Slide 57 text

Conway‘s Law Architecture copies communication structures of the organization

Slide 58

Slide 58 text

Conway‘s Law: Impact Architecture and communication structures in the organization are the same thing.

Slide 59

Slide 59 text

Conway’s Law as a Limit > Organization drives architecture > Teams of experts > i.e. UI, logic & database team > Three technical artifacts

Slide 60

Slide 60 text

Logic UI Database Change Order Process!

Slide 61

Slide 61 text

time DB Team Sprint Logic Team Sprint GUI Team Sprint 3 sprints

Slide 62

Slide 62 text

Domained scoped SCS enables the development of a domain by a single team – no coordination Order Team = UI+Logic+Database

Slide 63

Slide 63 text

Challenges for Scaling Agile > Dependencies cause delays > Too much communication about functionalities... > ...releasing software, > ...and technologies

Slide 64

Slide 64 text

Deployment Monolith Stories Technical Coordination Coordinating Releases

Slide 65

Slide 65 text

Self-contained System (SCS) – individually deployable

Slide 66

Slide 66 text

Technical decisions can be made independently from other systems (programming language, frameworks, tooling, platform)

Slide 67

Slide 67 text

SCS Stories Technical Coordination Stories Technical Coordination Stories Technical Coordination Order Billing Search Release Release Release

Slide 68

Slide 68 text

Impact on Teams > More self-organization > Decide about technologies, releases etc. > Need to be more cross- functional > E.g. ops skills become more important

Slide 69

Slide 69 text

Conclusion

Slide 70

Slide 70 text

How to scale agile?

Slide 71

Slide 71 text

Define architecture to limit communication needs

Slide 72

Slide 72 text

Conclusion: SCS & Microservices > Microservices have many advantages > SCS are a way to use Microservices > …for large projects > …to scale agile

Slide 73

Slide 73 text

Conclusion: SCS & Agility > Domain in one SCS > less dependencies > less delays > less communication about functionalities > Technological freedom > less communication about technologies > Independent releases > no need to coordinate releases

Slide 74

Slide 74 text

Challenges

Slide 75

Slide 75 text

Challenges > UI integration > ...in particular for mobile / Single Page App > Architecture more important > Architecture = organization

Slide 76

Slide 76 text

Meta-Conclusion

Slide 77

Slide 77 text

How To Think About Architecture > Process has an impact on architecture > Software architecture & organization are the same

Slide 78

Slide 78 text

Thank You! @ewolff http://scs-architecture.org (Creative Commons)