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

MicroServices Challenges - Fred George - Agile SG 2016

MicroServices Challenges - Fred George - Agile SG 2016

Presented in Agile Singapore 2016 conference

66a1bb94b08fe5dcd07635a59681626c?s=128

Agile Singapore

October 07, 2016
Tweet

More Decks by Agile Singapore

Other Decks in Technology

Transcript

  1. MicroService Challenges Fred George fredgeorge@acm.org @fgeorge52 Copyright © 2015 by

    Fred George. All rights reserved. 1
  2. Fred George Copyright © 2015 by Fred George. All rights

    reserved. 2 • Technologist • Computer networks – 70’s • Token Ring LAN – 80’s • GUI’s – late 80’s • OO – late 80’s • Agile – late 90’s • MicroServices – mid-2000’s • Programmer • Since 1968 (Basic) • 65,000 hours experience • 70+ languages • Computer Science Degree 1973 • Manager • 17 years IBM • Business degree, MIT Sloan School 1986 • Product Owner, IBM • VP, ThoughtWorks • Co-founder, Outpace (Silicon Valley) • Senior Advisor to 3 tech companies
  3. Fred George Copyright © 2015 by Fred George. All rights

    reserved. 3 Consulting Roles • Change Agent • Disruptor • “Hand grenade I am throwing into development” • CTO describing Fred to his Vice President
  4. Industry Trends… Copyright © 2015 by Fred George. All rights

    reserved. 4 MicroServices Cloud Docker Dev/Ops Full-stack developer Agile Lean startup Cassandra Event bus MVP (minimum viable product Programmer anarchy No-SQL One Hacker Way
  5. How Fast Can You Go? Copyright © 2015 by Fred

    George. All rights reserved. 5 Deployment to Production Every 3.5 minutes
  6. Why: New Problem Domains: The Cynefin Framework Copyright © 2015

    by Fred George. All rights reserved. 6 Simple Complicated Complex Chaotic Cause a Effect Cause aaa Effect Effect? Cause? Cause ? Effect Disorder
  7. Why: Competition is coming Copyright © 2015 by Fred George.

    All rights reserved. 7 • Enablement through technologies • Cloud computing • Ubiquitous, high bandwidth • Languages (and supporting frameworks) • Recognition of business opportunities • Silicon Valley innovators as role models • Accelerating business needs • Few inhibitors for global competitors • Reduction of entry barriers for niche competitors
  8. Hardware Lead Times Copyright © 2015 by Fred George. All

    rights reserved. 8 6 mo. 1990 1995 2005 30 min. 1 week 1 day 2015 1 mo. 2000 2010 5 min. 5 sec. Order lead times (log) Data Center Virtual Machines Docker Commercial Cloud Capacity planning? Dedicated ops team?
  9. Copyright © 2015 by Fred George. All rights reserved. 9

    10 1 1000 100 100,000 1 10 100 1000 10,000 Size (loc) Number of Services MicroServices Rails / Java Zone SOA Workshop Forward Netflix Services Impact
  10. Summary Principles of MicroServices Copyright © 2015 by Fred George.

    All rights reserved. 10 • Very, very small • Team size of one to develop/maintain • Loosely coupled (including flow) • Multiple versions acceptable (encouraged?) • Self-monitoring of each service • Publish interesting “stuff” (w/o explicit requirements) • “Application” seems to be a poor conceptualization
  11. Common Theme of All Challenges: Inexperience! Copyright © 2015 by

    Fred George. All rights reserved. 11
  12. Synchronous or Asynchronous Challenge 1 Copyright © 2015 by Fred

    George. All rights reserved. 12
  13. Chad Fowler vs. Fred George •Chad: Use Synchronous as default

    • Algorithms typically described serially • Programmer understanding / productivity •Fred: Use Asynchronous as default • Robustness should be primary goal • Supports better de-coupling • Teach the programmers! Copyright © 2015 by Fred George. All rights reserved. 13
  14. Rapids, Rivers, and Ponds Copyright © 2015 by Fred George.

    All rights reserved. 14
  15. 0MQ 0MQ 0MQ 0MQ 0MQ 0MQ High-Performance Event Bus Copyright

    © 2015 by Fred George. All rights reserved. 15 Kafka Service
  16. Asynchronous Services Copyright © 2015 by Fred George. All rights

    reserved. 16 Bus Service Service Service Need Need Need Sol’n’s Sol’n •Variants easy •Graceful degradation ChooseS ol’n
  17. Asynchronous Services Example Copyright © 2015 by Fred George. All

    rights reserved. 17 Bus Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login ? ? ?
  18. Copyright © 2015 by Fred George. All rights reserved. 18

    Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login ? ? ? Web page served
  19. Copyright © 2015 by Fred George. All rights reserved. 19

    Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login ? ? ?
  20. Copyright © 2015 by Fred George. All rights reserved. 20

    Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login ? ? ? A A B B
  21. B A Copyright © 2015 by Fred George. All rights

    reserved. 21 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login ? ? ? A B
  22. A B Copyright © 2015 by Fred George. All rights

    reserved. 22 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login ? ? ? A B A B A B
  23. B Copyright © 2015 by Fred George. All rights reserved.

    23 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B Sally logs in as Member
  24. B Copyright © 2015 by Fred George. All rights reserved.

    24 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B Sally logs in as Member
  25. B Copyright © 2015 by Fred George. All rights reserved.

    25 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B C D C D
  26. B Copyright © 2015 by Fred George. All rights reserved.

    26 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B C D C D C D
  27. B Copyright © 2015 by Fred George. All rights reserved.

    27 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B C D C D
  28. B Copyright © 2015 by Fred George. All rights reserved.

    28 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B C D C D
  29. B Copyright © 2015 by Fred George. All rights reserved.

    29 Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A A B C D C D F E
  30. Channel Interfaces Service Taxonomy Channel Interfaces Copyright © 2015 by

    Fred George. All rights reserved. 30 Need Processing Enrichment Services Solution Services Client Biases Solution Blockers Solution Selection Logging / Monitoring / KPI’s
  31. Deconstructing the Databases Challenge 2 Copyright © 2015 by Fred

    George. All rights reserved. 31
  32. •Fortune 100 view: • Entity-oriented; consistency essential • As few

    as possible •MicroService view: • DB per MicroService (if persistence needed) • Poly-glot (various NoSQL, SQL) + event buses • Few (10%) writable; even fewer transactional How Many Databases? Copyright © 2015 by Fred George. All rights reserved. 32
  33. Copyright © 2015 by Fred George. All rights reserved. 33

    Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A B Rental offers Event publishing Solution collecting 300ms responder Redis
  34. Copyright © 2015 by Fred George. All rights reserved. 34

    Rental offers Car rent Legacy server Brand offers Location offers Segmentation Membership CarRent.com Login Sally A B Membership enrichment ETL Key-value
  35. Entity MicroService Trap Challenge 3 Copyright © 2015 by Fred

    George. All rights reserved. 35
  36. Fred Brooks’ Design Approach Copyright © 2016 by Fred George.

    All rights reserved. 36 Get the data structures correct, and the code will write itself
  37. 70’s Design Approach Copyright © 2016 by Fred George. All

    rights reserved. 37 ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz
  38. ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ 90’s Design

    Approach Copyright © 2016 by Fred George. All rights reserved. 38 Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ Operational Reporting
  39. Design Approach Copyright © 2016 by Fred George. All rights

    reserved. 39 … but you can’t change the data structure without making all the code “suspect” Corollary ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ ~~~~~~~~ Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz Zzzzzzzz Zzzz Zzzzzz Zzz zzzzzz ~~~~~~~~ ~~~~~~~~ ~~~~~~~~
  40. MicroServices or Clojure Challenge 4 Copyright © 2015 by Fred

    George. All rights reserved. 40
  41. •Conceptualization (Job) • Every service has one job • If

    two jobs, make two services •Communication • Minimize messages (whether RESTful or Events) •Encapsulate • Service has its own persistence • If sharing persistence, just one logical service MicroServices Like OO Copyright © 2015 by Fred George. All rights reserved. 41
  42. Clojure Loves Shared Data Copyright © 2015 by Fred George.

    All rights reserved. 42 X f o r m X f o r m X f o r m X f o r m ? ? ?
  43. 3 Companies – 3 Variants Copyright © 2015 by Fred

    George. All rights reserved. 43
  44. 3 Companies – 3 Variants Copyright © 2015 by Fred

    George. All rights reserved. 44 300+ Ruby, Node.js, Clojure, R, … DB w cron, RESTful, Kafka bus
  45. 3 Companies – 3 Variants Copyright © 2015 by Fred

    George. All rights reserved. 45 300+ 3 + dozens Ruby, Node.js, Clojure, R, … Clojure,Node.js DB w cron, RESTful, Kafka bus RabbitMQ
  46. 3 Companies – 3 Variants Copyright © 2015 by Fred

    George. All rights reserved. 46 300+ 3 + dozens 25 Ruby, Node.js, Clojure, R, … Clojure,Node.js Clojure DB w cron, RESTful, Kafka bus RabbitMQ Orchestration, RabbitMQ
  47. A New Hope… Copyright © 2015 by Fred George. All

    rights reserved. 47
  48. Choosing Architectures and Frameworks Challenge 5 Copyright © 2015 by

    Fred George. All rights reserved. 48
  49. Open Source Frameworks Copyright © 2015 by Fred George. All

    rights reserved. 49
  50. Node.js Very Active Copyright © 2015 by Fred George. All

    rights reserved. 50
  51. No Design Patterns Book Yet Challenge 6 Copyright © 2015

    by Fred George. All rights reserved. 51
  52. Conferences / Meetups Starting… Copyright © 2015 by Fred George.

    All rights reserved. 52
  53. Just Doing MicroServices Fails Challenge 7 Copyright © 2015 by

    Fred George. All rights reserved. 53
  54. Copyright © 2015 by Fred George. All rights reserved. 54

    MicroServices Cloud Docker Dev/Ops Full-stack developer Agile Lean startup Cassandra Event bus MVP (minimum viable product Programmer anarchy No-SQL
  55. What is a MicroService? Challenge 8-n Copyright © 2015 by

    Fred George. All rights reserved. 55
  56. •Synchronicity degree • Primary API access to services •Ratio of

    number of services and average size • Zones for clarity •DB / service ratio • Expose potential DB hindrances to rapid deployment Taxonomy May be Useful (before it’s too late) Copyright © 2015 by Fred George. All rights reserved. 56
  57. Count / Size Ratio Copyright © 2015 by Fred George.

    All rights reserved. 57 10 1 1000 100 100,000 1 10 100 1000 10,000 Size (loc) Number of Services MicroServices Rails / Java Zone SOA Animation Forward Netflix
  58. More Information… •Google: • MicroService Architecture for videos • MicroXchg

    2015 conference •Complementary topic: • Google for Programmer Anarchy Copyright © 2015 by Fred George. All rights reserved. 58
  59. MicroService Challenges Fred George fredgeorge@acm.org @fgeorge52 Copyright © 2015 by

    Fred George. All rights reserved. 59