api thinking - how to design apis through systems design

23
API Thinking James Higginbotham API Architect @launchany

Upload: launchany

Post on 11-Jan-2017

1.281 views

Category:

Software


0 download

TRANSCRIPT

Page 1: API Thinking - How to Design APIs Through Systems Design

API  Thinking  

James  Higginbotham  API  Architect  @launchany  

Page 2: API Thinking - How to Design APIs Through Systems Design

“I  say  this  constantly:  ‘your  API  design  should  become  the  

defini:on  of  your  new  target  architecture’  “  -­‐  @jharmn  

Page 3: API Thinking - How to Design APIs Through Systems Design

I  ask:    “What  are  your  resources?”  

Page 4: API Thinking - How to Design APIs Through Systems Design

Their  answer:    “How  do  I  figure  out  what  

resources  I  need?”  

Page 5: API Thinking - How to Design APIs Through Systems Design

“We  have  a  monolithic  app,  but  we  are  in  the  process  of  

redesigning  it.”  

Page 6: API Thinking - How to Design APIs Through Systems Design

Microservice  everything!  Containerize  it  all!  

Page 7: API Thinking - How to Design APIs Through Systems Design

Maybe.  Maybe  not.  

Page 8: API Thinking - How to Design APIs Through Systems Design

First,  we  need  to  be  able  to  look  at  our  soPware  systems  in  a  

“fresh,  old  way”  

Page 9: API Thinking - How to Design APIs Through Systems Design

Domain  Modeling  to  find  business  en::es,  rela:ons,  state  transi:ons,  and  events  (Domain-­‐Driven  Design)  

Page 10: API Thinking - How to Design APIs Through Systems Design

Systems:  Solu:on  to  Problem(s)  Subsystems:  Bounded  Concerns  Modules:  Atoms  for  Composi:on  

Page 11: API Thinking - How to Design APIs Through Systems Design

Automo:ve  Systems  

u  Engine  –  Intake  – Exhaust  – Fuel  System  – Valve  Train  

u Drive  Train  u  Braking  System  u …  

Page 12: API Thinking - How to Design APIs Through Systems Design

Third-­‐party  APIs  may  replace  modules,  subsystems,  or  even  

en:re  systems  

Page 13: API Thinking - How to Design APIs Through Systems Design

Once  we  understand  our  logical  architecture,  we  can  determine  

the  op:on(s)  to  realize  it.    

Page 14: API Thinking - How to Design APIs Through Systems Design

Our  API  resources  and  product  boundaries  become  more  apparent  

as  well,  including  where  client  responsibility  starts  and  stops.  

Page 15: API Thinking - How to Design APIs Through Systems Design

Systems  =  Solu:ons  Subsystems  =  Resources/Groups  

Modules  =  Endpoints  

Page 16: API Thinking - How to Design APIs Through Systems Design

What  might  this  look  like?  

Page 17: API Thinking - How to Design APIs Through Systems Design

Subsystems:  Account  Management,  Inventory  Management,  Customer  Management,  Ecommerce,  Billing,  

Analy:cs/Repor:ng  

Page 18: API Thinking - How to Design APIs Through Systems Design

Each  subsystem  has  an  API  that  exposes  one  or  more  endpoints.    

Page 19: API Thinking - How to Design APIs Through Systems Design

We  can  then  select  the  right  architectural  styles  we  need  to  

realize  our  subsystems…  

Page 20: API Thinking - How to Design APIs Through Systems Design

-­‐  Client/Server  -­‐  Service-­‐oriented  -­‐  Message-­‐oriented  -­‐  Event-­‐driven  -­‐  Pipe  and  Filter  -­‐  Yes,  even  microservices    

Page 21: API Thinking - How to Design APIs Through Systems Design

“If  the  ranks  of  programmers  has  doubled  every  five  years,  then  it  

stands  to  reason  that  most  programmers  were  hired  within  the  last  five  years”  –  Robert  C.  Mar:n  

hDp://blog.cleancoder.com/uncle-­‐bob/2014/06/20/MyLawn.html  

Page 22: API Thinking - How to Design APIs Through Systems Design

I’m  on  a  mission  to  help  teams  re-­‐think  the  way  they  architect  their  soPware,  resul:ng  in  

be`er  API  designs  and  products.    

Page 23: API Thinking - How to Design APIs Through Systems Design

James  Higginbotham  [email protected]  hDp://launchany.com    

@launchany