{"id":136,"date":"2022-03-09T10:48:31","date_gmt":"2022-03-09T18:48:31","guid":{"rendered":"http:\/\/www.barrybriggs.com\/blog\/?p=136"},"modified":"2022-03-29T11:41:40","modified_gmt":"2022-03-29T18:41:40","slug":"measuring-the-value-of-software-architecture","status":"publish","type":"post","link":"http:\/\/www.barrybriggs.com\/blog\/uncategorized\/measuring-the-value-of-software-architecture\/","title":{"rendered":"Measuring the Value of Software Architecture"},"content":{"rendered":"\n<p>By Barry Briggs<br> [JUST A DRAFT RIGHT NOW!!] <\/p>\n\n\n\n<p>Over the past few months I\u2019ve been working with some old\nfriends at the International Association of Software Architects (<a href=\"https:\/\/iasaglobal.org\/\">IASA<\/a>) to try to figure out some way to quantitatively\nmeasure the value of software architecture. We\u2019re trying to come up with\nanswers to the following questions:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Why is software architecture good (i.e., why do\nyou need software architects?) <\/li><li>How can you quantitatively assess an application\nor service? <\/li><li>What makes a good software architect?<\/li><\/ul>\n\n\n\n<p>These are difficult questions, particularly when you compare\nsoftware architecture with other fields. For example, it\u2019s relatively easy to\nquantify the value of a Six Sigma process-improvement organization: you measure\ntime, resources required, and costs of a process before optimization, and then\nafter, and you have a solid measurement of value \u2013 one that is simply not\npossible with software architecture. <\/p>\n\n\n\n<p>Why? <\/p>\n\n\n\n<p>Well, on a net-new project, architecture is applied at the\nvery beginning, so it\u2019s difficult to know if the lack of it would have made any\ndifference. Arguably, on a rewrite of a project, one could compare against some\nset of criteria how much better the new version works vis-\u00e0-vis the old one \u2013\nbut there are usually so many other factors in such a project that it\u2019s\nessentially impossible to separate out the contribution architecture makes. For\nexample, faster hardware or just plain better coding might be the reason the\nnew app runs faster, not the fact that the new design is factored more\neffectively.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Army Barracks<\/h2>\n\n\n\n<p>Perhaps an analogy can help us tease out how to think about\nthese questions. Software architecture is often compared (poorly) against\nphysical, building architecture \u2013 but let\u2019s try to make the analysis a bit more\nconstructive (pun intended). <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.barrybriggs.com\/blog\/wp-content\/uploads\/2022\/03\/ArmyBarracks.jpg\" alt=\"\" class=\"wp-image-137\" width=\"255\" height=\"176\" srcset=\"http:\/\/www.barrybriggs.com\/blog\/wp-content\/uploads\/2022\/03\/ArmyBarracks.jpg 541w, http:\/\/www.barrybriggs.com\/blog\/wp-content\/uploads\/2022\/03\/ArmyBarracks-300x207.jpg 300w\" sizes=\"auto, (max-width: 255px) 100vw, 255px\" \/><\/figure><\/div>\n\n\n\n<p>Consider something as mundane as an army\nbarracks. How would we measure the quality of its architecture? <\/p>\n\n\n\n<p>I suppose there are lots of ways, but here are mine.<\/p>\n\n\n\n<p>First and foremost, <strong>does it do the job for which it was\nintended? <\/strong>That is, does it provide enough room to house the required number\nof soldiers, does it provide appropriate storage, bathrooms, and showers for\nthem? Is it well insulated and heated? In other words, does it meet the\nimmediate \u201cbusiness need?\u201d If not \u2013 well, you certainly couldn\u2019t assess its\narchitecture as good in any way.<\/p>\n\n\n\n<p>Then we could ask many other questions, such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Compliance with laws and standards, <\/strong>that is, building codes, Army regulations, local standards, and so on. Like business need, this one\u2019s binary: if not compliant, no need to perform any additional evaluation.<br><\/li><li><strong>How resilient is it<\/strong>? Can it withstand a power failure, a Force 5 hurricane or (since this is a military installation) a direct hit by an artillery shell? <br> <br> <\/li><li><strong>How much load can it take<\/strong>? If there\u2019s a general mobilization and much more space is needed, how many extra beds can it hold? 2x? 5x? 10x, in a pinch? <br> <br> <\/li><li><strong>New workloads. <\/strong>The Army mandates that barracks become coed. Can the facilities be quickly adapted \u2013 if at all \u2013 to support separate sleeping areas, bathrooms, etc.? <br> <br> <\/li><li><strong>How easy is it to add new features<\/strong>? For example, does it require a teardown to add air conditioning or can existing heating ducts be reused in the summer? How hard is it to install wi-fi hubs? <br> <br> <\/li><li><strong>What about new components<\/strong>? Say the Army mandates that every barracks has to have a ping-pong table, which entails a building addition. Can such a thing be done quickly with minimal disruption? <br> <br> <\/li><li><strong>Business continuity<\/strong>. Say the barracks does fall down in a storm. Are there sufficient facilities on the base \u2013 or on other bases \u2013 that the soldiers can rehoused? <br> <br> <\/li><li><strong>Aesthetics<\/strong>. OK, maybe this isn\u2019t a good one for a barracks, but for other types of buildings \u2013 think I.M. Pei or Frank Lloyd Wright \u2013 aesthetics drive our view of good architecture. <\/li><\/ul>\n\n\n\n<p>You get the idea, and, hopefully, the analogy. In this case\nthe value of good design \u2013 of architecture \u2013 is readily apparent. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Assessing Software Architecture <\/h2>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"alignright is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.barrybriggs.com\/blog\/wp-content\/uploads\/2022\/03\/OnesAndZeros.png\" alt=\"\" class=\"wp-image-138\" width=\"218\" height=\"188\"\/><\/figure><\/div>\n\n\n\n<p>When we think about software architecture,\nwe can apply similar criteria. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Business Need<\/h3>\n\n\n\n<p>If the software doesn\u2019t satisfy business requirements, then \u2013 as we said above \u2013 it by definition cannot be \u201cwell-architected.\u201d Determining how <em>well<\/em> software meets the need, however, can be an interesting and challenging discussion. For years, software development began with requirements documents, which could stretch to tens, hundreds, even thousands of pages; and managers would simply tick off the features that were implemented.  (And as often as not by the time all the documented requirements were met, the business environment had changed, and the app was behind.) <\/p>\n\n\n\n<p>With agile development, users are much more involved in\ndevelopment from the start, tweaking and mid-course-correcting the product\nduring the development process. If there is a requirements document, it\nrepresents the starting point rather than a final statement \u2013 and this is good,\nbecause as the product takes shape, opportunities always present themselves,\nboth to users and developers.<\/p>\n\n\n\n<p>Still, how do we assess how well the product meets the need?\nOf course, one way is to ask users if they have the features they need; if not,\nsomething\u2019s obviously missing. <\/p>\n\n\n\n<p>But that\u2019s not all.<\/p>\n\n\n\n<p>Every line of code, every non-code artifact (e.g., images)\nshould be <strong>traceable <\/strong>back to the business requirement. If there is a\nfeature, somebody should be using it. Monitoring tools can help track which\nfeatures are exercised and which are not. (The <a href=\"https:\/\/www.zachman.com\/about-the-zachman-framework\">Zachman Framework<\/a>\nwas an early approach to documenting traceability.) <\/p>\n\n\n\n<p>This applies to infrastructure as well. As infrastructure is\nincreasingly documented through Infrastructure-as-Code (IaC) these Terraform or\nARM or CloudFormation configurations should justify their choices: why \u2013 from a\nbusiness perspective \u2013 this or that instance type is required because of\nexpected load, SSD storage is needed because of anticipated IOPS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Standards and Compliance<\/h3>\n\n\n\n<p>Like satisfying the business need, complying with relevant\nstandards is binary: the software does or it doesn\u2019t, and if it doesn\u2019t, you\u2019re\ndone.<\/p>\n\n\n\n<p>Now by standards we don\u2019t mean \u201cbest practices\u201d \u2013 we\u2019ll talk\nabout those in a moment. Rather, ensuring that personal data is anonymized in\norder to comply with GDPR, or that two-factor authentication against a central\ncorporate provider (such as Active Directory) is used, or that only certain\nindividuals have administrative privileges: where such standards are in place,\nthey are mandatory, not complying places the organization at considerable risk,\nand thus the system cannot be assessed as well-architected. <\/p>\n\n\n\n<p>However, best practices can be more flexible. For example, a\ncloud governance team may mandate the use of a particular cloud provider, a\ncertain set of landing zones, a particular relational database, and so on. In\nrare cases exceptions may be granted. Here the goal of such guidelines is intended\nto speed development and ease operations, by removing the need for every\ndevelopment team to waste time selecting the appropriate provider or service\nand for operations teams to learn them all. <\/p>\n\n\n\n<p>Granting such exceptions must be <em>intentional, <\/em>that\nis, careful analysis should uncover the core need for the exception; it should\nbe documented and possibly, the best practice should be updated. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Defining Your Software Architecture Strategy<\/h2>\n\n\n\n<p>As is true with best practices, the definition and importance\nof other aspects of software architecture will necessarily vary from\norganization to organization. When developing architecture assessments,\norganizations should consider what their <em>goals <\/em>regarding software\narchitecture are. For example, what are the relative priorities of:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Application performance<\/li><li>Application scalability<\/li><li>Developer productivity<\/li><li>Business continuity, including RTO\/RPO<\/li><li>Application visibility (observability) and\nself-healing<\/li><li>Software extensibility<\/li><li>Ease of upgrade<\/li><li>Usability (e.g., is it mundane\/functional or\nbeautiful?) <\/li><\/ul>\n\n\n\n<p>For example, for non-multi-national organizations\ngeoredundancy or multi-regional replicas may not be necessary. Others may\ndecide that the expense of active-active BC\/DR solutions is too high.<\/p>\n\n\n\n<p>Moreover, different applications will attach different\nlevels of importance to these criteria. For example, an intranet application that\nshows cafeteria menus need hardly be georedundant or be built with\nmicroservices \u2013 it wouldn\u2019t hurt, but perhaps resources could be devoted elsewhere!\n<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Strategy to Principles to Assessment <\/h2>\n\n\n\n<p>Having defined the organization\u2019s strategic goals from\nsoftware architecture \u2013 i.e., what is good software architecture and why it\u2019s\nnecessary \u2013 actionable principles can be developed. By \u201cactionable\u201d we mean\nthat developers can look at them and understand what must implemented, and\nperhaps even how. <\/p>\n\n\n\n<p>For example, if a key strategic goal is that applications should\nbe extensible, then a principle \u2013 that a developer can use \u2013 is that apps\nshould have a REST API, documented with OpenAPI or the like. <\/p>\n\n\n\n<p>A good starting point can be popular industry principles,\nsuch as the <a href=\"https:\/\/12factor.net\/\">The Twelve-Factor App<\/a> originally\nintended to guide the development of SaaS applications but in fact is very\nbroadly applicable (shown below, via <a href=\"https:\/\/en.wikipedia.org\/wiki\/Twelve-Factor_App_methodology\">Wikipedia<\/a>).\n<\/p>\n\n\n\n<table class=\"wp-block-table is-style-stripes\"><tbody><tr><td>\n  <strong>#<\/strong>\n  <\/td><td>\n  <strong>Factor<\/strong>\n  <\/td><td>   <strong>Description<\/strong>   <\/td><\/tr><tr><td>\n  I\n  <\/td><td>\n  Codebase\n  <\/td><td>   There should be exactly one codebase for a deployed service with the codebase being used for many deployments.   <\/td><\/tr><tr><td>\n  II\n  <\/td><td>\n  Dependencies\n  <\/td><td>   All dependencies should be declared, with no implicit reliance on system tools or libraries.   <\/td><\/tr><tr><td>\n  III\n  <\/td><td>\n  Config\n  <\/td><td>   Configuration that varies between deployments should be stored in the environment.   <\/td><\/tr><tr><td>\n  IV\n  <\/td><td>\n  Backing services\n  <\/td><td>   All backing services are treated as attached resources and attached and detached by the execution environment.   <\/td><\/tr><tr><td>\n  V\n  <\/td><td>\n  Build, release, run\n  <\/td><td>   The delivery pipeline should strictly consist of build, release, run.   <\/td><\/tr><tr><td>\n  VI\n  <\/td><td>\n  Processes\n  <\/td><td>   Applications should be deployed as one or more stateless processes with persisted data stored on a backing service.   <\/td><\/tr><tr><td>\n  VII\n  <\/td><td>\n  Port binding\n  <\/td><td>   Self-contained services should make themselves available to other services by specified ports.   <\/td><\/tr><tr><td>\n  VIII\n  <\/td><td>\n  Concurrency\n  <\/td><td>   Concurrency is advocated by scaling individual processes.   <\/td><\/tr><tr><td>\n  IX\n  <\/td><td>\n  Disposability\n  <\/td><td>   Fast startup and shutdown are advocated for a more robust and resilient system.   <\/td><\/tr><tr><td>\n  X\n  <\/td><td>\n  Dev\/Prod parity\n  <\/td><td>   All environments should be as similar as possible.   <\/td><\/tr><tr><td>\n  XI\n  <\/td><td>\n  Logs\n  <\/td><td>   Applications should produce logs as event streams and leave the execution environment to aggregate.   <\/td><\/tr><tr><td>\n  XII\n  <\/td><td>\n  Admin Processes\n  <\/td><td>   Any needed admin tasks should be kept in source control and packaged with the application.   <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>We can learn several things from 12-Factor:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Principles Must be Easy to Understand, and Actionable<\/h3>\n\n\n\n<p>There are many ways of framing principles, of which 12-Factor is just one. What is key is that developers should intuitively understand what it means to implement them. For example, in 12-Factor, &#8220;any needed admin tasks should be kept in source control&#8221; easily translates to putting IaC artifacts in a GitHub repo. <\/p>\n\n\n\n<p>Another common approach to documenting principles is called PADU, which stands for Preferred, Acceptable, Discouraged, and Unacceptable. PADU is attractive because it enables a range of options. For example, a &#8220;Preferred&#8221; approach to project management might be the use of an online <a href=\"https:\/\/en.wikipedia.org\/wiki\/Kanban_board\">Kanban board;<\/a> &#8220;Acceptable&#8221; might be a form of Agile; use of waterfall methodology might be &#8220;Discouraged;&#8221; and using Excel for project management would be &#8220;Unacceptable.&#8221;  Governance bodies (or the teams themselves) can then score themselves on a 0-3 basis and require a minimum score to deploy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Principles Must Evolve<\/h3>\n\n\n\n<p>Organizations must recognize that owing to technical\nadvances the principles may \u2013 and must \u2013 change over time. For example, the sixth\n\u201cfactor\u201d above mandates that processes should be stateless; yet in today\u2019s\nworld it is increasingly possible, both from a technical and cost-effectiveness\npoint of view to maintain state in business logic in certain circumstances. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Organizations Must Have Their Own Principles<\/h3>\n\n\n\n<p>Again, organizations may interpret industry principles according\nto their priorities and needs. Moreover they can \u2013 and should \u2013 add their own.\nFor example, 12-Factor does not mention building zero-trust computing\necosystems and for many, if not most, this is essential. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Assessing Software Architecture <\/h2>\n\n\n\n<p>Having created a robust set of principles, it\u2019s relatively\nstraightforward to measure the degree to which a given product or service\nadheres to them. Many organizations use scorecards to rate software in an\narchitecture review process, with minimum passing grades. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Value of Software Architecture<\/h2>\n\n\n\n<p>A not-so-obvious conclusion from this exercise is that there\nare fundamentally three value propositions of applying software architecture\nstrategies, principles, and assessments:<\/p>\n\n\n\n<p><strong>Usefulness, <\/strong>in other words, ensuring that the\nsoftware does what its users want it to do, in terms of features, availability,\nand scale, to name a few. <\/p>\n\n\n\n<p><strong>Risk mitigation. <\/strong>Compliance with regulations and\nstandards helps reduce the probability of a business or technical disaster.<\/p>\n\n\n\n<p><strong>Future-proofing, <\/strong>that is, enabling the product to grow both in terms of new features and the ability to exploit new technologies. <\/p>\n\n\n\n<p>It&#8217;s exceedingly difficult to quantify the value of architecture (and architects), however. Yet it is intuitive that software cost estimation models such as <a href=\"https:\/\/www.geeksforgeeks.org\/software-engineering-cocomo-model\/#:~:text=Cocomo%20(Constructive%20Cost%20Model)%20is,cost%2C%20time%2C%20and%20quality.\">Cocomo<\/a> (Constructive Cost Model) which base estimates on line of code (specifically, e=a(KLOC)<sup>b<\/sup>)  could benefit &#8212; i.e., improve their accuracy &#8212; by including coefficients for architectural influence.<\/p>\n\n\n\n<p>Many thanks to Miha Kralj of EPAM Systems, Jim Wilt of Best Buy, and Bill Wood of AWS for their comments and suggestions. Errors of course are my own. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Barry Briggs [JUST A DRAFT RIGHT NOW!!] Over the past few months I\u2019ve been working with some old friends at the International Association of Software Architects (IASA) to try to figure out some way to quantitatively measure the value of software architecture. We\u2019re trying to come up with answers to the following questions: Why &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.barrybriggs.com\/blog\/uncategorized\/measuring-the-value-of-software-architecture\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Measuring the Value of Software Architecture&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"episode_type":"","audio_file":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","date_recorded":"","explicit":"","block":"","filesize_raw":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-136","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":4,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":143,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/posts\/136\/revisions\/143"}],"wp:attachment":[{"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.barrybriggs.com\/blog\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}