O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Micro Services
Prasanna N Venkatesan
Developer with ThoughtWorks
http://prasans.info/blog @pvenk
Expect for…
Expect for…
•  What are Micro services?
•  Why we need a new pattern?
•  Implementing a Micro Service
•  When to use Micro...
Write programs that do one
thing and do it well.
Micro Services should be…
Small
• aka Simple
• In terms of LOC.
• In terms of memory footprint.
Micro Services should be…
Portable
Should be independent to deploy and run
Micro Services should be…
Performs one thing
Adding many functionality to one service
will break the other 2 characteristi...
Move the complexity to
Infrastructure
We've	
  pushed	
  a	
  lot	
  of	
  the	
  old	
  applica2on	
  complexity	
  down	...
Micro Services
A new Paradigm?
Small is beautiful
Make each
program do one
thing well.
Build a prototype as
soon as possible.
Choose portability
over effic...
Consumer-Driven
Contracts
Read	
  more	
  on:	
  h?p://mar2nfowler.com/ar2cles/consumerDrivenContracts.html	
  
• Provider Contracts
• Consumer Contracts
• Consumer Driven Contracts
•  Closed and complete
•  Singular and non­authoritative
•  Bounded stability and
immutability
Domain Driven Design
•  Project's	
  primary	
  focus	
  on	
  the	
  core	
  domain	
  
and	
  domain	
  logic.	
  
•  Complex	
  designs	
  b...
Communication	
  	
  
	
  
•  Mostly over HTTP and pass JSON between services.
•  If serialization or de-serialization is ...
Monitoring
•  More possibility of small services to
just fail and fade away.
•  Make sure services are running always
•  M...
Monitoring Tools
Testing Strategy
•  Tes2ng	
  Micro	
  Services	
  are	
  not	
  so	
  cri2cal.	
  
•  Preferably	
  have	
  health-­‐chec...
Where to use Micro Services
•  Independent, small process worthy to try out in
different stack.
•  Don’t want to break a le...
Implications
•  Understanding how everything fits together
•  Deployment
•  Interactions between components
•  Duplication ...
Microservices
Próximos SlideShares
Carregando em…5
×

Microservices

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

http://www.meetup.com/Jozi-JUG/events/118708272/

  • Entre para ver os comentários

Microservices

  1. 1. Micro Services
  2. 2. Prasanna N Venkatesan Developer with ThoughtWorks http://prasans.info/blog @pvenk
  3. 3. Expect for…
  4. 4. 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
  5. 5. Write programs that do one thing and do it well.
  6. 6. Micro Services should be… Small • aka Simple • In terms of LOC. • In terms of memory footprint.
  7. 7. Micro Services should be… Portable Should be independent to deploy and run
  8. 8. Micro Services should be… Performs one thing Adding many functionality to one service will break the other 2 characteristics.
  9. 9. 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.      
  10. 10. Micro Services A new Paradigm?
  11. 11. 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
  12. 12. Consumer-Driven Contracts Read  more  on:  h?p://mar2nfowler.com/ar2cles/consumerDrivenContracts.html  
  13. 13. • Provider Contracts • Consumer Contracts • Consumer Driven Contracts
  14. 14. •  Closed and complete •  Singular and non­authoritative •  Bounded stability and immutability
  15. 15. Domain Driven Design
  16. 16. •  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.  
  17. 17. 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.
  18. 18. Monitoring •  More possibility of small services to just fail and fade away. •  Make sure services are running always •  Monitor usage and increase instances
  19. 19. Monitoring Tools
  20. 20. Testing Strategy •  Tes2ng  Micro  Services  are  not  so  cri2cal.   •  Preferably  have  health-­‐check  tests    in  CI.  
  21. 21. Where to use Micro Services •  Independent, small process worthy to try out in different stack. •  Don’t want to break a legacy system.
  22. 22. Implications •  Understanding how everything fits together •  Deployment •  Interactions between components •  Duplication of code across the services

×