Continuous integration has made development faster and more reliable. However, as codebases expand, organizations are finding that their build pipelines slow down dramatically. One of the most common reasons is that we often rebuild parts of the system that don't need to be rebuilt. This can happen when the code structure isn’t a faithful representation of the logical dependencies between the different parts. This prevents the pipeline from detecting which parts of the system are impacted by a change and which ones aren’t. Abraham Marin-Perez describes common scenarios in which the structure of the code doesn’t represent the real internal dependencies, forcing unnecessary rebuilds. These include cases when a module depends on both the definition and the implementation of a library (when only the definition is needed) or a tiered application where all layers need to be rebuilt every time a new feature is added. Abraham explains how to fix each of these, sharing the necessary tools to re-architect code for a more efficient delivery pipeline.
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Architectural Patterns for an Efficient Delivery Pipeline
1. DW2
DevOps Design & Architecture
6/7/2017 11:30:00 AM
DW2 Architectural Patterns for an
Efficient Delivery Pipeline
Presented by:
Abraham Marin-Perez
Equal Experts
Brought to you by:
350 Corporate Way, Suite 400, Orange Park, FL 32073
888-‐268-‐8770 ·∙ 904-‐278-‐0524 - info@techwell.com - https://www.techwell.com/
2. Abraham Marin-Perez
Equal Experts
An associate of Equal Experts, Abraham Marin-Perez has been working in
software development for a decade, paying special attention to what maximizes
a team's capacity to deliver in the long term. This has led him to study everyday
programming habits and techniques that ensure the sustainability of the
development process. Abraham shares his views in Real-World Maintainable
Software and more informally in his blog and on Twitter @AbrahamMarin. An
author and public speaker, Abraham helps run the London Java Community and
contributes as a Java news editor at InfoQ.
3. Breaking Down Your Build:
Architectural Patterns for a More
Efficient Pipeline
fromfragiletoagile.com & Equal Experts
@AbrahamMarin #DocklandsLJC
About me
4. Making Software. Better.
Simple solutions to big business problems.
Equal Experts is a network of talented, experienced, software
consultants, specialising in agile delivery.
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 | author of The Little Prince
9. 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
10. Build up your microservices
Build up your microservices
11. Build up your microservices
Build up your microservices
12. Build up your microservices
Build up your microservices
13. How to build a
CI/CD system like this
https://skillsmatter.com/skillscasts/6371-scalable-continuous-deployment-with-maven
View my talk
Good Refactoring Skills Needed
21. Restructuring techniques
Identify and restructure sub-builds
A1 B
C
D
A2
A3
Restructuring techniques
Transform
build-time dependencies into
run-time dependencies
23. Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Reduce fan-out
● Configuration as a service
Decoupling API from implementation
24. Decoupling API from implementation
WEB
INTERFACE
LIBRARY
Decoupling API from implementation
Goal
WEB
INTERFACE
LIBRARY
IMPL
LIBRARY
API
ASSEMBLY
25. Decoupling API from implementation
WEB
INTERFACE
LIBRARY
Decoupling API from implementation
ASSEMBLY
WEB
INTERFACE
LIBRARY
26. Decoupling API from implementation
ASSEMBLY
WEB
INTERFACE
LIBRARY
Integration Test
Deploy
Smoke Test
Compile
Unit Test
Contract Test
Decoupling API from implementation
ASSEMBLY
WEB
INTERFACE
LIBARY
API
LIBRARY
IMPL
27. Decoupling API from implementation
DI for IMPL
Use explicit wiring
ASSEMBLY
WEB
INTERFACE
LIBRARY
API
LIBRARY
IMPL
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
API
LIBRARY
IMPL
LIBRARY
IMPL
No conflict in run time
because explicit wiring
ASSEMBLY
28. Decoupling API from implementation
WEB
INTERFACE
LIBRARY
API
LIBRARY
IMPL
LIBRARY
IMPL
ASSEMBLY
Decoupling API from implementation
WEB
INTERFACE
LIBRARY
IMPL
LIBRARY
API
ASSEMBLY
29. Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Reduce fan-out
● Configuration as a service
Horizontal vs. vertical slices
30. Horizontal vs. vertical slices
Persistance
Validation
Logic
Front-End
Web Service
Horizontal vs. vertical slices
Web
Service
Persistence Validation Front-end
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
31. Horizontal vs. vertical slices
End Goal
Web
Service
COMMS
PERSISTENCE
VALIDATION
FRONT-END
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Horizontal vs. vertical slices
Web
Service
Persistence Validation Front-end
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
32. Horizontal vs. vertical slices
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Web
Service
Persistence Validation Front-end
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
Horizontal vs. vertical slices
PAYMENT
Web
Service
Persistence Validation Front-end
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
ACCOUNT
COMMS
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
33. Horizontal vs. vertical slices
Web
Service
Persistence Validation Front-end
ACCOUNT
COMMS
ACCOUNT
COMMS
ACCOUNT
COMMS
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Horizontal vs. vertical slices
COMMS
Web
Service
Persistence Validation Front-end
ACCOUNT
COMMS
ACCOUNT
COMMS
ACCOUNT
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
34. Horizontal vs. vertical slices
COMMSPersistence
ACCOUNT
COMMS
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Web
Service
Validation Front-end
ACCOUNT
COMMS
ACCOUNT
COMMS
Horizontal vs. vertical slices
COMMS
Web
Service
Persistence
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Validation Front-end
ACCOUNT ACCOUNT
35. Horizontal vs. vertical slices
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
COMMS
Web
Service
Persistence Validation Front-end
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
ACCOUNT ACCOUNT
Horizontal vs. vertical slices
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
COMMS
Web
Service
Persistence Validation Front-end
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
ACCOUNT ACCOUNT
36. Horizontal vs. vertical slices
Web
Service
COMMS
PERSISTENCE
VALIDATION
FRONT-END
ACCOUNT
PERSISTENCE
VALIDATION
FRONT-END
PAYMENT
PERSISTENCE
VALIDATION
FRONT-END
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Reduce fan-out
● Configuration as a service
37. Library as a service
Library as a service
Library
SERVICE
B
SERVICE
C
SERVICE
A
38. Library as a service
End 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
39. 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
40. 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
41. 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
42. Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Reduce fan-out
● Configuration as a service
Reduce fan-out
50. Configuration as a service
Configuration
● Feature Flag
● Throttling Variable
● A/B Testing
● URLs to other systems
● …
● (for each environment!)
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
51. Configuration as a service
Config items
Soft : can check in runtime (eg. feature flag)
Hard : need to check in startup (eg. DB connection)
Configuration as a service
Service
52. Configuration as a service
Goal
Service
Smoke Tests
Hard
Config
Deploy
Soft
Config
Service
Configuration as a service
Service
53. Configuration as a service
Service
Config
Everything
Else
Deploy
Smoke
Tests
Configuration as a service
Service
Config
Smoke
Tests
54. Configuration as a service
Service
Config Smoke Tests
Configuration as a service
Service
Soft
Config
Smoke Tests
Hard
Config
55. 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
56. Configuration as a service
Service
Smoke Tests
Hard
Config
Soft
Config
Service
Configuration as a service
Smoke Tests
Hard
Config
Everything
Else
Deploy
Service
Soft
Config
Service
57. Configuration as a service
Goal
Service
Smoke Tests
Hard
Config
Deploy
Soft
Config
Service
Restructuring Patterns
● Decoupling API from implementation
● Horizontal vs. vertical slices
● Library as a service
● Reduce fan-out
● Configuration as a service
58. But… Should I Do It?
But… Should I Do It?
https://youtu.be/8JxoKJng_eQ
Check out my
video on YouTube
60. Thank You!
fromfragiletoagile.com
@AbrahamMarin #DocklandsLJC
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