Architectural Refactoring Dave Adsit Architect @davidadsit - - PowerPoint PPT Presentation

architectural refactoring dave adsit architect davidadsit
SMART_READER_LITE
LIVE PREVIEW

Architectural Refactoring Dave Adsit Architect @davidadsit - - PowerPoint PPT Presentation

Architectural Refactoring Dave Adsit Architect @davidadsit codeobsession.blogspot.com Architectural Evolution at a mostly true story What is Software Architecture? Architecture is the stuff thats hard to change. Martin Fowler What is


slide-1
SLIDE 1

Architectural Refactoring

slide-2
SLIDE 2

Dave Adsit Architect @davidadsit codeobsession.blogspot.com

slide-3
SLIDE 3

Architectural Evolution at a mostly true story

slide-4
SLIDE 4

What is Software Architecture?

Architecture is the stuff that’s hard to change. Martin Fowler

slide-5
SLIDE 5

What is Refactoring?

Refactoring is a changing the structure of code without changing its behavior.

slide-6
SLIDE 6

What is Architectural Refactoring?

Intentionally changing the structure of a system without altering its features.

slide-7
SLIDE 7

Why would anyone do that?

The technology fails to meet the needs of users The team fails to deliver on the needs of the organization

slide-8
SLIDE 8

Architectural Drivers

Quality Attributes Performance Compatibility Reliability Scalability Extensibility Availability Maintainability Usability

slide-9
SLIDE 9

Architectural Drivers

Constraints Money Hosting Environment Experience Skills Knowledge Capacity

slide-10
SLIDE 10

Patterns of change

A generally reusable solution to a commonly occurring problem within a given context

slide-11
SLIDE 11

Build a monolith

Fast and easy Can be done with a small team Allows for quick changes No need for QA handoff No need for Ops handoff

slide-12
SLIDE 12

Leverage a distributed web cache (CDN)

Offload traffic from a web server Improve response time for users far away

slide-13
SLIDE 13

Cluster the servers

Distribute load Improve reliability Move from physical to virtual machines

slide-14
SLIDE 14

Eliminate session state

No more sessions pinned to servers Replace session data with user data

slide-15
SLIDE 15

Replace feature branches with feature toggles

Integrate continuously Decouple deploy from release Ability to disable features that don’t work out

slide-16
SLIDE 16

Separate data and static assets

Reduce server-side rendering load Leverage client processing power Improve quantity and granularity of caching

<html>...</html> { … }

slide-17
SLIDE 17

Shard the database

Partitioning data to distribute load

slide-18
SLIDE 18

Introduce a polyglot datastore

Document database for fast reads SQL database for ad hoc reporting and research Miscellaneous special purpose databases

slide-19
SLIDE 19

Replace database queue(s) with real queue(s)

Don’t implement a queue in a database Guaranteed at least once delivery

slide-20
SLIDE 20

Hire more developers

slide-21
SLIDE 21

Split the team

Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations. Melvin Conway

slide-22
SLIDE 22

Embrace stack diversity

.NET NodeJS Python PHP Ruby

slide-23
SLIDE 23

West

Redundant data centers

Increase reliability Simplify disaster recovery Reduce response time

East

slide-24
SLIDE 24

Extract bounded context

Microservices Microsites Shared datastore Anti-corruption layer

slide-25
SLIDE 25

Strangle the monolith

Repeat extract context until no more than a single context remains behind

slide-26
SLIDE 26

Distributed system of record

One bounded context is the system of record Others have local caches of relevant information used to make local decisions

slide-27
SLIDE 27

Implement async communication pattern

Publish/Subscribe Leverage the queue for reliable delivery

slide-28
SLIDE 28

Implement blocking communication pattern

Request/Response RESTful APIs Circuit breaker

slide-29
SLIDE 29

Orchestration and choreography

Conductors direct orchestras Dancers in a ballet act independently

slide-30
SLIDE 30

Trade total complexity for local simplicity

slide-31
SLIDE 31

How long will it take?

slide-32
SLIDE 32

Questions?

Dave Adsit Architect @ Pluralsight @davidadsit codeobsession.blogspot.com