Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices - an intro

Microservices - an intro

My talk on Jozi JUG about MicroServices on June 24th 2013.

Avatar for Prasanna

Prasanna

June 24, 2013
Tweet

More Decks by Prasanna

Other Decks in Programming

Transcript

  1. Expect for… •  What are Micro services? •  Why we

    need a new pattern? •  Implementing a Micro Service •  When to use Micro Services •  Implications of using Micro Services
  2. Micro Services should be… Performs one thing Adding many functionality

    to one service will break the other 2 characteristics.
  3. Move the complexity to Infrastructure We've  pushed  a  lot  of

     the  old  applica2on  complexity  down  to  infrastructure  level.   We  are  no  longer  bound  to  a  single  stack  or  language.      
  4. Small is beautiful Make each program do one thing well.

    Build a prototype as soon as possible. Choose portability over efficiency. Use software leverage to your advantage. Make every program as filter. UNIX Philosophy
  5. •  Project's  primary  focus  on  the  core  domain   and

     domain  logic.   •  Complex  designs  based  on  a  model  of  the   domain.   •  Itera2vely  refine  a  conceptual  model  that   addresses  par2cular  domain  problems.  
  6. Communication       •  Mostly over HTTP and pass

    JSON between services. •  If serialization or de-serialization is expensive try something like ProtoBuf/MessagePack •  ProtoBuf - Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats.
  7. Monitoring •  More possibility of small services to just fail

    and fade away. •  Make sure services are running always •  Monitor usage and increase instances
  8. Testing Strategy •  Tes2ng  Micro  Services  are  not  so  cri2cal.

      •  Preferably  have  health-­‐check  tests    in  CI.  
  9. Where to use Micro Services •  Independent, small process worthy

    to try out in different stack. •  Don’t want to break a legacy system.
  10. Implications •  Understanding how everything fits together •  Deployment • 

    Interactions between components •  Duplication of code across the services