{Nano|Micro|Mini}-Services? Modularization for Sustainable Systems - - PowerPoint PPT Presentation

nano micro mini services modularization for sustainable
SMART_READER_LITE
LIVE PREVIEW

{Nano|Micro|Mini}-Services? Modularization for Sustainable Systems - - PowerPoint PPT Presentation

{Nano|Micro|Mini}-Services? Modularization for Sustainable Systems Stefan Tilkov | innoQ stefan.tilkov@innoq.com @stilkov http://microxchg.io 1. Reviewing architectures Generic Architecture Review Results Deployment is Building way too


slide-1
SLIDE 1

{Nano|Micro|Mini}-Services? Modularization for Sustainable Systems

Stefan Tilkov | innoQ stefan.tilkov@innoq.com @stilkov

slide-2
SLIDE 2

http://microxchg.io

slide-3
SLIDE 3
  • 1. Reviewing architectures
slide-4
SLIDE 4

Generic Architecture Review Results

Building features takes too long Technical debt is well-known and not addressed Deployment is way too complicated and slow Replacement would be way too expensive Scalability has reached its limit Architectural quality has degraded “-ility” problems abound

slide-5
SLIDE 5

Any architecture’s quality is inversely proportional to the number of bottlenecks limiting its evolution, development, and operations

slide-6
SLIDE 6

«Insert Obligatory Conway Reference Here»

slide-7
SLIDE 7

Conway’s Law

“Organizations which design systems are constrained to produce systems which are copies of the communication structures of these organizations.” – M.E. Conway

Organization → Architecture

slide-8
SLIDE 8

Reversal 1

Any particular architecture approach constraints organizational options – i.e. makes some organizational models simple and others hard to implement.

Organization ← Architecture

slide-9
SLIDE 9

Reversal 2

Choosing a particular architecture can be a means of optimizing for a desired

  • rganizational structure.

Organization ← Architecture

slide-10
SLIDE 10
  • 2. System boundaries
slide-11
SLIDE 11

Modularization

Legacy System New System New System

slide-12
SLIDE 12

New System

Consolidation

Legacy System Legacy System

slide-13
SLIDE 13

New System Legacy System

Modernization

slide-14
SLIDE 14

New System

Greenfjeld

Project scope

slide-15
SLIDE 15

1 Project = 1 System?

slide-16
SLIDE 16

Size Modularization 1-50 LOC single fjle 50-500 LOC few fjles, few functions 500-1000 LOC Library, class hierarchy 1000-2000 LOC Framework + application >2000 LOC multiple applications

slide-17
SLIDE 17

System Characteristics

Separate (redundant) persistence Internal, separate logic Domain models & implementation strategies Separate UI Separate development & evolution Limited interaction with other systems Autonomous deployment and operations

slide-18
SLIDE 18

Macro (technical) architecture Domain architecture

slide-19
SLIDE 19

JRuby C# Scala Groovy
 Java Clojure

slide-20
SLIDE 20

RDBMS NoSQL K/V RDBMS RDBMS/DWH NoSQL
 DocDB

slide-21
SLIDE 21

RDBMS NoSQL K/V RDBMS RDBMS/DWH NoSQL
 DocDB

Micro architecture

slide-22
SLIDE 22

Persistence Logic UI Module A Module B Module C

slide-23
SLIDE 23

System A Persistence Logic UI System B Persistence Logic UI System C Persistence Logic UI

slide-24
SLIDE 24

Assumptions to be challenged

Large systems with a single environment Separation internal/external Predictable non-functional requirements Clear & distinct roles Planned releases Built because they have to be

slide-25
SLIDE 25

http:/ /12factor.net

slide-26
SLIDE 26

Separate, runnable process Accessible via standard ports & protocols Shared-nothing model Horizontal scaling Fast startup & recovery

App characteristics

slide-27
SLIDE 27

Microservice Characteristics

