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.
Breaking Down Your Build:
Architectural Patterns for A More
Efficient Pipeline
FromFragileToAgile.com & Equal Experts
@Abr...
About me
Making Software. Better.
Simple solutions to big business problems.
Equal Experts is a network of talented, experienced, s...
What’s in a Build?
Complexity
vs.
Simplicity
"Perfection Is Achieved Not When
There Is Nothing More to Add,
But When There Is Nothing Left to
Take Away”
Antoine de Sai...
The fastest build
is the one you don’t need to run
Break down a monolith
Break down a monolith
Break down a monolith
APP
BACKEND
SUPER
APP
DATA
MODEL
APP
BACKEND
SUPER
APP
SUPER
APP
DATA
MODEL
APP
BACKEND
GUI
Build up your microservices
Build up your microservices
Build up your microservices
Build up your microservices
Build up your microservices
Build up your microservices
Build up your microservices
How to build a
CI/CD system like this
https://skillsmatter.com/skillscasts/6371-scalable-continuous-deployment-with-maven
...
Good Refactoring Skills Needed
Safety First
Restructuring Patterns
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
Decoupling API from implementation
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
Decoupling API from implementation
Goal
WEB
INTERFACE
LIBRARY
IMPL
ASSEMBLY
LIBRARY
API
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
Decoupling API from implementation
ASSEMBLY
WEB
INTERFACE
LIBRARY
Integration Test
Deploy
Smoke Test
ASSEMBLY
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
Compile
Unit Test
Con...
Decoupling API from implementation
LIBRARY
API
LIBRARY
IMPL
ASSEMBLY
WEB
INTERFACE
Decoupling API from implementation
DI for IMPL
Use explicit wiring
LIBRARY
API
LIBRARY
IMPL
ASSEMBLY
WEB
INTERFACE
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
IMPL
No conflict in run time
thanks to explicit wiring
ASSEMBLY
L...
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
IMPL
ASSEMBLY
LIBRARY
API
LIBRARY
IMPL
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
IMPL
ASSEMBLY
LIBRARY
API
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
Horizontal vs. vertical slices
Horizontal vs. vertical slices
Persistence
Validation
Logic
Front-End
Web Service
Horizontal vs. vertical slices
Persistence
Validation Front-end
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
...
Horizontal vs. vertical slices
End Goal
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
AC...
Horizontal vs. vertical slices
Persistence
Validation Front-end
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
...
Horizontal vs. vertical slices
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Persistence Validation Front-end
ACCOUNT
COMMS
PAY...
Horizontal vs. vertical slices
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Persistence Validation Front-end
ACCOUNT
COMMS
PAY...
Horizontal vs. vertical slices
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Persistence Validation Front-end
ACCOUNT
COMMS
ACC...
Horizontal vs. vertical slices
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Persistence...
Horizontal vs. vertical slices
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Persistence...
Horizontal vs. vertical slices
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Persistence...
Horizontal vs. vertical slices
ACCOUNTCOMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Pers...
Horizontal vs. vertical slices
ACCOUNTCOMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Pers...
Horizontal vs. vertical slices
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
ACCOUNT
PER...
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
Library as a service
Library as a service
Library SERVICE B
SERVICE C
SERVICE A
Library as a service
Goal
SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library
Service
Library as a service
Library SERVICE B
SERVICE C
SERVICE A
Library as a service
Library SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library as a service
Library
SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library
Service
Library as a service
Library
SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library
Service
Library as a service
Library
SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library
Service
Library as a service
Library
SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library
Service
Library as a service
SERVICE B
SERVICE C
SERVICE A IT A
IT B
IT C
Library
Service
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
Reduce fan-out
Reduce fan-out
B
H
C
D
E
F
G
A
Reduce fan-out
B
H
C
D
E
F
G
A
A1
A2
A3
Reduce fan-out
Goal
B
H
C
D
E
F
G
A2
A3
A1
Reduce fan-out
B
H
C
D
E
F
G
A
A1
A2
A3
Reduce fan-out
B
H
C
D
E
F
G
A1
A2
A3
A1
Reduce fan-out
B
H
C
D
E
F
G
A1
A2
A3
A1
Reduce fan-out
B
H
C
D
E
F
G
A2
A3
A1
Reduce fan-out
B
H
C
D
E
F
G
A2
A3
A1
A3
Reduce fan-out
B
H
C
D
E
F
G
A2
A3
A1
A3
Reduce fan-out
B
H
C
D
E
F
G
A2
A3
A1
Reduce fan-out
B
H
C
D
E
F
G
A2
A3
A1
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
Configuration as a service
Configuration as a service
Configuration
Configuration as a service
Configuration
● Feature Flag
● Throttling Variable
● A/B Testing
● URLs to other systems
● …
● ...
Configuration as a service
Configuration
● Feature Flag
● Throttling Variable
● A/B Testing
● URLs to other systems
● …
● ...
Configuration as a service
Config items
Soft : can check in runtime (eg. feature flag)
Hard : need to check in startup (eg...
Configuration as a service
Service
Configuration as a service
Goal
Service
Smoke Tests
Soft
Config
Service
Hard
Config
Deploy
Configuration as a service
Service
Configuration as a service
Service
Config
Everything
Else
Deploy
Smoke
Tests
Configuration as a service
Service
Config
Smoke
Tests
Configuration as a service
Service
Config Smoke Tests
Configuration as a service
Service
Soft
Config
Smoke Tests
Hard
Config
Configuration as a service
Service
Soft
Config
Smoke Tests
Hard
Config
Soft
Config
Service
Configuration as a service
Service
Soft
Config
Smoke Tests
Hard
Config
Soft
Config
Service
Configuration as a service
Service
Smoke Tests
Hard
Config
Soft
Config
Service
Configuration as a service
Service
Smoke Tests
Soft
Config
Service
Hard
Config
Everything
Else
Deploy
Configuration as a service
Service
Smoke Tests
Soft
Config
Service
Hard
Config
Deploy
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Redu...
But… Should I Do It?
But… Should I Do It?
https://youtu.be/8JxoKJng_eQ
Check out my
video on YouTube
Recapping…
Don’t run things faster, run fewer things
Seek simplicity
Restructure as needed
Thank You!
FromFragileToAgile.com
@AbrahamMarin
Thank You
Twitter
@EqualExperts
LinkedIn
linkedin.com/company/equal-experts
UNITED KINGDOM
+44 203 603 7830
helloUK@equale...
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3
Upcoming SlideShare
Loading in …5
×

Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3

333 views

Published on

Do you find constantly rebuilding things that don’t need rebuilding? If yes, this talk is for you. The way your codebase is structured impacts what you need to rebuild after each commit, therefore, the codebase needs to be re-architectured with the build pipeline in mind. Sometimes you’ll have many responsibilities packed in one module, so you rebuild all of them every time you change one. Or maybe you have a multi-tiered application and adding a feature implies modifying (and rebuilding) all tiers, with cascading effects. In this talk we’ll go over scenarios like this and others, showing how the code can be rewritten in a way that minimises unnecessary rebuilds. In the end, you’ll be equipped with a number of techniques that will help you manage your build pipeline.

Published in: Software
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Pipeline conference 2017 - Breaking down your build: architectural patterns for a more efficient pipeline 4-3

  1. 1. Breaking Down Your Build: Architectural Patterns for A More Efficient Pipeline FromFragileToAgile.com & Equal Experts @AbrahamMarin
  2. 2. About me
  3. 3. Making Software. Better. Simple solutions to big business problems. Equal Experts is a network of talented, experienced, software consultants, specialising in agile delivery.
  4. 4. What’s in a Build?
  5. 5. Complexity vs. Simplicity
  6. 6. "Perfection Is Achieved Not When There Is Nothing More to Add, But When There Is Nothing Left to Take Away” Antoine de Saint-Exupéry | The Little Prince
  7. 7. The fastest build is the one you don’t need to run
  8. 8. Break down a monolith
  9. 9. Break down a monolith
  10. 10. Break down a monolith APP BACKEND SUPER APP DATA MODEL APP BACKEND SUPER APP SUPER APP DATA MODEL APP BACKEND GUI
  11. 11. Build up your microservices
  12. 12. Build up your microservices
  13. 13. Build up your microservices
  14. 14. Build up your microservices
  15. 15. Build up your microservices
  16. 16. Build up your microservices
  17. 17. Build up your microservices
  18. 18. How to build a CI/CD system like this https://skillsmatter.com/skillscasts/6371-scalable-continuous-deployment-with-maven View my talk
  19. 19. Good Refactoring Skills Needed
  20. 20. Safety First
  21. 21. Restructuring Patterns
  22. 22. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  23. 23. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  24. 24. Decoupling API from implementation
  25. 25. Decoupling API from implementation WEB INTERFACE LIBRARY
  26. 26. Decoupling API from implementation Goal WEB INTERFACE LIBRARY IMPL ASSEMBLY LIBRARY API
  27. 27. Decoupling API from implementation WEB INTERFACE LIBRARY
  28. 28. Decoupling API from implementation ASSEMBLY WEB INTERFACE LIBRARY
  29. 29. Integration Test Deploy Smoke Test ASSEMBLY Decoupling API from implementation WEB INTERFACE LIBRARY Compile Unit Test Contract Test
  30. 30. Decoupling API from implementation LIBRARY API LIBRARY IMPL ASSEMBLY WEB INTERFACE
  31. 31. Decoupling API from implementation DI for IMPL Use explicit wiring LIBRARY API LIBRARY IMPL ASSEMBLY WEB INTERFACE
  32. 32. Decoupling API from implementation WEB INTERFACE LIBRARY IMPL No conflict in run time thanks to explicit wiring ASSEMBLY LIBRARY API LIBRARY IMPL
  33. 33. Decoupling API from implementation WEB INTERFACE LIBRARY IMPL ASSEMBLY LIBRARY API LIBRARY IMPL
  34. 34. Decoupling API from implementation WEB INTERFACE LIBRARY IMPL ASSEMBLY LIBRARY API
  35. 35. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  36. 36. Horizontal vs. vertical slices
  37. 37. Horizontal vs. vertical slices Persistence Validation Logic Front-End Web Service
  38. 38. Horizontal vs. vertical slices Persistence Validation Front-end ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT Web Service
  39. 39. Horizontal vs. vertical slices End Goal COMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END ACCOUNT PERSISTENCE VALIDATION FRONT-END Web Service
  40. 40. Horizontal vs. vertical slices Persistence Validation Front-end ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT Web Service
  41. 41. Horizontal vs. vertical slices PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT Web Service
  42. 42. Horizontal vs. vertical slices PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT ACCOUNT COMMS PAYMENT Web Service
  43. 43. Horizontal vs. vertical slices PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT COMMS ACCOUNT COMMS ACCOUNT COMMS Web Service
  44. 44. Horizontal vs. vertical slices COMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT COMMS ACCOUNT COMMS ACCOUNT COMMS Web Service
  45. 45. Horizontal vs. vertical slices COMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT COMMS ACCOUNT COMMS ACCOUNT COMMS Web Service
  46. 46. Horizontal vs. vertical slices COMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT ACCOUNT ACCOUNT Web Service
  47. 47. Horizontal vs. vertical slices ACCOUNTCOMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT ACCOUNT ACCOUNT Web Service PERSISTENCE VALIDATION FRONT-END
  48. 48. Horizontal vs. vertical slices ACCOUNTCOMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END Persistence Validation Front-end ACCOUNT ACCOUNT ACCOUNT Web Service PERSISTENCE VALIDATION FRONT-END
  49. 49. Horizontal vs. vertical slices COMMS PERSISTENCE VALIDATION FRONT-END PAYMENT PERSISTENCE VALIDATION FRONT-END ACCOUNT PERSISTENCE VALIDATION FRONT-END Web Service
  50. 50. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  51. 51. Library as a service
  52. 52. Library as a service Library SERVICE B SERVICE C SERVICE A
  53. 53. Library as a service Goal SERVICE B SERVICE C SERVICE A IT A IT B IT C Library Service
  54. 54. Library as a service Library SERVICE B SERVICE C SERVICE A
  55. 55. Library as a service Library SERVICE B SERVICE C SERVICE A IT A IT B IT C
  56. 56. Library as a service Library SERVICE B SERVICE C SERVICE A IT A IT B IT C Library Service
  57. 57. Library as a service Library SERVICE B SERVICE C SERVICE A IT A IT B IT C Library Service
  58. 58. Library as a service Library SERVICE B SERVICE C SERVICE A IT A IT B IT C Library Service
  59. 59. Library as a service Library SERVICE B SERVICE C SERVICE A IT A IT B IT C Library Service
  60. 60. Library as a service SERVICE B SERVICE C SERVICE A IT A IT B IT C Library Service
  61. 61. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  62. 62. Reduce fan-out
  63. 63. Reduce fan-out B H C D E F G A
  64. 64. Reduce fan-out B H C D E F G A A1 A2 A3
  65. 65. Reduce fan-out Goal B H C D E F G A2 A3 A1
  66. 66. Reduce fan-out B H C D E F G A A1 A2 A3
  67. 67. Reduce fan-out B H C D E F G A1 A2 A3 A1
  68. 68. Reduce fan-out B H C D E F G A1 A2 A3 A1
  69. 69. Reduce fan-out B H C D E F G A2 A3 A1
  70. 70. Reduce fan-out B H C D E F G A2 A3 A1 A3
  71. 71. Reduce fan-out B H C D E F G A2 A3 A1 A3
  72. 72. Reduce fan-out B H C D E F G A2 A3 A1
  73. 73. Reduce fan-out B H C D E F G A2 A3 A1
  74. 74. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  75. 75. Configuration as a service
  76. 76. Configuration as a service Configuration
  77. 77. Configuration as a service Configuration ● Feature Flag ● Throttling Variable ● A/B Testing ● URLs to other systems ● … ● (for each environment!)
  78. 78. Configuration as a service Configuration ● Feature Flag ● Throttling Variable ● A/B Testing ● URLs to other systems ● … ● (for each environment!) Service Rebuild ● Compile ● Test Internal Logic ● Contract Tests ● Full Integration Tests ● Deploy ● Smoke Tests
  79. 79. Configuration as a service Config items Soft : can check in runtime (eg. feature flag) Hard : need to check in startup (eg. DB connection)
  80. 80. Configuration as a service Service
  81. 81. Configuration as a service Goal Service Smoke Tests Soft Config Service Hard Config Deploy
  82. 82. Configuration as a service Service
  83. 83. Configuration as a service Service Config Everything Else Deploy Smoke Tests
  84. 84. Configuration as a service Service Config Smoke Tests
  85. 85. Configuration as a service Service Config Smoke Tests
  86. 86. Configuration as a service Service Soft Config Smoke Tests Hard Config
  87. 87. Configuration as a service Service Soft Config Smoke Tests Hard Config Soft Config Service
  88. 88. Configuration as a service Service Soft Config Smoke Tests Hard Config Soft Config Service
  89. 89. Configuration as a service Service Smoke Tests Hard Config Soft Config Service
  90. 90. Configuration as a service Service Smoke Tests Soft Config Service Hard Config Everything Else Deploy
  91. 91. Configuration as a service Service Smoke Tests Soft Config Service Hard Config Deploy
  92. 92. Restructuring Patterns ● Decoupling API from implementation ● Horizontal vs. vertical slices ● Library as a service ● Reduce fan-out ● Configuration as a service
  93. 93. But… Should I Do It?
  94. 94. But… Should I Do It? https://youtu.be/8JxoKJng_eQ Check out my video on YouTube
  95. 95. Recapping… Don’t run things faster, run fewer things Seek simplicity Restructure as needed
  96. 96. Thank You! FromFragileToAgile.com @AbrahamMarin
  97. 97. Thank You Twitter @EqualExperts LinkedIn linkedin.com/company/equal-experts UNITED KINGDOM +44 203 603 7830 helloUK@equalexperts.com Equal Experts UK Ltd 30 Brock Street London NW1 3FG INDIA +91 20 6607 7763 helloIndia@equalexperts.com Equal Experts India Private Ltd Office No. 4-C Cerebrum IT Park No. B3 Kumar City, Kalyani Nagar Pune, 411006 Web www.equalexperts.com CANADA +1 403 775 4861 helloCanada@equalexperts.com Equal Experts Devices Inc 205 - 279 Midpark way S.E. T2X 1M2 Calgary, Alberta PORTUGAL +351 211 378 414 helloPortugal@equalexperts.com Equal Experts Portugal Avenida Dom João II, Nº35 Edificio Infante 11ºA 1990-083 Parque das Nações Lisboa – Portugal & Equal Experts USA +1 866-943-9737 helloUSA@equalexperts.com Equal Experts Inc 1460 Broadway New York NY 10036  

×