Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Architecting for a Better Future

Architecting for a Better Future

Presented at Reversim Summit in Tel-Aviv, December 2021.

What is software architecture? This seemingly simple question has baffled researchers and practitioners for decades. Industry legends such as Mary Shaw, Martin Fowler, Grady Booch and Ralph Johnson have weighed in on just what architecture is; but as an industry, we have yet to come up with a compelling description or concrete requirements from the role.

In this talk we'll consider software architecture in a new light, centered around one key observation: good architecture isn't about dealing with current requirements, but rather about avoiding future constraints. With that understood, we can have useful discussions about what is or isn't good architecture; hopefully, you will leave this session with ideas on how to build/evolve your software towards an unknown future comfortably.

0014decc65763e66f22891be724b5afa?s=128

Tomer Gabel

December 27, 2021
Tweet

More Decks by Tomer Gabel

Other Decks in Programming

Transcript

  1. T o m e r G a b e l

    Kraków, 15-17 May 2019 // Architecting for a Better Future T o m e r G a b e l Tel Aviv, 26-27 Dec 2021 //
  2. Prelude

  3. Yay handwaving! ”Software architecture is the set of design decisions

    which, if made incorrectly, may cause your project to be cancelled.” - Eoin Woods “Architecture represents the significant design decisions that shape a system, where significant is measured by cost of change.” – Grady Booch ”Architecture is about the important stuff. Whatever that is.” - Ralph Johnson 01 02 03
  4. Yay handwaving! “Architect: Someone who knows the difference between that

    which could be done and that which should be done.” - Larry McVoy “A software architect is a software development expert who makes high-level design choices and tries to enforce technical standards, including software coding standards, tools, and platforms.” - Wikipedia 01 02
  5. Prelude • The systems we build are getting more complex

    • Taming this complexity is nontrivial! • We all know we need architects… • ... but we can’t agree on what they do • … or how to measure their success • … or how to hire and retain them
  6. Prelude • The systems we build are getting more complex

    • Taming this complexity is nontrivial! • We all know we need architects… • ... but we can’t agree on what they do • … or how to measure their success • … or how to hire and retain them Not gonna talk about these (they’re artifacts anyway)
  7. Prelude • The systems we build are getting more complex

    • Taming this complexity is nontrivial! • We all know we need architects… • ... but we can’t agree on what they do • … or how to measure their success • … or how to hire and retain them This is our focus today
  8. Who or what am I? • Freelance software engineer •

    Been around for way too long • From the stone-age… • … to the silicon-age… • … to whatever-age • Up and down the stack • For a bunch of companies you’ve heard of • Can we move on, please?
  9. A tale of two Bobs

  10. “System architects”

  11. Evil Bob

  12. Indifferent Bob

  13. •Indifferent Bob works for Initrode •Loves diagrams •Writes documents •Talks

    too much
  14. •Evil Bob works for Initech •Doesn’t code •Will only use

    UML •Manages a team •Sits on Architecture Review Board
  15. What’s Amiss?

  16. Architecture != Development • Software development is about value delivery

    • Architecture can involve everything else: • Compute: hardware, OS, containerization… • Platform: messaging, discovery, load balancing… • Operations: log aggregation, metrics, alerts… • Is this sufficient, though?
  17. This is architecture.

  18. AWS (Primary Region) Primary Cluster Remote Region Replica Cluster Operational

    Region Development Cluster NGINX Vault Consul HAProxy httpd httpd httpd MySQL 1 (primary) MySQL 1 (replica) MariaDB Trip Pool Grafana ELK Grafana NGINX ELK Redis Grafana NGINX Vault Consul HAProxy httpd Disaster Recovery Zone Master 1 (delayed) MySQL 2 (primary) Master 2 (delayed) ELK Redis Grafana MySQL 1 MySQL 2 MySQL 2 (replica) MySQL 2 (replica) Vault Consul ELK HAProxy httpd NGINX Redis Grafana This is also architecture.
  19. Even this is, you guessed it, architecture. Source: Architecture of

    SQLite (public domain)
  20. Your point, sir? • Architecture is contextual. • Zoom in

    or out a bit and the picture changes dramatically. • Architecture exists in all software. • It’s in the way modules are organized; • It’s in the way services communicate; • It’s in the way applications are built up • Architecture can be emergent. • You either plan for it (hard), retrofit it (expensive) or stick it on with duct tape
  21. Architecture is the art of layering.

  22. None
  23. Good Architecture: Unix Pipes • The Unix Philosophy, abriged version:

    1. Write programs that do one thing and do it well. 2. Write programs to work together. 3. Write programs to handle text streams, because that is a universal interface. • Plenty of criticism out there, some valid • … but it stands the test of time!
  24. Good Architecture: Unix Pipes • ”The Unix philosophy” is epitomized

    in pipes • Pipes are all about composition • Why were they so successful? • Byte streams can carry anything • Text isn’t implied, neither is structure • Pipes only provide one layer • ... and avoid introducing up- or downstream contraints! tar gzip curl
  25. What can we learn? • Very simple concepts • Very

    easy to explain • Limited surface area (lots of room to innovate) In short: coherent boundaries I approve this message
  26. Counterexample • An ORM, by definition: • Understands objects •

    Understands the DB schema • Integrates with the underlying VM (relations, property access) • Manages DB connectivity (transactions, lazy loads) • That’s an awful lot! Source: Red Hat, “Hibernate architecture documentation”
  27. Counterexample: ORM • Why is ORM “bad”? • Creates coupling

    between very different concepts • Debugging can be hard • Scaling can be hard • Lots of pitfalls and nuances (transactions, DB types, relations…) • ORMs operate across many layers at once • ORMs aim to blur the boundaries between layers
  28. KO

  29. Software architecture is the software engineering discipline of predicting and

    enabling the future evolution of the system.
  30. A software architect’s job is to minimize the impact of

    today’s design decisions on future evolution of the system.
  31. What does that mean, exactly? We define disciplines by their

    desired outcome • Programmers implement the system program • QA provides the framework and tools to assure quality • Operations provide the means to run the system in the field What is the desired outcome of a software architect? • If software architecture is about layering • And good layering is about coherent boundaries • It follows that…
  32. Two core skills for an architect Interpolation Selecting solutions that

    meet known requirements A skill that is taught: 1. Training 2. Postmortems 3. Blogs/conferences/etc. Extrapolation Reasoning about downstream effects A skill that is learned: 1. Experience 2. Introspection 3. Aptitude
  33. tomer@substrate.co.il @tomerg https://github.com/holograph Thank you for listening Questions? The fineprint

    Office Space the Bobs were created by Mike Judge and subsequently made into a movie by 20th Century Fox. If you haven’t seen the movie, it’s fine: you still have you whole life ahead of you. But is it worth living, really, without having seen Office Space? That point is subject of some debate among philosophers specializing in the European Dark Ages, however it is so far removed from my experience I won’t even pretend to have an educated opinion. Instead, I offer you this: the TL;DR version is that you should watch Office Space. Really. Just go. Watch it already. It’s good for you.