small each running in its own process lightweight communicating mechanisms (ofuen HTTP) built around business capabilities independently deployable minimum of centralized management may be written in difgerent programming languages may use difgerent data storage technologies

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

slide-28
SLIDE 28

System Characteristics

Separate (redundant) persistence Internal, separate logic Domain models & implementation strategies Separate UI Separate development & evolution Limited interaction with other systems Autonomous deployment and operations

slide-29
SLIDE 29

In search for a name …

Not-so-micro-service Autonomous system Full-stack service Self-sufficient component Small system Sovereign system Independent system Cohesive system Large enough system Small enough system Logical node Domain unit Bounded system Executable component System Self-contained system

slide-30
SLIDE 30

Self-Contained System (SCS)

slide-31
SLIDE 31

SCS Characteristics

Autonomous web application Owned by one team No sync remote calls Service API optional Includes data and logic No shared UI No or pull-based code sharing only

slide-32
SLIDE 32

SCS App Microservice Size (kLoC) 1-50 0.5-10 0.1-? State Self-contained External Self-contained # per Logical System 5-25 >50 >100 Communication between units No (if possible) ? Yes UI Included Included External (?) UI Integration Yes (web-based) ? ?

slide-33
SLIDE 33

But why?

slide-34
SLIDE 34

Isolation

slide-35
SLIDE 35

(Independent) Scalability

slide-36
SLIDE 36

Localized decisions

slide-37
SLIDE 37

Replaceability

slide-38
SLIDE 38

Playground efgect

slide-39
SLIDE 39

Afraid of chaos?

slide-40
SLIDE 40

Necessary Rules & Guidelines

Cross-system System-internal

Responsibilities Programming languages UI integration Development tools Communication protocols Frameworks Data formats Process/Workflow control Redundant data Persistence BI interfaces Design patterns Logging, Monitoring Coding guidelines

slide-41
SLIDE 41

Web-native front-end integration

slide-42
SLIDE 42

Browser

HTML Page

Backend 1

UI 1 UI 2

Server-side integration

Backend 2 Frontend
 Server Examples: ESI-Caches SSI Portal Server

slide-43
SLIDE 43

Browser

HTML Page

Backend 1

UI 1 UI 2

Client-side integration

Backend 2 Examples: AJAX Proprietary Frameworks

slide-44
SLIDE 44

Browser

HTML Page 1

Links

Backend 1 Backend 2 Asset Server

HTML Page 2 CSS

<<creates>> <<creates>>

slide-45
SLIDE 45

Development Deployment Storage Backend call Edge integration

Server-side integration options

ESI Homegrown (Portal server) Build tools Chef, Puppet, … Asset pipeline Git/SVN submodules Gems Maven artifacts DB replication Feeds RPC REST RMI WS-*

slide-46
SLIDE 46

Link Replaced link

Client-side integration options

Client call

Magical integration concept Unobtrusive JS ROCA-style

  • Embed

SPA-style JS Widgets

slide-47
SLIDE 47

Explicitly design system boundaries Modularize into independent, self-contained systems Separate micro and macro architectures Be aware of changing quality goals Strike a balance between control and decentralization

Summary

slide-48
SLIDE 48

Thank you! Questions? Comments?

Stefan Tilkov, @stilkov stefan.tilkov@innoq.com http:/ /www.innoq.com/blog/st/ Phone: +49 170 471 2625

innoQ Deutschland GmbH

  • Krischerstr. 100

40789 Monheim am Rhein Germany Phone: +49 2173 3366-0 innoQ Schweiz GmbH

  • Gewerbestr. 11

CH-6330 Cham Switzerland Phone: +41 41 743 0116

www.innoq.com

Ohlauer Straße 43 10999 Berlin Germany Phone: +49 2173 3366-0 Robert-Bosch-Straße 7 64293 Darmstadt Germany Phone: +49 2173 3366-0 Radlkoferstraße 2 D-81373 München Germany Telefon +49 (0) 89 741185-270