Microservices or New dress for the service emperor

Post on 17-Jul-2015

69 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

Transcript

martin@sjoblom.se

New  dress  for  the  service  emperor

…or  what  are  microservices  really  good  for

martin@sjoblom.se

∗ 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

martin@sjoblom.se

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

What  are  microservices?

martin@sjoblom.se

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

Goal  of  presentation

martin@sjoblom.se

Definition

martin@sjoblom.se

Microservices  according  to  god

martin@sjoblom.se

SOA  Basics

Producer ConsumerSe

rvic

e

martin@sjoblom.se

API  !=  Service

System A System BA-

>B Ser

vice

martin@sjoblom.se

API  !=  Service

Radar UIPl

ots

with

pos

and

Sym

bol

martin@sjoblom.se

API  !=  Service

Radar UIId

Pos

Sym

bol

martin@sjoblom.se

API  !=  Service

Radar

UIId

Pos

Sym

bol

Symbol Server

martin@sjoblom.se

Define  the  right  services

martin@sjoblom.se

Demo  1

Number DisplayNu

m S

ervi

ce

martin@sjoblom.se

So  where  are  the  services?

martin@sjoblom.se

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

Hardcoded?

Only  works  for  really  static  systems!

martin@sjoblom.se

UDDI!

martin@sjoblom.se

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

Other  solutions  ∗ Apache’s  ZooKeeper  ∗ Eureka  ∗ etcd

Service  Registry

martin@sjoblom.se

The  holy  trinity

Producer Consumer

Serv

ice

Service Registry

martin@sjoblom.se

Demo  2

Producer Consumer

Service Registry

martin@sjoblom.se

Chaining  services  and  systems  of  systems

martin@sjoblom.se

Demo  3

Number generator

Screen

LEDReverse Number

martin@sjoblom.se

From  task  to  services

Ability 1

Ability 3

Ability 2

Service a

Service d

Service b

Service c

Task

martin@sjoblom.se

10

Service a

Service d

Service b

Service c

1

3 4

6

5

7

8

9

11

12

2 The  system  is  configured

martin@sjoblom.se

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

martin@sjoblom.se

Difference  SOA  &  Msg  Passing

Producer Consumer

martin@sjoblom.se

Difference  SOA  &  Msg  Passing

Producer ConsumerSe

rvic

e

Quality Location

martin@sjoblom.se

Why  micro  services?

martin@sjoblom.se

Why  micro  services?

martin@sjoblom.se

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

Why  micro  services?

martin@sjoblom.se

∗ 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

martin@sjoblom.se

On  the  other  hand

martin@sjoblom.se

On  the  other  hand

martin@sjoblom.se

Don’t  map  today  to  tomorrow

martin@sjoblom.se

Don’t  map  today  to  tomorrow

martin@sjoblom.se

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.

martin@sjoblom.se

What  you  need  to  do

martin@sjoblom.se

What  you  need  to  do

martin@sjoblom.se

Final  words

top related