Top Banner
Micro Services Neither Micro nor Service? Eberhard Wolff Freelancer Head Technology Advisory Board adesso AG http://ewolff.com
52

Micro Services - Neither Micro Nor Service

Aug 20, 2015

Download

Technology

Eberhard Wolff
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Micro Services - Neither Micro Nor Service

Micro Services Neither Micro nor Service?

Eberhard Wolff Freelancer

Head Technology Advisory Board adesso AG

http://ewolff.com

Page 2: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Architecture of Enterprise

Java Apps

Page 3: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Page 4: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Page 5: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

How can I implement a

new feature???

Page 6: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff L

Page 7: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

ECommerce System

Spring & OSGi

New Stuff

Page 8: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

New Stuff Spring & OSGi

New Stuff

ECommerce System

Page 9: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

HTTP

New Stuff

Links

No legacy code Any technology

J Small code base

Page 10: Micro Services - Neither Micro Nor Service

Little programs are delightful to write in

isolation, but the process of

maintaining large-scale software is always

miserable.

Jaron Lanier

Page 11: Micro Services - Neither Micro Nor Service

Friedenspreis des deutschen Buchhandels

Page 12: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Services: Definition •  Small •  Independent deployment units •  i.e. processes

•  Any technology •  Any infrastructure

Micro Service

Server

Micro Service

Server

Page 13: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Components Collaborate

Micro Service

Micro Service

Link

Data Replication

REST Messaging

Page 14: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Why Micro Services? •  Strong modularization •  Small deployment units •  Faster & easier deployment •  Continuous Delivery •  Less risk in deployment •  Choose best technology for each

service

Page 15: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Service =

Micro?

Page 16: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

10-100LOChttp://yobriefca.se/blog/ 2013/04/28/micro-service-architecture/

Smaller modules =better

Page 17: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

10-100LOChttp://yobriefca.se/blog/ 2013/04/28/micro-service-architecture/

Smaller modules =better

Page 18: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Game of Life

Page 19: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

life←{ ⍝ John Conway's "Game of Life". ↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵ ⍝ Expression for next generation. }

Game of Life in one line of APL

dyalog.com LOC is really a bad metric

Page 20: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Larger? •  Micro Services have an overhead

•  Build & deployment pipeline

•  Version control

Page 21: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

1st Law of Distributed Objects •  Don’t Distribute Your Objects! •  Too much remote communication &

overhead •  Lesson learned from CORBA etc

•  http://martinfowler.com/bliki/FirstLaw.html

Page 22: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Request

Response

Processing

Latency Round Trip: 0,2-0,5 ms = 600.000-1.500.000 instructions@3GHz

Page 23: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

1st Law of Distributed Objects & Micro Services

•  Small Micro Services mean a lot of communication

•  Violate the 1st Law •  Seems to work, though

•  http://martinfowler.com/articles/distributed-objects-microservices.html

Page 24: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Too small = too much

communication

Page 25: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff L

Page 26: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Again: Why Micro Services?

Page 27: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

The main reason

Page 28: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

How to scale agile?

Implement more feature

Page 29: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conways Law

Architecture copies

communication structures of the organization

Page 30: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conway’s Law as a Limit •  Won’t be able to create an

architecture different from your organization

•  I.e. mobile, GUI & database team •  Three technical artifacts

Page 31: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conway’s Law as an Enabler •  Desired architecture =

project structure •  Team for each Micro Service •  Team should be responsible for

meaningful features •  Ideal: Independent features

Page 32: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

On team can build and

deploy features –

independently!

Page 33: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Services must provide a sensible set of functionality

Page 34: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conway’s Law & Size •  Upper limit: What a (small) team

can handle

•  …and a meaningful set of features •  Probably not too small •  Lower limit: Depends on overhead /

technology

Page 35: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Service = Micro? •  Size doesn’t matter too much

•  Teams must be able to work independently

•  Small enough for one team •  Not too much overhead

Page 36: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Service =

Service?

Page 37: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Services=

SOA?

Page 38: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Service? unassociated

loosely coupled units of functionality

that are self-contained (Wikipedia, SOA)

Page 39: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

SOA

CRM Order

Service

Service

Service

Service

Service

Service

Service

Service

Portal / Web

Integration

Page 40: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

SOA •  Enterprise wide effort •  Services provided by different

organizational units •  Large monolithic deployments •  …offer multiple services •  Enterprise-wide integration •  Portal / Web as universal GUI for all

services

Page 41: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

SOA Service •  Just one interface of a large

monolith

•  No GUI

•  Different projects for different services

Page 42: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Services CRM

Forecast

Mass EMailing

Reporting

Web Tracking

Integration

Page 43: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

SOA vs. Micro Services •  Technology: Similar •  i.e. integration

•  But: Smaller deployment units

Page 44: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Micro Services just structure the application

Like JARs etc.

Page 45: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

GUI for Micro Services •  Meaningful features will need a GUI •  Customer talks to one team for GUI

& logic •  Less communication •  1st Law of Distributed Objects

Page 46: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

SOA •  Enterprise wide

effort •  Services provided

by different organizational units

•  Large monolithic deployments

•  …offer multiple services

•  Just one project

•  Services provided by one team

•  Small deployments •  …offer one service

each

Micro Services

Page 47: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

SOA •  Enterprise wide

integration

•  Portal / Web as universal GUI for all services

•  Just one project •  Each

component has its own GUI

Micro Services

Page 48: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conclusion

Page 49: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conclusion: Micro Services •  Micro Services are a new way of

modularization •  More technological freedom •  Easier, faster and less risky

deployment

Page 50: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conclusion: Micro •  Size not too important

•  Meaningful set of features

•  Smaller than SOA services

Page 51: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Conclusion: Service •  Modules of an application •  Include GUI •  Provide not just an interface to call

•  Structure one project •  …not the Enterprise IT

Page 52: Micro Services - Neither Micro Nor Service

Eberhard Wolff - @ewolff

Thank You!