Top Banner
[email protected] New dress for the service emperor …or what are microservices really good for
38

Microservices or New dress for the service emperor

Jul 17, 2015

Download

Software

Martin Sjöblom
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: Microservices or New dress for the service emperor

[email protected]

New  dress  for  the  service  emperor

…or  what  are  microservices  really  good  for

Page 2: Microservices or New dress for the service emperor

[email protected]

∗ Software  development  in  more  or  less  all  roles  since  1991    

∗ I  like  to  program  in  most  languages  ∗ Military  systems  (REAL  systems  :-­‐)  for  about  10  years  

∗ …in  an  international  environment  ∗ …where  we  amongst  other  things  developed  a  Service  Oriented  Infrastructure  

∗ …based  on  ideas  like  microservices

Me,  myself  and  I

Page 3: Microservices or New dress for the service emperor

[email protected]

∗ A  technology  to  solve  all  problems  ∗ A  flame  bait  for  nerds  ∗ The  new  new  black  ∗ All  or  nothing  of  the  above

What  are  microservices?

Page 4: Microservices or New dress for the service emperor

[email protected]

∗ Understand  what  micro  services  are  ∗ Showing  examples  ∗ Make  You  actively  think  when  to  use  it  ∗ Show  dynamic  configuration  

Goal  of  presentation

Page 6: Microservices or New dress for the service emperor

[email protected]

Microservices  according  to  god

Page 7: Microservices or New dress for the service emperor

[email protected]

SOA  Basics

Producer ConsumerSe

rvic

e

Page 8: Microservices or New dress for the service emperor

[email protected]

API  !=  Service

System A System BA-

>B Ser

vice

Page 9: Microservices or New dress for the service emperor

[email protected]

API  !=  Service

Radar UIPl

ots

with

pos

and

Sym

bol

Page 10: Microservices or New dress for the service emperor

[email protected]

API  !=  Service

Radar UIId

Pos

Sym

bol

Page 11: Microservices or New dress for the service emperor

[email protected]

API  !=  Service

Radar

UIId

Pos

Sym

bol

Symbol Server

Page 12: Microservices or New dress for the service emperor

[email protected]

Define  the  right  services

Page 13: Microservices or New dress for the service emperor

[email protected]

Demo  1

Number DisplayNu

m S

ervi

ce

Page 14: Microservices or New dress for the service emperor

[email protected]

So  where  are  the  services?

Page 15: Microservices or New dress for the service emperor

[email protected]

String urlString = ”http://soa.com//service-call”; URL url = new URL(urlString);

Hardcoded?

Only  works  for  really  static  systems!

Page 17: Microservices or New dress for the service emperor

[email protected]

Zero-­‐configuration  ∗ mDNS  ∗ Apple  Bonjour  ∗ DNS/DNS-­‐SD  ∗ UPnP  SSDP  ∗ SLP  

Other  solutions  ∗ Apache’s  ZooKeeper  ∗ Eureka  ∗ etcd

Service  Registry

Page 18: Microservices or New dress for the service emperor

[email protected]

The  holy  trinity

Producer Consumer

Serv

ice

Service Registry

Page 19: Microservices or New dress for the service emperor

[email protected]

Demo  2

Producer Consumer

Service Registry

Page 20: Microservices or New dress for the service emperor

[email protected]

Chaining  services  and  systems  of  systems

Page 21: Microservices or New dress for the service emperor

[email protected]

Demo  3

Number generator

Screen

LEDReverse Number

Page 22: Microservices or New dress for the service emperor

[email protected]

From  task  to  services

Ability 1

Ability 3

Ability 2

Service a

Service d

Service b

Service c

Task

Page 23: Microservices or New dress for the service emperor

[email protected]

10

Service a

Service d

Service b

Service c

1

3 4

6

5

7

8

9

11

12

2 The  system  is  configured

Page 24: Microservices or New dress for the service emperor

[email protected]

Goal

Ability 1

Ability 3

Ability 2

Service a

Service d

Service b

Service c

10

1

3

4

6 7

8 9

11

12

2

Mgmt

Task

Page 25: Microservices or New dress for the service emperor

[email protected]

Difference  SOA  &  Msg  Passing

Producer Consumer

Page 26: Microservices or New dress for the service emperor

[email protected]

Difference  SOA  &  Msg  Passing

Producer ConsumerSe

rvic

e

Quality Location

Page 27: Microservices or New dress for the service emperor

[email protected]

Why  micro  services?

Page 28: Microservices or New dress for the service emperor

[email protected]

Why  micro  services?

Page 29: Microservices or New dress for the service emperor

[email protected]

∗Test  ∗What  to  scale  ∗When  change  ∗Re-­‐use

Why  micro  services?

Page 30: Microservices or New dress for the service emperor

[email protected]

∗ 10  systems  99.9  =>  99.0  ∗ 10  systems  99.0  =>  90.4

On  the  other  hand

∗ 30  systems  99.9  =>  97.0  ∗ 30  systems  99.0  =>  74.0

Page 31: Microservices or New dress for the service emperor

[email protected]

On  the  other  hand

Page 32: Microservices or New dress for the service emperor

[email protected]

On  the  other  hand

Page 33: Microservices or New dress for the service emperor

[email protected]

Don’t  map  today  to  tomorrow

Page 34: Microservices or New dress for the service emperor

[email protected]

Don’t  map  today  to  tomorrow

Page 35: Microservices or New dress for the service emperor

[email protected]

But,  everybody  does  it!

Microservice  envy  

NEW  ●  Hold  January  2015  

We  remain  convinced  that  microservices  can  offer  significant  advantages  to  organizations,  in  terms  of  improving  team  autonomy  and  faster  frequency  of  change.  The  additional  complexity  that  comes  from  distributed  systems  requires  an  additional  level  of  maturity  and  investment.  We  are  concerned  that  some  teams  are  rushing  in  to  adopting  microservices  without  understanding  the  changes  to  development,  test,  and  operations  that  are  required  to  do  them  well.  Our  general  advice  remains  simple.  Avoid  microservice  envy  and  start  with  one  or  two  services  before  rushing  headlong  into  developing  more,  to  allow  your  teams  time  to  adjust  and  understand  the  right  level  of  granularity.

Page 36: Microservices or New dress for the service emperor

[email protected]

What  you  need  to  do

Page 37: Microservices or New dress for the service emperor

[email protected]

What  you  need  to  do