Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Feature Toggles On Steroids

5,454 views

Published on

Folien zum Vortrag von Michael Tamm zum Konzept der Feature Toogles und deren optimale Umsetzung.

Published in: Software

Feature Toggles On Steroids

  1. 1. Feature Toggles On Steroids
  2. 2. 2 / 99
  3. 3. 3 / 99 Feature Branches (aka Branch Based Development) Quelle: http://geekswithblogs.net/Optikal/archive/2013/02/10/152069.aspx
  4. 4. 4 / 99 Problem 1: ... Quelle: http://martinfowler.com/bliki/FeatureBranch.html
  5. 5. 5 / 99 Problem 1: ... Quelle: http://martinfowler.com/bliki/FeatureBranch.html
  6. 6. 6 / 99 Problem 1: ... Quelle: http://martinfowler.com/bliki/FeatureBranch.html
  7. 7. 7 / 99 Problem 1: ... Quelle: http://martinfowler.com/bliki/FeatureBranch.html
  8. 8. 8 / 99 Problem 1: Merge Pain Quelle: http://martinfowler.com/bliki/FeatureBranch.html
  9. 9. 9 / 99 Problem 2: Communication Islands „Branches create distance between developers and we don’t want that“ Frank Compagner Quelle: http://paulhammant.com/2014/09/24/a-functional-branch-by-abstraction-case-study/
  10. 10. 10 / 99 Problem 3: No Continuous Integration Quelle: http://de.slideshare.net/eugenmartynov/flow-23558345
  11. 11. 11 / 99 Branch Based Development Quelle: http://geekswithblogs.net/Optikal/archive/2013/02/10/152069.aspx
  12. 12. 12 / 99 Trunk Based Development No Merge Pain No Communication Islands Continuous Integration
  13. 13. 13 / 99 Trunk Based Development No Merge Pain No Communication Islands Continuous Integration Refactoring Friendly
  14. 14. 14 / 99 Trunk Based Development There are branches.
  15. 15. 15 / 99 Trunk Based Development There are branches. But there are no feature branches!
  16. 16. 16 / 99 Feature Branches ↔ Trunk Based Dev. Merge Conflict Resolution costs time is error-prone Communication Islands No Continuous Integration No Merge Pain No Communication Islands Continuous Integration Refactoring Friendly
  17. 17. 17 / 99 Feature Branches ↔ Trunk Based Dev. Merge Conflict Resolution costs time is error-prone Communication Islands No Continuous Integration Stable trunk No Merge Pain No Communication Islands Continuous Integration Refactoring Friendly
  18. 18. 18 / 99 Feature Branches ↔ Trunk Based Dev. Merge Conflict Resolution costs time is error-prone Communication Islands No Continuous Integration Stable trunk No Merge Pain No Communication Islands Continuous Integration Refactoring Friendly Unstable trunk
  19. 19. 19 / 99Quelle: http://www.infoq.com/presentations/Development-at-Google
  20. 20. 20 / 99 Do you have pre-commit-verification?
  21. 21. 21 / 99Quelle: http://paulhammant.com/2013/12/04/what_is_your_branching_model/ Use short lived issue branches or personal branches instead.
  22. 22. 22 / 99 How do you prevent, that incomplete features are released?
  23. 23. 23 / 99 Feature Toggles aka Feature Bits aka Feature Flags aka Feature Switches aka Feature Flippers aka Conditional Features aka Latent Code Pattern
  24. 24. 24 / 99 Feature Toggles Quelle: http://martinfowler.com/bliki/FeatureToggle.html
  25. 25. 25 / 99 IFEATURE TOGGLES
  26. 26. 26 / 99 Why Feature Toggles? Hide unfinished features from users
  27. 27. 27 / 99 Why Feature Toggles? Hide unfinished features from users “Stable trunk” for visible functionality
  28. 28. 28 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release
  29. 29. 29 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment
  30. 30. 30 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases
  31. 31. 31 / 99 Granularity
  32. 32. 32 / 99 Granularity ● per environment (local, staging, live) ● per server ● per customer/mandator - inherited if you have a hierarchy ● per user - a certain percentage of users ● per country ● per session - a certain percentage of sessions ● ...
  33. 33. 33 / 99 Granularity ● per environment (local, staging, live) ● per server ● per customer/mandator - inherited if you have a hierarchy ● per user - a certain percentage of users ● per country ● per session - a certain percentage of sessions ● ...
  34. 34. 34 / 99 Granularity (example #1)
  35. 35. 35 / 99 Granularity (example #2) Quelle: http://www.togglz.org/documentation/activation-strategies.html
  36. 36. 36 / 99 Granularity (example #3) Quelle: http://abhishek-tiwari.com/post/decoupling-deployment-and-release-feature-toggles
  37. 37. 37 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases
  38. 38. 38 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases Better Software Architecture
  39. 39. 39 / 99 Feature Toggle = Feature Toggle|
  40. 40. 40 / 99 Feature Toggle = Feature Toggle| long lived, payed for by customer
  41. 41. 41 / 99 Feature Toggle = Feature Toggle| long lived, payed for by customer Business Toggle
  42. 42. 42 / 99 Feature Toggle = Feature Toggle| long lived, payed for by customer short lived, payed for by your company Business Toggle
  43. 43. 43 / 99 Feature Toggle = Feature Toggle| long lived, payed for by customer short lived, payed for by your company Business ToggleBusiness Toggle Release Toggle
  44. 44. 44 / 99 Release Toggle = Release Toggle|
  45. 45. 45 / 99 Release Toggle = Release Toggle| hides a new feature
  46. 46. 46 / 99 Release Toggle = Release Toggle| hides a new feature e.g. new functionality (new menu point, new dialog, ...)
  47. 47. 47 / 99 Release Toggle = Release Toggle| hides a new feature e.g. new functionality (new menu point, new dialog, ...) hides a new implementation
  48. 48. 48 / 99 Release Toggle = Release Toggle| hides a new feature e.g. new functionality (new menu point, new dialog, ...) hides a new implementation e.g. - new design - new backend technology (PHP → Java or Hibernate → MongoDB) - performance optimization (added caching or better algorithm) - ...
  49. 49. 49 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  50. 50. 50 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  51. 51. 51 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  52. 52. 52 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  53. 53. 53 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  54. 54. 54 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  55. 55. 55 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html
  56. 56. 56 / 99 Branch By Abstraction Quelle: http://martinfowler.com/bliki/BranchByAbstraction.html You wanna keep this
  57. 57. 57 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases Better Software Architecture
  58. 58. 58 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases Better Software Architecture Testing in Live Environment with Live Data
  59. 59. 59 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases Better Software Architecture Testing in Live Environment with Live Data
  60. 60. 60 / 99 Release Toggle = Release Toggle| hides a new feature hides a new implementation
  61. 61. 61 / 99 Release Toggle = Release Toggle| hides a new feature hides a new implementation Dark Launching Pattern
  62. 62. 62 / 99 Dark Launching (example)
  63. 63. 63 / 99 Release Toggle = Release Toggle| hides a new feature hides a new implementation Dark Launching Pattern Beta-Testing A/B-Testing
  64. 64. 64 / 99 Release Toggle = Release Toggle| hides a new feature hides a new implementation Dark Launching Pattern Beta-Testing A/B-Testing Verify Branch By Abstraction Pattern
  65. 65. 65 / 99 Branch By Abstraction Quelle: http://www.stephen-smith.co.uk/application-pattern-verify-branch-by-abstraction/
  66. 66. 66 / 99 Branch By Abstraction Quelle: http://www.stephen-smith.co.uk/application-pattern-verify-branch-by-abstraction/
  67. 67. 67 / 99 Verify Branch By Abstraction Quelle: http://www.stephen-smith.co.uk/application-pattern-verify-branch-by-abstraction/
  68. 68. 68 / 99 Verify Branch By Abstraction Quelle: http://www.stephen-smith.co.uk/application-pattern-verify-branch-by-abstraction/ ● asynchronously (i.e. in the background, invisible for users) ● check for correctness ● check for performance
  69. 69. 69 / 99 Implementation: 2 Feature Toggles Use new implementation? Verify new implementation?
  70. 70. 70 / 99 Implementation: 2 Feature Toggles
  71. 71. 71 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation?
  72. 72. 72 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code
  73. 73. 73 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code Use old code and asynchronously verify new code
  74. 74. 74 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code and asynchronously verify new code This costs! Use old code
  75. 75. 75 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code and asynchronously verify new code 2x load? Use old code
  76. 76. 76 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code and asynchronously verify new code 2x load? Can you handle 100x load? Use old code
  77. 77. 77 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code and asynchronously verify new code Start small Use old code
  78. 78. 78 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code and asynchronously verify new code Restrict resources used by verifyUse old code
  79. 79. 79 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use old code and asynchronously verify new code Use new code Use old code
  80. 80. 80 / 99 Implementation: 2 Feature Toggles Usenewimplementation? Verify new implementation? Use new code Use new code and asynchronously verify old code Use old code and asynchronously verify new code Use old code
  81. 81. 81 / 99 Verify Pattern (example)
  82. 82. 82 / 99 Verify Pattern (example)
  83. 83. 83 / 99 Verify Pattern (example)
  84. 84. 84 / 99 Verify Pattern (example)
  85. 85. 85 / 99 Verify Pattern (example)
  86. 86. 86 / 99 Why Feature Toggles? Hide unfinished features from users Separate Deployment and Release Fearless Deployment No Big Bang Releases Better Software Architecture Testing in Live Environment with Live Data
  87. 87. 87 / 99 Some Questions Remain ● What should the system do if an asynchronous verify fails? ● Which library should you use for Feature Toggles? (Should you use a library at all?) ● When do you delete old Feature Toggles? ● How do you do testing with Feature Toggles? ● ...
  88. 88. 88 / 99 What should the system do if an asynchronous verify fails? Logging Metriken
  89. 89. 89 / 99 What should the system do if an asynchronous verify fails? Logging Metriken
  90. 90. 90 / 99 Which library should you use for Feature Toggles?
  91. 91. 91 / 99 But here is a tip ... Don't use Strings, Use an Enum. Prevents typing errors Code completion You can easily add documentation Makes it easy to remove a Feature Toggle
  92. 92. 92 / 99 When do you delete old Feature Toggles? When you are confident
  93. 93. 93 / 99 When do you delete old Feature Toggles? When you are confident (probably serveral weeks after you activated the Feature Toggle globally)
  94. 94. 94 / 99 Testing with Feature Toggles – Combinatorial Explosion?
  95. 95. 95 / 99 Testing with Feature Toggles (example #1)
  96. 96. 96 / 99 Testing with Feature Toggles (example #1)
  97. 97. 97 / 99 Testing with Feature Toggles (example #2) Quelle: https://gist.github.com/MichaelTamm/d5a5a67460d7a2db08a4
  98. 98. 98 / 99 Testing with Feature Toggles (example #3)
  99. 99. 99 / 99 Main Takeaways ● Use short lived issue or personal branches ● Use fine-grained Feature Toggles ● Verify new implementations – asynchronously in the background on live systems – in the background, but blocking on test systems ● Choose names for Feature Toggles with care ● Use Enums for Feature Toggles

×