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.

Architectural Refactoring


Published on

Presented at Utah Code Camp on 2015-03-14
Presented at Boise Code Camp on 2015-03-21

Published in: Software
  • Be the first to comment

  • Be the first to like this

Architectural Refactoring

  1. 1. Architectural Refactoring
  2. 2. Dave Adsit Chief Application Architect @davidadsit
  3. 3. A mostly true story of architectural evolution
  4. 4. What is Software Architecture? Architecture is the stuff that’s hard to change. Martin Fowler
  5. 5. What is Refactoring? Refactoring is a changing the structure of code without changing its behavior.
  6. 6. What is Architectural Refactoring? Intentionally changing the structure of a system without altering its features.
  7. 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
  8. 8. Patterns of change A generally reusable solution to a commonly occurring problem within a given context
  9. 9. 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
  10. 10. Leverage a distributed web cache (CDN) Offload traffic from a web server Improve response time for users far away
  11. 11. Cluster the servers Distribute load Improve reliability Move from physical to virtual machines
  12. 12. Eliminate session state No more sessions pinned to servers Replace session data with user data
  13. 13. Replace feature branches with feature toggles Integrate continuously Decouple deploy from release Ability to disable features that don’t work out
  14. 14. Separate data and static assets Reduce server-side rendering load Leverage client processing power Improve quantity and granularity of caching <html>...</html> { … }
  15. 15. Shard the database Partitioning data to distribute load
  16. 16. Introduce a polyglot datastore Document database for fast reads SQL database for ad hoc reporting and research Miscellaneous special purpose databases
  17. 17. Replace database queue(s) with real queue(s) Don’t implement a queue in a database Guaranteed at least once delivery
  18. 18. Hire more developers
  19. 19. Split the team Organizations which design systems are constrained to produce designs which are copies of the communication structures of these organizations. Melvin Conway
  20. 20. Embrace stack diversity .NET NodeJS Python PHP Ruby Hadoop
  21. 21. West Redundant datacenters Increase reliability Simplify disaster recovery Reduce response time East
  22. 22. Extract bounded context Microservices Microsites Shared datastore Anti-corruption layer
  23. 23. Strangle the monolith Repeat extract context until no more than a single context remains behind
  24. 24. Distributed system of record One bounded context is the system of record Others have local caches of relevant information used to make local decisions
  25. 25. Implement async communication pattern Publish/Subscribe Leverage the queue for reliable delivery
  26. 26. Implement blocking communication pattern Request/Response RESTful APIs Circuit breaker
  27. 27. Orchestration and choreography Conductors direct orchestras Dancers in a ballet act independently
  28. 28. Trade total complexity for local simplicity
  29. 29. How long will it take?
  30. 30. Questions? Dave Adsit Chief Application Architect @davidadsit