Slide 1

Slide 1 text

Microservices & Self- Contained Systems 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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

Components Collaborate Micro Service Micro Service Link Data Replication REST Messaging

Slide 8

Slide 8 text

Layered Microservices iOS Android Web Order Search Catalog Billing Customer Backend Backend Backend

Slide 9

Slide 9 text

Layered Microservices > Reusable Backend Services > Mobile client / Web App as frontend > Backend for frontend (BFF): Custom backend services > ...to implement frontend specific logic

Slide 10

Slide 10 text

Layered: Issues > BFF might contain the same logic – same processes > BFF might contain most relevant logic > Change to a business process means changing many services > Lots of communication

Slide 11

Slide 11 text

Self-contained System

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Cut Deployment monolith along domains …

Slide 14

Slide 14 text

… wrap domain in separate web application …

Slide 15

Slide 15 text

Self-contained System (SCS) – individually deployable

Slide 16

Slide 16 text

SCS = user interface+ business logic+ data storage

Slide 17

Slide 17 text

Each SCS contains all layers.

Slide 18

Slide 18 text

Self-contained Systems should be integrated in the web interface

Slide 19

Slide 19 text

Synchronous remote calls inside the business logic should be avoided.

Slide 20

Slide 20 text

Asynchronous Remote calls reduce dependencies and prevent error cascades.

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

Why create such a complex system?

Slide 25

Slide 25 text

Legacy Apps

Slide 26

Slide 26 text

HTTP New Stuff Links No legacy code Any technology J Small code base

Slide 27

Slide 27 text

Sustainable Development

Slide 28

Slide 28 text

Monoliths > Architecture rot > …not maintainable any more > …and can’t be rewritten / replaced

Slide 29

Slide 29 text

Microservices > Distributed system of small units > Architecture violations harder > Architecture won’t rot > Small units > Easy to replace > Service rotten? Replace!

Slide 30

Slide 30 text

Robust > One failing Microservice doesn’t crash the system > However, Microservices must deal with failing Microservices

Slide 31

Slide 31 text

Continuous Delivery

Slide 32

Slide 32 text

Principles behind the Agile Manifesto Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.

Slide 33

Slide 33 text

Deployment Monolith ECommerce System 3rd party systems Database

Slide 34

Slide 34 text

Continuous Delivery: Build Pipeline ECommerce System Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release

Slide 35

Slide 35 text

Build Pipeline: Problems > Complex infrastructure > Huge database > 3rd party integration > Slow feedback > Test everything for each commit > Huge deployment unit > Deployment slow

Slide 36

Slide 36 text

Microservices ECommerce System 3rd party systems Database

Slide 37

Slide 37 text

Microservices 3rd party systems Database Order Catalog Billing Search

Slide 38

Slide 38 text

Order Billing Customer Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release Commit Stage Automated Acceptance Testing Automated Capacity Testing Manual Explorative Testing Release

Slide 39

Slide 39 text

Build Pipeline for Microservices > Independent deployment > Build pipeline per Microservice > Smaller > Easier to set up > Less features (3rd party systems) > Faster Feedback: Less tests

Slide 40

Slide 40 text

Independent Scaling > Can scale each Microservice indenpendently > Much easier than for a Deployment Monolith

Slide 41

Slide 41 text

Technology Freedom > No meetings for introducing a bug fix in a library! > No big migration away from outdated technology > Easier experiments > Higher motivation

Slide 42

Slide 42 text

Scaling Agility

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

What is the problem?

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

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

Slide 48

Slide 48 text

Communication is great! Need more persons

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

Conway‘s Law Architecture copies communication structures of the organization

Slide 52

Slide 52 text

Logic UI Database Change Order Process!

Slide 53

Slide 53 text

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

Slide 54

Slide 54 text

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

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

Deployment Monolith Stories Technical Coordination Coordinating Releases

Slide 57

Slide 57 text

Self-contained System (SCS) – individually deployable

Slide 58

Slide 58 text

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

Slide 59

Slide 59 text

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

Slide 60

Slide 60 text

Why Microservices/SCS? Sustainable development speed Continuous Delivery Choose best technology for job! Handle Legacy more efficient Independent Scaling Robustness Scaling Agile

Slide 61

Slide 61 text

Conclusion

Slide 62

Slide 62 text

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

Slide 63

Slide 63 text

Thank You! @ewolff http://microservices-buch.de/ http://microservices-book.com/primer.html http://scs-architecture.org

Slide 64

Slide 64 text

EMail [email protected] to get: Slides + Microservices Primer + Sample Microservices Book + Sample of Continuous Delivery Book Powered by Amazon Lambda & Microservices