micro services, yotta benefits

micro services, yotta benefits

Understand how micro-services can help you create timeless software. Presented at XConf Gurgaon 2014.

E2143258b0228b454fa4b63d406243f3?s=128

Avinash Chugh

April 26, 2014
Tweet

Transcript

  1. MICRO SERVICES, YOTTA BENEFITS Working towards lean, adaptive software 1

  2. WE GET ‘FUNCTIONAL DECOMPOSITION’ 2

  3. WE GET ‘SINGLE RESPONSIBILITY’ 3 A class should have only

    one reason to change
  4. WE GET ‘SMALL’ 4

  5. HOW CAN SOFTWARE DEFY AGING? 5 Think of software as

    a living organism, an intelligent collection of cells each earmarked for one particular job but evolving over time, ensuring the organism stays fresh and can recover from disease.
  6. THE CLASSIC MONOLITH 6

  7. A LESS IMPRESSIVE ONE 7 Putting all your eggs in

    one basket
  8. WHAT’S WRONG WITH IT? 8 ▪ Single process ▪ Too

    many concepts ▪ The dependency graph ▪ Aversion to change/upgrade ▪ Kills productivity ▪ Impedes continuous delivery ▪ Too many cooks
  9. PRINCIPLES - INFRASTRUCTURE FIRST 9 Pace of change above ground

    needs to be matched by investments below ground
  10. PRINCIPLES - THE UNIX PHILOSOPHY 10 Write programs that do

    one thing well. Write programs that work together. cat | grep | sed | awk ...
  11. PRINCIPLES - SMALLER HAYSTACKS 11 Smaller haystacks, for when you

    need to find the needle
  12. PRINCIPLES - YOU BUILD IT, YOU RUN IT 12 The

    best way to completely automate operations is to have to developers be responsible for running the software they develop. ... It also brings developers into direct contact with customers and a very effective feedback loop starts. -Werner Vogels
  13. WHAT IS A MICRO SERVICE? ▪ Small ▪ Independent ▪

    Replaceable ▪ Dedicated process ▪ Free of side-effects ▪ Easily consumable ▪ Testable (valuable?) ▪ Free of temporal coupling ▪ Fast to startup 13
  14. PARTS SALES VARIANCE 14 pscs-web security core business-rules jobs organization

    inventory accounting internal external
  15. EXPECTED BENEFITS ▪ Code reuse ▪ Database agnostic ▪ Responsibilities

    first ▪ Faster feedback ▪ Higher productivity ▪ Replaceable ▪ Better supportability ▪ Team scaling 15
  16. THE TECHNOLOGY STACK ▪ AngularJS ▪ Spring MVC ▪ Jackson

    ▪ Quartz ▪ Metrics ▪ MySQL - 16
  17. WEB APP CONCERNS ▪ Authenticate ▪ Authorize ▪ Audit ▪

    Orchestrate ▪ Mash - 17 pscs-web
  18. THE BASICS STILL APPLY ▪ SOLID ▪ Domain-driven design ▪

    RESTful APIs ▪ Automated tests ▪ Test pyramid - 18
  19. THINGS TO PONDER... 19

  20. API PARTITIONS 20 ▪ Logical function ▪ Change isolation ▪

    Join frequency -
  21. CAN ONE SERVICE CONSUME ANOTHER? 21 ▪ Still small? ▪

    Leaking domain ▪ Too much context? ▪ Availability
  22. A MIX OF DATA-STORES 22 Program Claim core Dealer District

    organization MySQL DB2
  23. CARVING UP THE UNDERLYING DOMAIN 23 Program Claim Dealer Part

    User Role core security organization inventory for applies-to creator belongs-to
  24. INCREASED LATENCY ▪ http pipes ▪ (n+1) selects ▪ transaction

    boundaries ▪ cached responses 24
  25. KEEPING THEM SECURE ▪ provisioning api-keys ▪ access-control ▪ auditing

    - 25
  26. COMPLEX OR CHAOTIC? ▪ more processes ▪ operational complexity ▪

    api-logs ▪ monitoring - 26
  27. For questions or suggestions: Avinash Chugh Deepika Kamboj THANK YOU

  28. REFERENCES 28 ▪ https://www.youtube.com/watch?v=jv9xH6ZxsR4 ▪ http://martinfowler.com/articles/microservices.html ▪ http://www.infoq.com/presentations/Micro-Services ▪ http://projects.spring.io/spring-boot/

    ▪ https://www.youtube.com/watch?v=OY7QGDg93Ic ▪ http://www.infoq.com/presentations/adopting- continuous-delivery