<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jeff Coble on Medium]]></title>
        <description><![CDATA[Stories by Jeff Coble on Medium]]></description>
        <link>https://medium.com/@jeffcoble?source=rss-e8ada8901e13------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*3Icz5POGNhrKzDypPb6Tqw.jpeg</url>
            <title>Stories by Jeff Coble on Medium</title>
            <link>https://medium.com/@jeffcoble?source=rss-e8ada8901e13------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 11:46:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jeffcoble/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Driving Software Improvement with Metrics]]></title>
            <link>https://medium.com/@jeffcoble/driving-software-improvement-with-metrics-2d89daf05fec?source=rss-e8ada8901e13------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d89daf05fec</guid>
            <category><![CDATA[metrics]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-metrics]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jeff Coble]]></dc:creator>
            <pubDate>Wed, 22 Jan 2025 21:21:11 GMT</pubDate>
            <atom:updated>2025-01-22T21:21:11.122Z</atom:updated>
            <content:encoded><![CDATA[<p>For the past couple of years I’ve been driving an effort to improve the reliability of the software products for which my organization is responsible, and I have been heavily involved in similar efforts to improve reliability and availability across several companies and teams in the past. In this article I’ll share some insights and discuss some challenges with our use of metrics for software improvement.</p><h3>How It Started</h3><p>The engineering organization that I manage is responsible for building software tools, which we refer to as “automations,” to manage the operational lifecycle of the company’s products in our private cloud and multiple public clouds. We build and maintain roughly 50 different automations supporting lifecycle operations, such as provisioning new software services, moving live instances of software services across data centers and regions, and managing the failover of software services from the primary to the standby side, among many others. Our automations are used to perform tens of thousands of lifecycle operations per month, and many of our automations implement complex business processes, representing years of accumulated requirements scope and system complexity. Many of our automations are used by our internal Operations team, but some are triggered by sales actions (e.g. provisioning new software), and there are cases where our external customers use our automations directly to trigger a lifecycle operation.</p><p>At the time I joined the organization, there was a perception that the failure rate for lifecycle operations was too high — causing customer pain and additional work for our Operations team — so the company’s senior engineering leadership prioritized improving the reliability of our automations. We defined two metrics to evaluate reliability, rooted in two goals. We defined metrics for Customer Success and Automation Success, which represent two different perspectives on lifecycle operations. If the lifecycle operation is successful from the customer’s perspective, then we consider that operation to be successful, even if it requires human intervention from our Operations team to complete — that’s the <em>Customer Success </em>rate metric. <em>Automation Success</em> is then measured as lifecycle operations that are successful without any human intervention — i.e. it is successful from both the customer and Operations perspectives. These two metrics reflect our goals to reduce customer pain and reduce Operations overhead. For both of these metrics we were given <a href="https://en.wikipedia.org/wiki/Objectives_and_key_results">OKR</a> (objectives and key results) targets, meaning my team’s performance was evaluated in part on whether we brought the reliability rate for key automations up to the target.</p><h3>Measurement</h3><p>Software reliability is an overloaded term, and can mean different things to different people. To define our metrics, let’s start with the error rate. Our definition of error rate is consistent with its definition in Google’s <a href="https://sre.google/sre-book/monitoring-distributed-systems/">Four Golden Signals</a>. For the Customer Success Rate metric, any incident that causes an automaton to fail to complete it’s function for the customer is counted as an error. For the Automation Success Rate, any error that is internally facing, even if it is not customer facing, is counted as an error. As mentioned above, many internally facing errors can be resolved by our Operations team before they turn into a customer-facing error. The success rate metrics are then calculated as follows, over any period of time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*K_csaSgiYNgCDFJGgPmbbw.png" /></figure><h3><strong>Good Observability Is Table Stakes</strong></h3><p>When we started work to improve our reliability, we didn’t have easy access to failure rate data or the causes of failures, which was a significant obstacle. We first had to prioritize improving our observability so that we know when automations are failing and why.</p><p>There are multiple facets to Observability, and multiple consumer perspectives, so we had to choose where to start improving Observability to enable our reliability work. For our purposes, we wanted the ability to easily review our metrics for Customer Success and Automation Success rates at any moment in time, as well as to collect aggregates so that we could analyze trends over time — e.g. the monthly success rate trend for the past 12 months. It was also important to know why our automations were failing, so we spent time to align our automations on a canonical set of error codes and an association of those codes to error categories that correspond to external service dependencies. E.g. aggregating a set of errors so that we can see if they are attributed to the failure of a load balancer or a crypto service. This required changes to the instrumentation in our code as well as work within our Big Data system to map error codes to categories for reporting purposes.</p><p>In a situation like ours, with multiple external dependencies that were impacting our failure rates, having clear data proved invaluable. Our ability to illustrate the specific impact of an external service on our failure rate has been key to driving the prioritization of improvements for the responsible teams, and it has been useful to align senior engineering leadership around the systemic nature of reliability improvements, which I’ll discuss more in the following sections.</p><p>It is worth mentioning that correctly attributing errors to specific services remains a challenge because our error codes and traceability are insufficient to associate many errors to services without extensive engineering effort to triage the root causes of failures. Solving this problem will require a persistent effort to improve error handling across our system, not just within automations.</p><p>We’ve only just begun our work to improve observability — we have more to do to drive common error codes and categories across external services, to improve dashboards to enable navigation across connected error and diagnostic information, to reduce Mean Time to Detect with alerting improvements, and to reduce Mean Time to Repair with improved logging and tracing — but investing in these observability building blocks was an essential early step in our reliability improvement work.</p><h3><strong>Reliability Is A System Problem</strong></h3><p>In the sections above, I discussed the perception that lifecycle operations were failing too often, so a reliability target was established for key automations in the form of an OKR. This turned out to be a necessary but insufficient step toward achieving our improvement objective. Achieving improvement in “ilities” — e.g. reliability, availability, scalability, etc. — in a distributed system requires multiple teams to participate in the solution. All of the system’s components and services participating in a business process must perform their respective functions reliably enough to achieve the reliability target for the overall business process, and their uptime (availability) must be high enough so that it doesn’t impact the reliability of the service’s consumers.</p><p>Our automations implement lifecycle operations by orchestrating across multiple infrastructure services, and those infrastructure services were not given their own reliability targets for which they were independently accountable. Why is it important to cascade reliability/availability requirements down the stack? Because the alternative is for the team who owns the overarching business process to drive point solutions for specific failures (defects) with each downstream service owner. That approach doesn’t scale, but more importantly, point solutions aren’t sufficient to consistently improve reliability. Bringing about a step-function change in reliability usually requires some fundamental change in the way you design or operate your services — e.g., better monitoring, redesigning architecture, new technologies, refactoring code, improving testing processes, etc. — and only the teams responsible for those services are in the position to truly understand the best investments to make in those areas, so those teams must be incentivized to prioritize that work through an accountability mechanism — i.e., by tracking their own metrics in a coordinated effort to improve an overall business process.</p><p>Coordinating priorities and investments across organizational boundaries is a ubiquitous challenge in large organizations. The lesson here is obvious — prioritize your improvement objectives consistently across teams or you’re unlikely to fully achieve your improvement goals. This is usually something that can only be done at senior levels of the organization, where leaders have sufficient span of control to levy requirements and set priorities across multiple teams.</p><h3><strong>Focus on Goals, Not Targets</strong></h3><p>You’ve probably heard the phrase “<em>what gets measured gets managed.</em>” It seems obvious — the things you track are things to which you pay close attention— but in practice metrics are often chosen poorly or used ineffectively, leading to wasted effort.</p><p><em>Metrics are a means to an end, they are not themselves the end.</em></p><p>If you’re a software engineering manager, chances are your performance is being evaluated in part based on metrics designed to track your progress toward improving something for which you are responsible — e.g., software quality or performance, engineering productivity, organization health, etc. We invest the time to collect and evaluate a metric because it is intended to be a proxy for something important, but that important thing is often lost in the focus on achieving a metric target. Before you define the metric, ensure that you understand what you’re really trying to improve, and think carefully about whether you’re using your metrics in a way that is helping you achieve that objective.</p><p>The error rate of a software service is obviously a valuable metric — it contributes to our understanding of how our system is behaving. However, in the case of our success rate metrics, over time it became clear that measuring the error rate was not a great proxy for the impact on customers or on our Operations overhead. Many automation errors have almost no impact on customers and can be resolved with minimal intervention, while in other cases a single failure can take dozens of engineering hours to diagnose and resolve, and may significantly impact customers. The error rate alone does not distinguish between errors with little impact and those with substantial impact.</p><p>It would be preferable to directly measure an error’s impact on customers or Operations, but this can be much harder to automate through software instrumentation and dashboards. It is often true that the most useful information is more difficult to measure directly (the field of Business Analytics exists for a reason). In our case, we are working to ensure we create tickets to track all Engineering and Operations support engagement activities as a way to measure the impact to our teams. Tickets alone don’t directly capture the hours involved, but it is a better proxy for support overhead than the error rate. Customer-filed support cases are also useful as a measure of customer impact, but they are also imperfect as they do not directly capture the magnitude of the impact.</p><blockquote><strong>“When a measure becomes a target, it ceases to be a good measure.”</strong></blockquote><blockquote>— Goodhart’s Law</blockquote><p>Stated another way, Goodhart’s Law says that a metric which becomes a target will eventually be gamed to achieve that target.</p><p>A metric and it’s target shouldn’t be viewed as an end, but rather we should use metrics as a means to help us understand what is happening in a complex system. Complex systems are best understood through multiple metrics, which often have a relationship to one another.</p><p>Unit test coverage is a <a href="https://martinfowler.com/bliki/TestCoverage.html">classic example</a>. It is common to collect and review metrics for unit test coverage, and there’s almost always an associated target — e.g. 85% — to which engineering teams are held accountable. The real goal is usually to improve the customer experience by reducing the number of defects escaped to production, and high unit test coverage — <em>with high-quality unit tests —</em> can play a role in achieving that goal. In practice however, what we often see is an increase in unit test coverage without a commensurate reduction in defects escaped to production. Why? Because we focus too much on the metric target and lose sight of the real goal. Engineers write lots of ineffective unit tests, receive effusive praise for achieving their target, and we celebrate the victory.</p><p>The emphasis on targets can have adverse consequences. For example, when service orientation was first emerging as a popular architecture pattern, I worked as a software architect at a company where the CTO, not to be outdone by the infamous <a href="https://apievangelist.com/2012/01/12/the-secret-to-amazons-success-internal-apis/">Bezos mandate</a>, declared that all teams must build services. He proceeded to regularly evaluate teams based on the number of services they had built — more was better. At each quarterly review we were required to present the number of services our teams had built. Those who had built many services were praised, those who had built few services were admonished. As you might imagine, this led to a proliferation of disjointed, unmanageable, unsupportable services. The metric was gamed because it had become a target. Had it not been associated with a target, the number of services built could have been an informative metric, along with others, to help understand the evolution of the architecture.</p><p>Metrics targets can be distracting and lead to unproductive behavior, but how should we evaluate our progress toward an error rate target? We have found that the trend over time is the most important measure, and we want to see a trend that is tightly converging to a target — i.e. very little variance. Even if on average we are achieving our target over a period of months, if we have high month-over-month variance in our error rate, then we can infer that our system is unstable. The volatility in the error rate can be attributed to a number of issues — e.g. bursts of defects correlated with software releases, periodic outages of services due to an availability or scale issue, periodic customer usage patterns that coincide with specific edge case defects, frequent human errors, etc.</p><p>Even if you’re not achieving your target error rate, I’d still argue that consistency in the trend is the first priority. If your error rate is stable, then it is predictable, and chances are you know with certainty what quality improvement investments can further reduce your error rate.</p><p>For our specific work, our trend data tells us that we made a significant improvement in our reliability in the first few months of our efforts, when we built in resiliency mechanisms (e.g. retries for external failures, tuning timeouts, etc.) and burned down our defect backlog. Since then, our error rate trend improvement has slowed, which is expected, but the variance is still too high. That is because we’ve addressed nearly everything under our control, but the reliability and availability of our external service dependencies is still somewhat volatile, which causes consequential month-over-month variance in automation reliability. As I said above, <em>reliability is a system problem</em>.</p><h3>Managing with Metrics</h3><p>Each week my team and I meet to evaluate our reliability metrics for the previous week. We review each failure, aggregated for the service causing the failure, and determine the actions to be taken. We also meet with a broader set of stakeholders each week to review automation failure data through the lens of customer impact. The weekly evaluations are focused more on immediate remediations and near-term actions to stop additional impacts from open defects or live-site issues.</p><p>On a monthly basis we review failures aggregated into categories and month-over-month trends. A month’s worth of data provides a sample size large enough not to be subject to minor anomalies, but also recent enough to be relevant to where we are at the present moment. We look at the metrics each month relative to our targets, we look at the month over month trend to determine if our investments are yielding results over time, and we look at the constituent causes of errors to identify new areas for investment and to evaluate progress in those areas through trend analysis. We use this data to focus our own internal investments and to discuss the impact external services are having on our automations with the service owners, which helps them prioritize their own improvements.</p><p>Using these metrics as a tool for gaining insight and making decisions about investments has been invaluable. Moreover, the emphasis on improving observability and regularly reviewing metrics for the purpose of making smarter investments has changed my team’s culture and has influenced the culture in the broader engineering organization. However, it’s worth acknowledging that because our OKR target is focused purely on our error rate, we are incentivized to focus on quantity rather than impact. Resolving issues that reduce the number of errors brought us closer to our OKR target than resolving issues that reduced the engineering overhead or customer impact, but were not necessarily frequent. We are mindful of this when we prioritize our work, but it does underscore the point I made above about thoughtfully choosing your metrics relative to your real objectives.</p><h3>Conclusions</h3><p>In summary, here are a few key takeaways from our experience.</p><ul><li>Invest in Observability. When driving change, good data is an invaluable asset.</li><li>Ensure that the full scope of the change you’re driving is understood, and all responsible teams are working with the same set of shared incentives and priorities.</li><li>Do not superficially focus on metrics targets. Spend time understanding the real goals behind the metrics, and ensure you’re effectively using your metrics to achieve those goals.</li><li>Recognize high month-over-month variance in your metrics as the system instability issue that it is, which may require a more systemic solution.</li><li>Integrate data into your management strategy and processes. The point of collecting metrics is to inform your prioritization and decision making. Use them accordingly.</li></ul><p>We have more work to do, but I consider our reliability improvement effort to be generally successful. We have significantly improved the reliability of our products and in doing so we’ve improved the experience for our customers. The integration of data into our management culture is here to stay and will continue to be an essential tool in the way we approach our work, and our example has influenced the broader engineering organization to do the same.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d89daf05fec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Service Architecture Governance]]></title>
            <link>https://medium.com/@jeffcoble/service-architecture-governance-384278fc0794?source=rss-e8ada8901e13------2</link>
            <guid isPermaLink="false">https://medium.com/p/384278fc0794</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[services]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[governance]]></category>
            <dc:creator><![CDATA[Jeff Coble]]></dc:creator>
            <pubDate>Fri, 24 Apr 2020 01:49:44 GMT</pubDate>
            <atom:updated>2020-04-24T01:49:44.780Z</atom:updated>
            <content:encoded><![CDATA[<h4>Leveraging Expertise to Deliver Business Value</h4><p>Over the past few years, I have had the opportunity to participate in several efforts across different companies to adopt service orientation as an architecture strategy. In some cases, we were building green-field systems. In other cases, we were transforming an existing codebase, often one that was monolithic in structure (rather than cleanly modular). All of these projects involved a substantial effort to build supporting tools and infrastructure, such as language frameworks to provide common functionality for developers, components to manage and route API requests, protocols and services to secure a distributed call chain, infrastructure to support data denormalization, components to manage orchestration and choreography, and tools to provide robust testing, monitoring and diagnostics.</p><p>Although developing this supporting infrastructure presented challenges, those challenges were always surmountable, in part because so many successful patterns, best practices, and 3rd-party tools already exist in industry to address these requirements. The greater challenge has always been to build the right set of services to deliver the technical and business outcomes we set out to achieve with service orientation, while avoiding the pitfalls of managing a complex distributed system.</p><p>In my experience, it is difficult to achieve a coherent service architecture for a complex set of business domains without some degree of initial “<em>architecture runway</em>” followed by sustained stewardship of the evolving service architecture and API design. This article makes that case for that <em>service architecture governance — </em>a deliberate design activity to lay the architecture foundation and manage its evolution — and offers some ideas about forming successful governance teams.</p><p>The value of architecture governance is a subject of contention in the tech industry. Some argue that a purely bottom-up approach is more efficient, where each team works independently to build what they need, and then consolidation and reuse happens organically. Smart people can disagree on this subject, but in my experience, a purely bottom-up approach results in more lost time, more throw-away work, significantly more chaos and developer pain, and potentially more instability and downtime for the system. As I’ll explain in subsequent sections, the choice isn’t necessarily binary.</p><p>A successful governance process can turn pockets of excellence into consistent quality and predictable outcomes by leveraging expertise in a way that benefits the entire organization, increasing the likelihood that the advantages of service orientation will be realized, while avoiding common mistakes.</p><p><em>✔️ </em><strong>Nomenclature</strong></p><p>Part of the challenge surrounding any discussion of service orientation is that there is still widespread disagreement and misunderstanding in the industry about what constitutes a <em>service</em>.</p><p>Service orientation predates the term “<em>microservice,</em>” a term some believe emerged when industry trends shifted from SOAP/WSDL-based services to REST-based services. I have intentionally dropped this term from my writing because many have interpreted “microservices” as an endorsement of an architecture strategy that includes many fine-grained services. Perhaps the exceptional use cases exist, but in my experience, I have never encountered a situation where a system comprised of hundreds or thousands of unique, distributed, first-class components was desirable or feasible.</p><p>The idea of designing software systems with many distributed “parts” is not new. We tried this years ago with CORBA (distributed objects), and learned hard lessons about the costs associated with overly-complex distributed architectures. And then we learned those lessons again with distributed web/enterprise component technologies (e.g. RMI, DCOM). Today postmortem articles regularly circulate from engineering leaders who have gone down the path of building a system with many (often thousands) of fine-grained (micro)services. Predictably, they become overwhelmed by the complexity of integrating, testing, deploying, operating, and maintaining the system, and then unfortunately declare the whole concept of service orientation to be a misguided fad.</p><p>A full discussion of the criteria and tradeoffs around identifying functional service boundaries is beyond the scope of this article, but these misapplications of service orientation serve as evidence as to why I believe governance is necessary. Experienced engineers should guide service orientation efforts down a reasonable path by approaching service architecture design through a tradeoff of a variety of cost/benefit factors, and with a full understanding of the cost of complexity.</p><h4>Deliver Business Value Through Governance</h4><p>In a <a href="https://medium.com/@jeffcoble/from-product-to-platform-5d6857e55afb">previous article</a>, I discussed the business and technical objectives of a platform architecture built around service orientation. Not all organizations who leverage services as an architecture strategy intend to build a platform, but I would argue that the choice to use service orientation is inherently a choice to support composition and reuse, both within and across domain teams, and a choice to pursue release and change isolation, to allow teams to work and deploy more independently. If that is the case, then many of the governance challenges of a platform architecture are relevant to the widespread use of services within an organization.</p><p><em>✔️ </em><strong>Composition and Reuse</strong></p><p>We would like services to expose key business (domain) capabilities as reusable building blocks, so that they can be composed by application developers into unique workflows in ways that may not be foreseeable by the service developer. As I’ll discuss in later sections, there are significant technical challenges involved with choosing the right service boundaries to enable composition and reuse.</p><p>The technical goal of composition and reuse of domain capabilities is driven by business goals such as improved developer productivity, reduced time to market, increased business agility, and complexity reduction leading to greater system resiliency.</p><p>Any discussion of composition and reuse should acknowledge that this has always been a key objective of the field of Software Engineering — it isn’t new to service-oriented architectures. Attempts to achieve this objective have manifested through programming models (e.g. Object-Orientation), modularity strategies (e.g. libraries, components), distributed invocation technologies (e.g. CORBA, RMI, SOAP, REST), infrastructure technologies (e.g. web and Java bean containers), and tiered architecture patterns, among others.</p><p>The relative success or failure to achieve composition and reuse using any of these techniques has always depended significantly on the skill and experience of the engineers wielding the tools at their disposal, which is one of the more compelling reasons for service architecture governance. Many technologies and architecture patterns are ultimately dismissed as not useful or overhyped because they are applied incorrectly or inconsistently, leaving organizations to reap few of their purported benefits and most of their known pitfalls. Governance is our way to leverage expertise, both technical and domain knowledge, which is usually in short supply, and to collect and apply lessons learned across the organization.</p><p><em>✔️ </em><strong>Release and Change Isolation</strong></p><p><em>Release isolation</em> is the ability for teams to deploy services independently from any other service, thereby increasing their development velocity and reducing the time to market. The intent is for a service to be self contained, with it’s dependencies satisfied through network calls to other services, relying only on the service’s interface. This goal is usually pursued in conjunction with CI/CD pipelines that allow teams to automate testing and deploy their code to the target environments at any time.</p><p>We achieve release isolation by making good design-time choices with regard to how we scope the boundaries of our various services, so the functionality within the service boundary is tightly coupled and highly cohesive, and subsequently, different services are loosely coupled. If a team can’t change the code within their service without also requesting another team make changes, then we have not achieved release isolation because the services are tightly coupled.</p><p>The separation of concerns we achieve by having smaller, discrete architecture components (e.g. services) with a narrow and comprehensible functional scope can also significantly improve overall system resiliency. The scope of changes can be contained to the individual service or domain, thereby improving our ability to reason about the effects of a change, which can simplifying testing. Contrasted with a large monolithic codebase, where the implications of changes can be difficult to fully understand because of the lack of separation of concerns.</p><p><em>Change isolation</em> refers to the independence teams achieve by creating programmatic dependencies only on a service’s interface, not the underlying implementation. As long as the contract remains unchanged or backwards compatible, the implementation team can make their technology choices independently, without concern for the churn it may cause their consumers. There are reasons why a business should want to align around a common set of technologies and frameworks, usually because of the costs of supporting an unnecessarily diverse portfolio, but teams are still free to make choices that may be required to satisfy their use cases, as long as their interfaces remain agnostic of those choices. Allowing teams to operate more independently again improves developer velocity and reduces time to market.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*mQRyBTJIpBS94n8iOmUiOQ.png" /><figcaption>Figure 1. Application Services leverage domain services to integrate key business capabilities into application workflows. This separation of concerns allows domain capabilities to be composed and reused in unique flows</figcaption></figure><h3>Service Architecture Governance Objectives</h3><p>The objective of a governance process is to enable independent teams to create services and APIs that form a coherent system architecture. What do we mean by <em>coherent</em>? Services should be disambiguated from each other in terms of their scope and functionality, and services should deal with similar concepts with respect to the entities on which they operate. This is necessary to achieve the composition and reuse objectives discussed above.</p><p>We also facilitate coherency with a simple, intuitive set of APIs. The APIs across the breadth of services should be highly consistent in terms of their protocols, standards and schema definitions (manifested as RESTful resources, RPC objects, etc.). The consumer tooling (SDKs, authorization model, sandboxes, documentation, etc.) should also be highly consistent. Disjointed APIs across services causes significant friction for consumers, adding ramp-up overhead as developers invest time in understanding each disparate API for the services they use.</p><p>A governance process can help teams achieve the intended technical and business outcomes by providing expertise in the design methodologies, by helping teams realize service-oriented architecture principles for their specific use cases, and by bringing the whole-architecture perspective into the local team’s myopic design process. In the sections below, I outline some of the key architecture outcomes that a governance team would work to achieve.</p><p>✔️ <strong>Separation of Application and Domain Code</strong></p><p>Domain use cases represent the core functionality that is unique to a particular business. These are the capabilities that businesses usually market as key discriminators, so they are the capabilities that we want to leverage for composition and reuse across the business. They often represent areas of significant investment, and are therefore the most difficult capabilities for teams to replicate, adding to the motivation for reuse.</p><p>When core business capabilities are intertwined with application workflows, those capabilities become locked into a specific set of business processes and are subsequently much harder to leverage in new ways when developers want to experiment, if the business wants to expand into new markets, or if the business needs to pivot to respond to market demands. But when business capabilities are independently accessible as services and cleanly separated from application workflows, 1st, 2nd and 3rd-party product developers have the flexibility to reuse and compose those capabilities in unique and innovative ways without the baggage of application-specific constraints. Figure 1 illustrates this concept.</p><p>Achieving this separation is challenging because it is often not clear what constitutes an application-specific use case, and what constitutes a reusable, composable domain use case. This is especially difficult when teams have grown accustomed to building a single, monolithic application, and are now asked to think about the distinction between an application concern and a domain (or platform) concern. Under such circumstances, the distinction between <em>application</em> and <em>domain</em> is often a foreign concept. Expedience also plays a role in failing to separate concerns. In the short term, it is likely faster to plow ahead and push out a feature without thinking about the separation of domain and application, but then a higher price is paid later when significant refactoring is required to make the separation needed to support a new application flow, or domain capability has to be replicated in the new flow.</p><p>Creating a <em>service taxonomy </em>— a definition of service classes and their purpose — can be a useful mechanism to help teams begin to understand the role of different types of services in your architecture, such as the distinction between application and domain services. For example, I have often defined the purpose of an application service as follows:</p><blockquote>To consume the business capabilities provided by domain services, a specific application may need back-end logic (e.g. <a href="https://samnewman.io/patterns/architectural/bff/">BFF pattern</a>) to shape data, orchestrate workflows, or otherwise tailor the domain service’s response to meet the needs of the specific application. An application service provides this functionality for an application.</blockquote><p>You may choose to define several types of services to facilitate your own desired separation-of-concerns outcomes, but keeping it simple is usually a good idea. I typically start with three types of services — <em>application</em> (defined above), <em>domain</em> (i.e. unique business use cases), and <em>infrastructure</em> (i.e. use cases common throughout the industry, such as messaging, token generation, etc.).</p><p>✔️ <strong>Separation of Domain Capabilities</strong></p><p>Similar to separating application logic from domain logic, we need to carefully consider how we separate distinct business functionality into discrete services. In part, this is done by examining the coupling and cohesion of domain capabilities, where we want services to encapsulate tightly coupled, highly cohesive functionality. If we intertwine too much together into a single service, we may limit the ability of consumers to independently compose specific functionality into unique workflows. Conversely, if we separate tightly coupled functionality into distinct services, we may create unnecessary dependencies and limit our ability to change and release services in isolation. And as I mentioned in the opening sections, too many unique services can also cause unmanageable architecture complexity.</p><p>Services that overlap in scope or operate on a vastly different set of concepts or granularity of entities can be difficult to orchestrate into application workflows. Domain modeling, through a process called <a href="https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215">domain driven design</a>, has proven to be a useful tactic for identifying service boundaries and defining common concepts and useful abstractions within a service architecture. A domain model represents the way we organize and think about a business’s product capabilities, the conceptual building blocks, and their relationships. The domain model will inform the way we decompose business capabilities into services and design the subsequent object models and data models.</p><p>Domain driven design isn’t very effective to achieve architecture coherency if individual teams are applying it in isolation, as they will most certainly arrive at very different conceptual views of the system. To be useful, we at least need to start with a common organization of the top-level domains, and to agree on a common lexicon for key concepts. This is where the governance process can provide expertise on the methodology and ensure the necessary degree of standardization.</p><p>✔️ <strong>API Design</strong></p><p>If you accept the premise that a (domain) service is more than just a backend for an application, but rather it represents a unit of reusable business functionality that is meant to be composed, along with other services, into unique user flows, then good API design is an essential requirement to improve intuitiveness and reduce developer pain.</p><p>Designing an intuitive API is much harder than is often recognized. Good APIs are designed from a developer-back perspective, meaning they are designed to be as easy as possible for a developer to consume, which is often not what is the easiest for the API provider to implement. That is why so many APIs are difficult to use — because the provider took shortcuts to reduce the implementation pain.</p><p>What is the role of governance for API design?</p><p>🔹 <em>Align on Industry Conventions and Best Practices</em></p><p>With respect to REST APIs, many variants exist in the wild, but industry best practices and conventions do exist, many of which are often poorly understood or misapplied. The semantics, structure and scope of resources and their payloads, and the use of HTTP operations, should all obey conventions, because doing so will improve the intuitiveness of the API and make it easier for developers to consume. The governance process should drive for this consistency across disparate teams.</p><p>🔹 <em>Utilize Protocols &amp; Standards Consistently Across all APIs</em></p><p>Many different standards and protocols are used to provide a variety of basic API capabilities, such as authorization, versioning, error format, response and error codes, idempotency, primitive entity and field names, etc. Aligning on a single set of standards and protocols for all service APIs will greatly reduce the adoption overhead for consumers. The governance process should drive for this consistency across disparate teams.</p><p>🔹 <em>Drive API Organization Around Business Capabilities</em></p><p>When many services are brought together across several related business domains, the (REST) resource model can become large, disjointed, and hard to consume. Without governance, it is not uncommon to see API hierarchies designed around org structure or the underlying architecture components, which provides no value to the API consumer and exposes unnecessary complexity.</p><p>An API resource hierarchy should be organized to help an application developer find and utilize key business capabilities that support their use cases. The resource model should also be organized to allow for seamless expansion of business capabilities over time, without significant refactoring of the API structure. Designing for these outcomes requires both a breadth and depth of understanding of the respective domain use cases, and typically requires a collaboration between engineering, product managers, and those who understand the developer community (particularly when targeting 2nd and 3rd party developers).</p><p>🔹 <em>Align on Requirements for Supporting Tools and Infrastructure</em></p><p>It takes a considerable investment in tooling and infrastructure to support developers creating APIs, developers consuming APIs, and to manage API traffic in production systems.</p><p>Providing tooling to create API contracts brings with it useful features and efficiencies for developers, such as auto-generating language stubs for service developers, client SDKs for multiple languages, and documentation. We usually also want to provide some lifecycle management tooling for API producers to configuration-control contracts and schemas, to integrate with service frameworks to populate the development environment with the generated stubs, and testing tools to validate conformity to contracts.</p><p>In the production system, it is common to find infrastructure services that manage the incoming API requests to enforce policies and contract compliance, map and route incoming API calls to internal services, collect usage and health metrics, manage security tokens, and enforce rate limits.</p><p>While the governance process does not provide these tools, it can be used to align the organization around a common set of requirements and priorities so that a team can build or acquire the right solutions in the most useful sequence.</p><p>🔹 <em>Change Management</em></p><p>So far we’ve talked about the governance scope for designing a consistent API and the supporting tools and infrastructure. Changing an existing API can also be challenging when the API is broad in scope. Developers will often attempt to add support for a use case into the wrong resource, or unnecessarily propose adding a new resource for their use case, simply because they aren’t familiar enough with the API to know how and where to make changes. The governance process can help maintain tribal knowledge about the API design, and the governance team can then help guide domain teams to maintain coherence as they evolve the API implementation to support new use cases.</p><p>✔️ <strong>Common Tools and Infrastructure</strong></p><p>In the section above I discussed the need to align on tools and infrastructure to support API design and development. The same is true for developing services, the broader problem of integrating distributed services in a multi-region site architecture, testing and deploying a distributed service architecture, and managing and monitoring services in production.</p><p>Organizations typically invest in language-specific frameworks that provide a consistent implementation of common capabilities (e.g. logging, monitoring, alerting, security token handling, integrations with common dependencies like permissions services, database services, etc.). They also create release pipelines for pre-prod and prod environments that automate the test pyramid, provide security scanning, and support incremental deployment capabilities to safely manage changes. Infrastructure may also be required to create and execute policies for managing complex failure scenarios in a multi-region hosting architecture comprised of distributed call chains involving multiple services.</p><p>It is remarkably challenging to derive and prioritize requirements for common infrastructure, and to manage its evolution to meet business needs over time. Governance can play a role in aligning teams around the requirements for various infrastructure efforts, and to provide the system-wide perspective needed to align on priorities.</p><p>✔️ <strong>Avoid Antipatterns</strong></p><p>As discussed above, many service architectures fail to deliver the value that was anticipated, and this often manifests as an overly-decomposed or inconsistently-designed service architecture.</p><p>As the saying goes, <em>when all you have is a hammer, everything looks like a nail</em>. Service orientation is one modularity strategy, but not the only modularity strategy. It is used to achieve specific benefits, but it is not a replacement for traditional component architectures. Many attempts at service orientation fail because teams turn every component into a service, creating lots of fine-grained, tightly coupled services. This turns into a distributed topology of hundreds or thousands of services, which significantly complicates testing, deployment, management, monitoring, and debugging. Performance is typically degraded because of the call chain depth, and bottlenecks can emerge because of the difficulty in understanding the fan out of requests. It can be nearly impossible to understand the behavior of a distributed system with so many unique services, which ultimately makes the system less resilient, because we simply cannot fathom all of the failure scenarios. And for what? Many of these “services” have one or two consumers, and cannot be released independently. Organizations that pursue this strategy get all of the pain and almost none of the promise.</p><p>The governance process can help avoid such mistakes, which are often born from inexperience, by leveraging expertise and applying it consistently across the entire organization.</p><h3>Creating a Governance Process</h3><p>The specific design of a governance process will vary based on the way your business is organized, where you are in the lifecycle of your service architecture, and how coherent your architecture needs to be across domains, but I do believe there are guiding principles that can be generally helpful, and some are more broadly applicable to other technical governance processes.</p><p><strong>✔️ Designate a Leader</strong></p><p>A service architecture governance process requires involvement from a variety of technical and domain experts, but it is important to set up the process and team for success by clearly designating one person to lead the process and the team. There’s nothing less effective and less efficient than a committee without a leader. Clearly communicate who the leader is, and be clear about his or her roles and responsibilities. Ambiguity about the scope of the role is disempowering for the leader and confusing to the team, so consider using a decision-making framework, such as <a href="https://www.atlassian.com/team-playbook/plays/daci">DACI</a>, to add clarity.</p><p><strong>✔️ Choose the Right Leader</strong></p><p>Technical leadership is an art form. Although I advocate that a leader be designated for the governance process, with authority to make decisions, the leadership qualities of the leader do matter a great deal.</p><p>Those in technical leadership roles often operate under the mistaken assumption that their job is to be the oracle of all knowledge — the one expert to which all of members of the team bring decisions for disposition. Not true. In fact, I consider it to be a leadership antipattern if a team leader is so strongly opinionated that they drown out other voices, and cause engineers to be reluctant to offer dissenting opinions. The loudest voice should not always win, and the loudest voice should certainly not be the team leader.</p><p>For most complex engineering problems, no one person has all of the knowledge and expertise required to understand all of the details well enough to make good decisions. That’s why we need a <em>team</em> of experts. So the first job of a technical leader is to assemble the right experts with a representative set of skills and perspectives into a governance team.</p><p>Once the team is formed, the primary role of the technical leader is to ensure that the design topics are fully explored, and that the group is benefitting from the insights of the diverse set of experts. This is harder than it seems. Some engineers are reluctant to take the risk of speaking up and exposing gaps in their knowledge, while others have never met a topic about which they didn’t want to opine. The job of the leader is to build trust in the team, to elicit contributions from each participant (they’re there for a reason!), and to guide the team to distill information into a framework for making reasonably-objective decisions.</p><p>When making decisions, outlier perspectives should always be heard and respected, but if the process is led correctly, a majority of the team of experts will almost always lean in the same direction, so the right decisions will typically be clear, and broadly supported. The process leader should strive to make the final call only when no decision is clearly supported by the majority of the team. If you are routinely making decisions that are contrary to the recommendations of most of your experienced team, you’re probably doing something wrong, and more importantly, you are unlikely to enjoy broad support for those decisions across the organization.</p><p><strong>✔️ You Can’t Get Something for Nothing</strong></p><p>Many governance efforts fail because of underinvestment, so ensure that those involved are able to spend the necessary amount of time to do justice to the complexity of the governance task. The amount of work involved in governance will vary depending on the maturity of the architecture and API design, but as a rule of thumb, no one involved should spend less than 25% of their time on this work until the architecture is relatively baked. Anything less usually means important architecture decisions are being made with insufficient context, which defeats the purpose of governance.</p><p><strong>✔️ Consider Separating API Governance from Service Design Governance</strong></p><p>For the sake of clarity, I will define API design as the design of the protocols, standards, and the resource model that is ultimately mapped to specific services. It is how consumers access the functionality of the services in your architecture. Some services will surely be accessed through asynchronous interfaces, such as messaging, so similar governance processes are advisable for asynchronous interfaces to arrive at consistent schemas, to define the right granularity of messages, and to specify <em>quality of service</em> constraints.</p><p>Service design is then the process of defining the functional scope that is satisfied by each specific service in your architecture and the internal software design of the service’s codebase and supporting infrastructure.</p><p>Both API design and service design are part of creating a service-oriented architecture, and touch points are necessary between the two efforts to align on domain concepts and use cases, and to understand the potential constraints from integrating legacy systems. However, there is an opportunity to divide and conquer.</p><p>In the spirit of <em>contract-first development</em>, much of the effort of defining API protocols and standards can be done independently, with limited input from the service design work, as long as there is alignment around the use cases that will be exposed through the API and enabled by the services. And while there is a tighter coupling between defining the API resource model and defining the domain model and the integration approach within and across domains (elements of service design), the API resource model can be defined without extensive knowledge of the service architecture topology. To be clear, I’m not suggesting that no coordination is required between the efforts. That’s a recipe for an impedance mismatch between the API and the service design. I’m only suggesting that two teams may be able to operate in parallel with some synchronization points.</p><p><strong>✔️ Apply Governance at the Right Level of the Organization</strong></p><p>Larger companies are often divided into distinct business units, each with their own mission, financial targets, and products. For software-oriented businesses, there is a temptation to drive technology governance processes across business units to eradicate any duplication of effort. Historically, I have not found this to be an effective use of resources, particularly for service architecture governance. The domains within business units are usually so different that it requires an unreasonable investment of time to gain the context necessary to eliminate all duplication of effort. And precisely because the domains are so different across business units, the opportunities for reuse are often in ancillary capabilities, which are the capabilities that require the least amount of effort to replicate. In short, the effort required to collaborate across very different business domains usually eclipses any potential benefit from de-duplication of effort.</p><p>Even if your company is not organized into business units, carefully consider whether it is worth investing in governance across disparate domains or products. I recommend starting where there is a clear relationship between domains or products such that you expect application developers to routinely build application workflows that span those domains. Get your architecture in order across those domains first, then you can consider whether more disparate domains should be folded into the governance process. Don’t boil the ocean.</p><h4>Forming the Team</h4><p>Here are some guidelines for creating governance team(s).</p><p><strong>✔️ Understand the Required Skill Sets</strong></p><p>What skill sets are useful for a service architecture governance team?</p><ul><li>Expertise with synchronous and asynchronous integration protocols and technologies (messaging, REST, RPC, etc.) and API standards, best practices, contract design, developer tools, and run-time infrastructure</li><li>Familiarity with the challenges of testing, monitoring, alerting, operations, management, and diagnostics in distributed systems</li><li>Significant understanding of the technical goals, challenges, and design methodologies surrounding release isolation, change isolation, composition, and reuse</li><li>Experience developing and/or using service/API infrastructure and tooling</li><li>Experience in applying domain-driven design techniques to complex business domains</li><li>Expertise in the specific domain capabilities and key use cases for your business, along with an understanding of the customer base and product strategy (future direction)</li><li>General experience with patterns and best practices enabling scaleability and resiliency in distributed architectures</li></ul><p><strong>✔️ Create a Team of Experts and Stakeholders</strong></p><p>Engineers generally dislike being forced to live with decisions made by others. As I once heard it described:</p><blockquote>“Telling a developer there’s already a library that does <em>X</em> is like telling a songwriter there’s already a song about love.”</blockquote><p>When I have formed governance teams in the past, I would inevitably receive numerous requests to join the team. Everyone wants to be part of the decision-making process, but it is simply impractical to have meaningful design working sessions with more than a few people in the room. However, there are still ways to be broadly inclusive, and I encourage you to do so. It is usually much easier to drive widespread adoption of technical decisions when there is already widespread buy-in to the decision. Here are a few strategies that have worked for me.</p><ul><li>Each member of the governance team should take responsibility for socializing drafts of design work with the teams they support. This is usually necessary anyway to leverage the expertise and tribal knowledge that resides within their respective teams to arrive at the right design decision, so it doesn’t require much additional effort.</li><li>Be transparent and communicate clearly. Invest the time in documenting the rationale behind each significant technical decision. If others can follow your reasoning, there are generally fewer questions and objections. This is also useful for historical purposes. As new technical leaders come into the organization, there is often a desire to understand or justify previous decisions. Being able to draw upon documents that explain the rationale behind those decisions long after they were made usually simplifies these conversations.</li><li>Create a <em>Request for Comments</em> (RFC) process, which will enable anyone to provide feedback on proposed design decisions. Time box the feedback window (e.g. comments accepted for 1 week after publication), and then ensure the governance team demonstrates that they take the feedback seriously by publishing a disposition. For particularly significant or controversial decisions, hold face-to-face review meetings to discuss the feedback. Illustrating that people outside of the immediate governance team can influence design decisions will go a long way toward building confidence in the process.</li></ul><p>The way in which you form your governance team(s) will vary depending on where you are in the development lifecycle. When I have kicked off green-field platform API design efforts in the past, I started by forming a team of architects, one representing each top-level business domain, as well as one representing the developer experience (e.g. SDKs, authorization, sandboxes, tooling, etc.). For example, I previously worked at a company developing small business products, so my API design team included an architect representing each of our three major business domains (accounting, payments, and payroll) plus one architect representing the developer experience. We met for design working sessions several times a week for several weeks until we had created a draft of the API standards and protocols, as well as a candidate (REST) resource model.</p><p>At each working session we would review our respective offline work and converge to an adopted design for that particular topic. We would then assign homework to be completed individually prior to the next meeting. Our offline work included reaching out to product experts and into our respective engineering orgs for additional technical or domain expertise, and to bring key stakeholders along with the evolving design so that we didn’t just drop the design in their laps at the end of the process. On occasion, when we were addressing complex or controversial topics, we would bring other experts/stakeholders into our design working sessions to participate and lend their insight, but we intentionally kept our working sessions small and efficient.</p><p>Once we had a draft of the standards, protocols, and resource model in place, we handed that off as a starting point to the engineering teams for implementation. We then met regularly as a governance body as teams worked through the implementation and uncovered gaps or issues in the original draft design, or they needed to propose changes as more use cases emerged. Our governance goal was not to micromanage each team’s API design work, but rather to ensure a coherent evolution of the API design, and since we had created the original draft, we had the context to deliver on that goal.</p><p>We had multiple engineering teams working simultaneously to develop our platform, so it was immensely valuable to provide them with a common, coherent starting point for the overall API design. It gave them insight into the big picture, and helped them understand how their small part of the platform fit into the larger architecture. Did the released version of the API differ substantially from the initial draft? Of course it did. But it was the initial draft (<em>architecture runway</em>) that provided teams with enough context to have the right discussions about the use cases to arrive at an improved design. That was the point. Do not be wedded to your initial design, but rather be invested in eventually arriving at the best design.</p><p>With respect to service design, driving a coherent architecture across implementation teams requires some upfront domain modeling work to organize teams around a consistent conceptual view of the system. This is where domain-driven design is useful. I have typically started with a small core team, consisting of architects representing each of the (envisioned) top-level domains, supplemented as necessary with additional experts in the domain-driven design methodology, service architecture design, or the domain use cases. The core team created the top level domain model, around which implementation teams were then formed. Many businesses really don’t think much about their domains and where the boundaries lie until they have to go through the process of deciding how to organize key capabilities into discrete architecture components, so this is usually where I start.</p><p>How large should the core team be? This will vary depending on the number of domains and how much overlap there is between domain expertise and technical expertise, but a team larger than ~5 core contributors starts to become unmanageable and inefficient. It’s better to form a small core team and leverage additional experts as consultants on a periodic basis, as I described above for the API design process.</p><p>Once the top-level domain model is in place, teams can be aligned to own a domain and the corresponding service architecture. Ideally each of the core contributors to the top-level domain model can now work directly with their respective implementation teams to continue the domain modeling exercise at the next level of detail, which helps inform the implementation teams as they define the service architecture for their domain.</p><p>As the implementation teams begin to define their service architectures within their domains, the governance team should continue to review it on a regular basis with specific emphasis on conceptual consistency, alignment on cross-domain interactions (dependencies), alignment with the API design, separation of application workflows from domain use cases, coupling and cohesion of domain services in support of release isolation objectives, and identifying common use cases that emerge, which may be candidates for reusable services across domains.</p><h3>Pitfalls and Counterarguments</h3><p>There is often considerable aversion to governance processes within engineering organizations, likely because many of us have been negatively impacted by ineffective and inefficient processes in the past. In the sections below, I’ll explore some of the common pitfalls and their mitigations, along with counterarguments that you may need to address as you advocate for governance.</p><p>✔️ <strong>Governance Just Becomes a Gate to Production</strong></p><p>At a previous company for which I worked, we had an API Governance Committee that was required to approve all changes to our customer-facing APIs. The intention was good, but the execution was flawed. A developer on my team once said to me, “<em>It took me 1 day to design it, 2 days to implement it, and 2 weeks to educate the API Committee with enough context to approve it.”</em></p><p>As this example illustrates, architecture and design review processes are often ineffective because the reviewers enter the discussion too late in the development lifecycle. I’ve seen this pattern play out many times — an engineering team spends weeks selecting technologies, prototyping, and building a proof of concept, expecting to check the box on an architecture review and then build on the initial investment to quickly push their service into production. The review goes badly, with a recommendation for significant revisions, but most of the calendar time and budget has already been spent, so the review feedback is recast as a “helpful suggestion” and ignored.</p><p>Outcomes like these often diminish morale because everyone involved feels like they wasted their time and achieved a poor result. Results like this are an artifact of approaching the architecture review as a “gate” to production. Governance is much more effective if those providing the governance are engaged early in the development lifecycle and continue to be engaged incrementally. There should be no surprise feedback at the end of a development lifecycle. The governance team should be sufficiently involved with all major design work so they can provide useful guidance in real time as the teams are making critical decisions.</p><p>How do we overcome this issue?</p><ul><li><em>Change the way you think about governance</em>. It is not a gate, nor is it an adversarial relationship between the development team and an external group of reviewers. First and foremost, a governance team should embody the best expertise in architecture and design your company has to offer, and their primary mission is to help development teams deliver the best value for the company, as expeditiously as possible. When I have been in governance roles, I have routinely asked myself, “<em>Does the dev team view our interaction as useful guidance that helps them converge to a good design, or do they view me as an obstacle they must get past to deliver their product and meet their timeline?</em>” If it’s not the former, you’re doing something wrong.</li><li><em>Avoid “governance theater” by making the necessary investments.</em> It takes time and intellectual bandwidth to engage with dev teams sufficiently enough to provide effective design governance. On the specific subject of service architecture governance, you can’t just bring your technical expertise to the table. You must also understand the use cases, domain context, and business drivers well enough to have useful insight into the merits of alternative service scope boundaries and API design concepts, and to be able to trade those off with business priorities. This is where many governance processes fail — they just aren’t resourced adequately, so they default to a superficial gate review, with all of the problems described above. I would argue that if you can’t invest enough to do governance right, then don’t do it at all. The illusion of governance<em> </em>doesn’t really accomplish much of anything, and it comes at the expense of wasting valuable time and demoralizing engineers.</li><li><em>Apply governance judiciously</em>. Choose to apply governance in the same way you make other investment decisions, based on a cost/benefit analysis. Ask yourself, “<em>what is the potential consequence of not applying governance to this design decision?</em>” For example, if a team is building services with the expectation that they will be used by a relatively small consumer base, then it may not be worth the overhead of creating a dependency on an external governance process. No process flowchart should be a substitute for the common sense of your experienced engineers and managers, so be pragmatic and apply governance only when it will add more value than cost.</li></ul><p>✔️ <strong>Governance is Counter to Isolation Objectives</strong></p><p>We like to think about a team building a service as operating completely independently from other teams, as a manifestation of the isolation objectives described above. Developers consume external dependencies through their respective service interfaces or by integrating component binaries into their service. When their service is complete, they release the service, SDKs, and documentation into the wild for external parties to consume. For example, a development team could utilize a relational database service and a pub/sub messaging service offered by a cloud provider (e.g. AWS, GCP) entirely through a self-service model, with no interaction with the dev teams who created those services.</p><p>There are a few issues to unpack here.</p><p>The interaction between consumers and 3rd party service providers is different from the interaction within a service provider for the internal teams building services for external consumption. With the cloud provider example above, there is clearly some degree of governance in place within the provider organization to create a coherent developer experience across their portfolio of managed services.</p><p>Striving for isolation doesn’t mean that we avoid coordination entirely, at all phases of the development lifecycle. It means that once the common standards, protocols, and frameworks are in place, and after we have disambiguated and scoped services across our various domains, teams should largely be able to operate independently. In other words, we eventually reap the benefits of isolation precisely because we have done a good job at laying the technical foundation, disambiguating our services, and designing our APIs. It is unlikely that a coherent service architecture can be achieved for a set of complex business domains without some governance during the early stages of design.</p><p>It’s worth noting that the degree of governance required for <em>infrastructure</em> services is typically less than what is required for <em>domain</em> services. I’m using the term <em>infrastructure services</em> to describe services that solve common use cases that are relevant to many different business domains, e.g. relational database services, messaging services, etc. Because these use cases and integration patterns are commonly understood across the software industry, and because they are largely independent of each other (i.e. the scope of relational databases and messaging services are inherently disambiguated), the governance requirements are largely reduced to ensuring consistency across the APIs (i.e. protocols, standards, patterns). <em>Domain services</em> are then services that solve business-specific use cases, which are the unique discriminators for a particular business. E.g. a social media company will create domain services for managing their interconnected content, managing users and groups, managing feeds and large content repositories, to enforce complex privacy restrictions, etc., and they are often built using many (3rd-party) infrastructure services as dependencies. The governance requirements for domain services tend to be much more stringent, because we expect developers (consumers) to use those service together in concert to support complex application workflows.</p><p>✔️ <strong>Governance Overhead Will Increase our Time to Market</strong></p><p>The alternative to a governance model is often described as the “<em>let a thousand flowers bloom</em>” philosophy. In modern usage, this means to “<em>encourage many ideas from many sources</em>.” In practice, the belief is, if we unleash all teams to build whatever they want/need, unencumbered by any governance overhead, the best solutions will become clear over time and teams will choose to converge to those solutions because they are superior (carrot over stick).</p><p>Governance does introduce some overhead, but I would argue that organizations reap a net improvement in time to market by reducing the ensuing developer friction, chaos, confusion, and complexity that is created by an unmanaged architecture evolution. We can learn a lot from other engineering disciplines in this regard. For example, no one ever argues that a new fighter jet design will emerge organically by simply aggregating the products from each individual subsystem team (e.g. airframe, engines, landing gear, cooling, fuel, weapons control, etc.). Rather, each subsystem is created in accordance with an overall system design, with specific interfaces and common infrastructure (e.g. comms bus) to facilitate integration into a coherent system that satisfies the overall system objectives.</p><p>Governance may be unnecessary overhead for some use cases, if those use cases are simple, ancillary, or have a limited potential consumer base. There’s no substitute for just using good judgement about when to apply governance, and when to let teams run fast and build what they need, even if it turns out to be duplicative. It all comes down to the cost/benefit analysis, which senior engineers and managers should be able to assess.</p><h3>Useful References</h3><p><a href="http://shop.oreilly.com/product/0636920033158.do">Building Microservices: Designing Fine-Grained Systems</a> by Sam Newman</p><p><a href="https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215">Domain Driven Design: Tackling Complexity in the Heart of Software</a> by Eric Evans</p><p><a href="https://www.amazon.com/Domain-Driven-Design-Distilled-Vaughn-Vernon/dp/0134434420">Domain Driven Design Distilled</a> by Vaughn Vernon</p><p><a href="http://shop.oreilly.com/product/0636920233169.do">Monolith to Microservices: Evolutionary Patterns to Transform Your Monolith</a> by Sam Newman</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=384278fc0794" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Resilient Systems]]></title>
            <link>https://medium.com/@jeffcoble/building-resilient-systems-2f82a67eef1d?source=rss-e8ada8901e13------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f82a67eef1d</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jeff Coble]]></dc:creator>
            <pubDate>Tue, 03 Mar 2020 04:14:34 GMT</pubDate>
            <atom:updated>2020-03-03T04:14:34.332Z</atom:updated>
            <content:encoded><![CDATA[<h4>Part 1: The Importance of Creating the Right Culture</h4><p>For those of us building SaaS systems, ensuring customers have continuous access to our products is an essential requirement. When a business seeks to make their SaaS products indispensable to their customers, their system must be continuously available and performant. While we often discuss this in terms of availability, we deliver availability by building resiliency into our systems, and many cultural, technical, and process factors contribute to resiliency.</p><p>Like most architecture attributes — security, scalability, supportability, etc. — resiliency must be “baked in” to the design of systems and our organizational processes. It cannot be effectively “iced on” after the fact, when system down time becomes problematic. Some low-hanging fruit may be addressable quickly, but comprehensive solutions are necessary to create truly resilient systems, and those solutions take time and resources. If you’ve reached the point in your business where customers are experiencing significant downtime, barring an isolated point of failure, you’re probably in for a long, challenging, and costly endeavor to put comprehensive resiliency solutions in place. Resiliency efforts are cumulative, meaning there is no single silver bullet that solves the problem, but rather a collection of patterns, processes, and infrastructure solutions that each contribute to some dimension of system resiliency. If we address these solutions comprehensively, our systems become increasingly resilient over time.</p><h4>Intended Audience</h4><p>Making large, complex architecture and process transitions quickly usually costs more and achieves poorer results than a thoughtful, methodical, sustained approach. The purpose of this series is to explore what comprehensive resiliency solutions entail, so that engineers can develop strategies for addressing them systematically over time, ideally early in the system development lifecycle. This series is also intended for business and organizational leaders who are seeking to understand the breadth of resiliency efforts so they can influence the organization’s culture, and adequately support their engineering teams with sufficient and sustained resourcing.</p><p>Virtually every aspect of resiliency addressed in this series is complex enough to warrant its own book, and many such resources already exist. In this series, I’ll focus on a broad but relatively shallow view of the comprehensive resiliency topic, and provide references to more detailed discussions whenever possible.</p><h3>Create the Right Culture</h3><p>Subsequent articles in this series will focus on technical and process factors that contribute to resiliency, but this first article addresses the cultural aspect, in part because it is often overlooked and undervalued.</p><h4>✅ Non-Functional Features are Still Features</h4><p>The importance of an organization’s culture with respect to building resilient systems cannot be overstated. <strong>No convocation of well-intentioned architects can overcome a cultural aversion to investing in non-functional features.</strong> The entire organization must believe that “quality” — encompassing the breadth of the user experience — is just as important to their customers as any user facing feature. In reality, it is typically more important. No bell or whistle matters if customers can’t access your system, but customers typically don’t ask for high availability because they assume it is just table stakes. Your customers assume you would not sell them a product in good faith that would put their own business at risk because of its unreliability, and, of course, if you’re acting in good faith, you should not do so.</p><p>The cultural challenges often start with Product and Business leaders who are reluctant to fund any effort that cannot be quantitatively monetized. The potential revenue stream for a user-facing feature can be estimated relatively easily. The potential revenue impact from underinvestment in system resiliency is harder to quantify, so the value to the business may not be well understood.</p><p>Some costs associated with downtime may be calculable. Many businesses have contractual obligations that enable customers to seek compensation when they fail to meet SLAs for availability. Other businesses may have more tangible costs associated with downtime, such as paying interest on stalled money transfers (some banks must do this). But the true costs are usually much larger and come in the form of brand damage, the loss of confidence our customers have in our products, and the pain felt by engineers supporting unreliable systems. The cost of these impacts is difficult to isolate and quantify, but that doesn’t make them any less significant to the business.</p><p>Can we model the costs of these less-tangible impacts? Of course we can. We can model anything, predicated on low-fidelity assumptions, but over the course of my career, I have found that sometimes there are diminishing returns when trying to model the value proposition of complex features like resiliency. So what should you do as an organizational leader with limited resources? Sometimes experience, judgement, and a little bit of faith are good substitutes for a time-consuming cost/benefit analysis built on top of a bunch of guesswork. Surround yourself with engineers and product managers who have relevant experience, and leverage their expertise to help determine how to prioritize investments in resiliency and other non-functional features relative to functional features. Most experienced engineers and product managers will have a good sense of where they felt the most pain in their previous work, so they will be able to inform leaders in prioritizing investment decisions. In reality, you’ll never know how much resiliency efforts saved the business in terms of customer turnover, increased competitiveness, and job satisfaction of your engineering teams. That’s where the leap of faith comes in. The same can be said of many architecture investments. You’ll never really know how bad it would have been had you not made the investment.</p><h4>✅ What Worked Today May Not Work Tomorrow</h4><p>Organizations often have a false sense of security about the reliability of their systems — <em>if we didn’t have an outage today, why should we worry about an outage tomorrow?</em> This line of thinking fails to account for the risks that compound with the passage of time, as the system grows more complex as new features are introduced, as the organization grows in size as the business grows, and as the customer base depends more heavily on our products as they become more integrated into their own business processes. With more engineers making more changes to a system that continuously grows in size and complexity, outages are inevitable unless resiliency is addressed holistically and systematically.</p><p>Additionally, we should never assume that sheer luck is proof that our system is resilient. Spend time understanding the risks embodied in your system design and change-management processes, and address them deliberately. It is completely reasonable to make a judgement call to devote limited resources to something other than addressing a resiliency (or scale, or security, etc.) risk, but do so with a full understanding of the potential impacts. All too often I see risks associated with such prioritization choices go unacknowledged and unmanaged, which is a recipe for unpleasant surprises down the road, and inevitably leads to friction within the organization when the pain is felt by customers.</p><h4>✅ Embrace Contingency-Oriented Engineering</h4><p>I spent many years in the aerospace industry working on unmanned air vehicle (UAV) systems, where a single system failure can result in an accident that costs millions of dollars and ends lives. When the consequences of failures are so high, we go to extreme lengths to ensure our engineering is correct, and that the systems are resilient. The entire engineering culture is skewed toward identifying failure scenarios and developing contingencies, for everything from ensuring the chain of custody for software deployments to mitigating onboard (air vehicle) subsystem failures. Whether the UAV loses an engine or loses communication with the ground control station, you must know exactly how it will behave under those circumstances — the contingency plans. The same is true for nuclear power plant control systems, self-driving cars, or virtually any system where failures can lead to catastrophic losses. This degree of rigor adds significant costs to building safety-critical systems, so it is not my intent to advocate that safety-critical processes be adopted for non-safety-critical systems, rather, my intent is to recommend that contingency-oriented thinking be central to your engineering culture. No design is complete until you have thought through the failure scenarios and identified contingency solutions, encompassing both design and organizational processes.</p><h4>✅ Assess Your Organization’s Culture</h4><p>The first step toward getting better is knowing where you’re starting from. Here are some questions to ask when assessing the state of your business culture with regard to system availability, or other non-functional feature development.</p><p>🔷 <em>Accountability, Ownership, and Common Priorities</em></p><ul><li>In most organizations that build software systems, product manager decide (in consultation with many others) which features are delivered, and in what priority order they are built. In Agile development, you would think of this role as the Product Owner. So it’s essential to ask if your product managers are accountable for the quality of the user experience of the products they oversee, where quality includes the availability of the system and other non-functional features, like latency. This should not just be an engineering concern. Everyone from Sales, to Product, to Engineering should be invested in system availability, which means they are willing to prioritize and pay for it. It also helps if product managers have enough of an engineering background to understand the relative importance of addressing desired outcomes like <em>system availability</em> early and comprehensively (i.e. baked in, not iced on), rather than to think about it as something engineers complain about.</li><li>Are metrics quantifying the user experience (e.g. error rates, latency, downtime, etc.) reviewed regularly by both Product and Engineering leadership? <em>What gets measured is what gets done.</em> If leaders are not reviewing these metrics on a regular basis, they’re sending a clear message to the rest of the organization that these aspects of the user experience are not important. All too often I see these metrics reviewed by Engineering leadership, but not Product leadership. This is a mistake, and creates friction between engineering teams and product managers because of the mixed messages sent about the importance of non-functional requirements.</li></ul><p>🔷 <em>Backlog Management</em></p><ul><li>Are non-functional requirements (e.g. availability, performance) defined and prioritized on the product backlog? Non-functional requirements, like those supporting resiliency, are not something to be addressed as a side project. They belong on the product backlog, and should be prioritized as non-negotiable features. If non-functional requirements are managed differently than user (functional) features, that’s a sure sign they are not treated with the same degree of importance.</li></ul><p>🔷 <em>Monitoring, Diagnostics, and Recovery</em></p><ul><li>Are targets defined for Mean Time To Identify (MTTI) and Mean Time To Repair (MTTR)? Setting these goals provides the impetus for investments in processes and tools to rapidly diagnose and repair the system. Failures will happen. Count on it, and invest in solutions to enable rapid identification and recovery.</li><li>Is there an adequately-funded effort to provide patterns, infrastructure, and tooling to enable rich health monitoring and diagnostic capabilities? We should be able to see services degrading with leading indicator metrics, and we should be able to rapidly diagnose off-nominal conditions to quickly restore the site to a healthy state. We should also have good visibility into the user experience through Active Monitoring of key workflows and APIs. This requires data, tooling, processes, and time routinely spent examining the data.</li></ul><p>🔷 R<em>esiliency Patterns, Best Practices, and Common Infrastructure</em></p><ul><li>Is there an adequately-funded effort to provide common patterns, infrastructure technologies, and testing environments and tools to enable teams to build resilient apps and services? You can’t get something for nothing. If you care about system resiliency, you’ve got to invest in the guard rails and building blocks to enable teams to deliver it. Funding it proactively will cost significantly less than paying for it retroactively through refactoring, lost revenue, brand damage, and engineering staff turnover.</li><li>Do engineering teams routinely profile their apps and services under load to understand resource utilization under varying conditions, to determine choke points in their design or downstream dependencies? Doing so is necessary to understand potential scale-related failure scenarios and mitigation strategies.</li></ul><p>🔷 <em>Continuous Improvement</em></p><ul><li>Is there a culture of continuous improvement, where you learn from outages to prevent their reoccurrence? E.g. incident post-mortem processes should be in place to allow the organization to understand not only why an outage occurred, but to drive corrective work onto the product backlogs to address the underlying causes of technical failures, or to update organizational processes in the case of human errors.</li></ul><h3>Next In This Series</h3><p>Resiliency is an extensive topic. I touched on some of the contributing solutions in the sections above, which range from sweeping architecture patterns, defensive design strategies, and organization-wide change management processes. In subsequent articles in this series, I will discuss several of these strategies and best practices, including:</p><ul><li>Site architecture design solutions, including High Availability/Disaster Recovery architecture patterns, compartmentalization techniques, and load balancing strategies</li><li>A discussion of the ways in which solutions for scale impact system resiliency, and the importance of profiling a deployable unit of software to understand how it behaves under sustained load. Profiling informs our understanding of provisioning policies, and potentially our design and technology choices</li><li>Defensive strategies, such as rate limiting, circuit breaking, and timeouts/retries, for dealing with scale obstacles, particularly those that may be out of our control in a distributed microservices architecture</li><li>Strategies for managing change, which is almost certainly the biggest cause of system down time. Change management methodologies include complexity reduction, quality engineering processes, environments and tools for resiliency testing, incremental rollout, and infrastructure as code, among others</li><li>A discussion of the types of monitoring, diagnostics, and recovery tools and processes necessary to detect that a system/site is heading into an unhealthy state, and the tools and processes necessary to return it to a healthy state as quickly as possible</li><li>An analysis of design patterns, such as microservices, which are useful for minimizing complexity and improving release and change isolation in service of creating more resilient systems and processes</li></ul><p>The topic of building resilient systems is broad and complex, so I will undoubtedly fail to fully do it justice. Feel free to share your own experiences and insights about this important subject with me as this series progresses.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f82a67eef1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Product to Platform]]></title>
            <link>https://medium.com/@jeffcoble/from-product-to-platform-5d6857e55afb?source=rss-e8ada8901e13------2</link>
            <guid isPermaLink="false">https://medium.com/p/5d6857e55afb</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[platform]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <dc:creator><![CDATA[Jeff Coble]]></dc:creator>
            <pubDate>Thu, 18 May 2017 16:12:02 GMT</pubDate>
            <atom:updated>2017-05-18T19:05:28.084Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Product to Platform — Part I</h3><p>This is the first in a series of articles discussing platform architecture topics, and the motivations and challenges involved with transitioning from a product-centric architecture to a platform. Over the course of this series, I will examine platform business motivations and technical objectives, key architecture and organizational challenges, and design, leadership, and execution strategies to address those challenges.</p><p>This initial article is focused on describing the specific business objectives organizations strive to achieve when creating a platform, and on identifying a set of corresponding technical objectives that enable these platform business outcomes.</p><h4>Platform Definition</h4><p>The term “platform” is used to describe several different concepts in the software industry, but for the purposes of this article, I’ll use platform to refer to the way in which business capabilities are organized and exposed so they can be easily composed to enable many different products.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D9KPzkg9SpEQlx4hWereKQ.png" /><figcaption>Figure 1. Platforms expose product-agnostic business capabilities so they can be reused and composed by product developers. E.g. A payment platform can support a variety of different payment products.</figcaption></figure><p>For example, <a href="https://stripe.com/docs/api">Stripe</a> exposes payment processing capabilities as a platform for developers creating e-commerce products. Payment processing is a common business function that supports many types of products, whereas the ride-sharing company Lyft has built a specific product that leverages Stripe’s payment processing platform to accept mobile payments from Lyft’s customers.</p><p>A platform has the potential to enable significant reuse of business capabilities across many products, it can provide an innovation sandbox for both internal and external developer communities, and it can enable the rapid addition of new features into existing products. However, without a clear understanding of the business goals, the right architecture strategy, and a complementary organizational and execution approach, efforts to create a platform often result in little more than a technology transition, and can negatively impact software performance or diminish system supportability.</p><h3>Achieving Business Outcomes</h3><blockquote>“You’ve got to be very careful if you don’t know where you’re going, because you might not get there.” –Yogi Berra</blockquote><p>Nothing takes an architecture transformation project off the rails like losing sight of the intended business outcomes. That’s why, as engineers, it is essential that we understand the business goals we’re working to achieve, and that we incrementally evaluate our design choices against those goals.</p><p>For example, I have been a part of more than one transition to microservices that failed because teams weren’t thinking about how their design choices enabled business agility or improved release velocity, but rather they myopically broke up their codebase into an incoherent set of services to achieve a technology transition, measuring success based on how much of the codebase had been re-deployed as microservices. Before long, a large organization can find itself with hundreds of mismatched services, deep, non-performant call chains, and a deployment and management nightmare. This serves to illustrate how important it is to measure success in terms of business outcomes.</p><p>Every business has unique strategic goals and monetization strategies for their platform, but generally a platform is used to drive developer productivity, innovation, and business growth. As technologists, our goal is to add value to the business through the engineering decisions we make, so it is important that we understand these business goals well enough to choose the right architecture strategies to achieve them.</p><h4>Product vs. Platform Architecture</h4><p>The premise of this article series is that we’re starting with a product-centric architecture and transitioning to a platform. Before I describe the business outcomes we can achieve with a platform, it is useful to briefly mention some pragmatic differences between product and platform architectures.</p><p><em>Monolithic Codebase</em></p><p>Product codebases need not be monolithic. Good design strategies applied to product-centric codebases can ensure modularity, encapsulation, and separation of concerns. But in my experience, more often than not, product codebases have trended toward monoliths. In future articles, I’ll describe the cultural, organizational, and market pressures that contribute to this outcome, but for now, suffice it to say that a confluence of factors often leaves a product codebase in an entangled state — a monolith without a clean modularity strategy or separation of concerns. Conversely, the nature of the business outcomes we expect from a platform — flexibility through composition of business capabilities — forces us to explicitely choose design strategies that avoid the anti-patterns that contribute to a monolithic codebase.</p><p><em>The Platform is a Product</em></p><p>Product-centric organizations do not usually think about a platform as an explicit outcome — a product in its own right. Even with a well-designed, modular product architecture, it would be unlikely to find the kind of clean separation of platform use cases from product use cases that would enable the innovation and growth discussed below as an intended outcome of a platform architecture. We must explicitely design for the platform business outcomes we want to achieve — they typically do not emerge organically. We do that by treating the platform as a first-class product.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5t7jNcu7T9SRSxphacMuqw.png" /><figcaption>Figure 2. Platform architecture strategies enable innovation and developer productivity, which are the foundations for business growth</figcaption></figure><h4>Enabling Innovation</h4><p>All organizations want to create an environment where innovation thrives, but there are some unique outcomes we explicitely design a platform to achieve. The objective for a platform is to allow developers to rapidly experiment to evaluate new product concepts by quickly bringing together disparate business capabilities into new user flows or entirely new products. We also want to enable the platform itself to expand horizontally with new capabilities as the business or the market evolves.</p><p>This translates into several technical objectives, described below, around cleanly separating products from the platform, isolating independent business capabilities, and abstracting away unnecessary complexity.</p><h4><strong>Developer Productivity</strong></h4><p>As engineering organizations grow in size, they often become less productive due to the coordination overhead of releasing production code. The organizational scale challenges for software projects were identified as far back as 1975 in Brook’s indispensable book, <a href="https://www.amazon.com/Mythical-Man-Month-Software-Engineering-Anniversary/dp/0201835959">The Mythical Man Month</a>. This coordination overhead is often a symptom of the structural defects common in product codebases discussed above — e.g. insufficient modularity, poor abstractions, inadequate separation of concerns, etc. — which forces developers to coordinate code changes and release cycles across teams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*57X-rgYg9oDOU9mpO8bB2Q.png" /><figcaption>Figure 4. As the organization and codebase grow, developer productivity often slows.</figcaption></figure><p>Transitioning to a platform architecture requires that we decompose business capabilities so that they are independently accessible — e.g. independent microservices accessed through a coherent platform API. As we modularize our codebase into services, design in abstractions, and separate concerns to achieve our platform objectives, we also improve our ability to scale the organization by enabling teams to work, test, and release independently on isolated business capabilities, or on the products that consume them. We also see productivity benefits when common business and infrastructure functionality is implemented once, as a platform, instead of incurring the costs of supporting the same capabilities embedded within multiple products. Additionally, these architecture strategies give individual engineering teams more local control over technology choices because the impact of their decisions can be isolated to individual business capabilities without affecting the broader system.</p><p>With the right design strategies, similar benefits could also be achieved in a product-centric architecture. My point here is that platform business objectives force us to explicitely design for these outcomes.</p><h4>Business Growth</h4><p>Innovation and developer productivity are inextricably linked. Innovation requires the ability to iterate rapidly and to reuse and leverage existing capability, which is simply to say that productive developers can create and experiment quickly, leading to innovation. Business growth is the likely outcome of creating an environment where innovation thrives.</p><p>For businesses cultivating 2nd and 3rd party developer communities, exposing a platform enables external developers to leverage insights from their own business domains to find creative ways to use the platform. This can create entirely new user bases and subsequent revenue streams for the platform provider. As more developers and users consume the platform through these external partners, the platform provider benefits from their insights to grow their platform capabilities in a virtuous cycle.</p><p>Similarly, if we’re able to scale our organization while keeping developers productive with fewer cross-team touch-points, then the business can scale its output to bring more capabilities to market as it adds engineering resources.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qeDl9I4p1AIo_6k47J3CIw.png" /><figcaption>Figure 3. Organic growth in products often results in duplicate investments in common capabilities, and can significantly increase the cost of innovation and diminish engineering throughput.</figcaption></figure><h4>Example — From Payment Products to a Payment Platform</h4><p>I previously worked at an online payment processing company that started its business by creating specific web payment products, which merchants could integrate into their e-commerce workflows in relatively simple ways. Over time, what started as one product became multiple products, each tailored to a unique market — business size, country/region, web, mobile, point-of-sale, peer-to-peer, etc. Much of the underlying business capability was common across all of the products, but since it was locked into product-specific workflows, it was difficult for developers to leverage and reuse those capabilities in new ways. Adding new payments features or adhering to changes in financial compliance laws required significant effort and time because code had to be written and deployed for each product. The company found itself unable to compete with fast-moving startups as they brought new payments products to market, and our developers were unable to rapidly experiment and innovate because the payments building blocks were embedded within specific products.</p><p>Eventually, the cost to the business became so burdensome that we undertook a re-architecture effort to transition from a collection of specific payment products to a payment platform, which exposed the essential payment building blocks, enabling developers to create a wide range of products. Not only did this empower our internal developers to innovate on our own products, but it also allowed the company to grow an external developer community by publicly exposing the payment platform. Merchants were then able to build their own e-commerce products while still driving payment transactions through our system.</p><h3>Platform Technical Objectives</h3><p>Now that we’ve identified the intended business outcomes, we can define the corresponding platform technical objectives that support these goals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3E_Usci7UF-jZAXI-ZB83g.png" /><figcaption>Figure 5. 1st, 2nd, &amp; 3rd-party developers consume the platform capabilities through a comprehensive, intuitive platform API.</figcaption></figure><ol><li><em>Cleanly Separate Product from Platform</em></li></ol><p>It isn’t revelatory to say that orthogonal concerns should be separated in an architecture. This has been a common pattern in n-tiered, enterprise architectures for years. The difference for a platform is in what we consider to be a “concern.”</p><p>When core business capabilities are intertwined with product workflows, those capabilities become locked into a specific set of use cases and are much harder to leverage in new ways when developers want to experiment or the business needs to pivot to respond to market demands. But when business capabilities are independently accessible as a platform, 1st, 2nd and 3rd-party product developers have the flexibility to reuse and compose those capabilities in unique and innovative ways without the baggage of product-specific constraints.</p><p>Product-centric teams often aren’t accustomed to thinking in terms of platform vs. product, so I’ve found this to be a common failure point.</p><p>While separating product from platform is essential to ensuring the flexibility of a platform, we also do not want to over-generalize the platform. An overly-generalized platform becomes more complex for developers to consume because it begins to lose domain context. There is significant artistry involved in striking the right balance.</p><p><em>2. Decouple Independent Business Capabilities</em></p><p>We’re all biased by our experiences, so product-centric organizations are often biased to think about their platform business capabilities in the context of their own products. This can lead to coupling business capabilities that shouldn’t be, which limits the way in which other product developers can use them. Our objective is to cleanly separate platform capabilities so they can be reused and composed by 1st, 2nd and 3rd party developers to create a wide range of products.</p><p><em>3. Complexity Abstraction</em></p><p>Most platforms provide business capabilities that are commonly needed, but hard to replicate (e.g. payment processing) because of their complexity. Our objective is to create an environment where developers do not have to understand the inner workings of complex business functionality to leverage it in their products. We design the platform APIs, SDKs, sample apps, tooling, and documentation to shield platform consumers from unnecessary complexity. And we use modularity strategies (e.g. microservices) to encapsulate complexity and separate concerns so that the right functional abstractions are surfaced through the platform API. I’ll talk more about these design strategies in future articles.</p><p><em>4. Seamless Platform API</em></p><p>Product developers access the breadth of platform business capabilities through an intuitive API, which is designed with consistent standards and patterns and a coherent resource model. It should look as if it were designed by a single engineer.</p><p>The platform API is explicitely designed to provide the right abstractions for product developers, so that complementary functionality works together seamlessly, while shielding the developer from unnecessary details or underlying architecture complexity. In practice, this objective is more difficult to achieve than it might first appear. Defining standards, patterns, and a resource model (assuming REST) for the platform API requires both a breadth and depth of understanding of the platform use cases.</p><p>We’re usually faced with making some design choices based on our understanding of current product use cases, while attempting to not overfit the platform API to specific products so that it remains flexible enough to allow developers to innovate. We also must prevent the platform API from becoming so generic as to be devoid of domain context. Those aren’t easy tasks, and usually requires savvy product managers who understand the market (present and future) to provide engineers with the necessary context to make the right design choices.</p><p><em>5. Developer Ecosystem</em></p><p>A developer ecosystem makes the platform accessible and easy to consume. It includes automated developer and application onboarding to the Platform API, client SDKs, sample apps, use case centric documentation, and a sandbox environment for testing.</p><p><em>6. High Quality of Service</em></p><p>The platform must be resilient, performant and scalable to support rapid growth of the business and external developer communities, which gives partners and 3rd-party developers confidence in the quality of the platform and a willingness to risk their own business’s success with a dependency on an external platform.</p><p><em>7. Supportability</em></p><p>The platform architecture must be easy to manage, monitor, debug, and support. This is particularly important — and challenging — in an architecture comprised of many distributed services and infrastructure components. I will go as far as to say that an organization transforming a product-centric architecture to a platform architecture, without a commensurate evolution of its infrastructure for monitoring, management, and debugging, is setting itself up for failure.</p><p><em>8. Enable the Transition to Microservices</em></p><p>I’ll discuss the platform rationale for microservices in more detail in a subsequent article, but suffice it to say that I am an advocate for using microservices as an architecture strategy to decouple products from platform, and to isolate independent platform business capabilities to support composition objectives. However, successfully transitioning to microservices in a manner than achieves these outcomes can be challenging, and is a common point of failure. Here are a few requisite enablers that can help pave the road.</p><ul><li>Create a software framework per supported language solving for common requirements such as logging, integration transports (e.g. REST, messaging), dependency injection, security tokens, etc. This consolidates investments into a single, high-quality solution for all teams to build upon. Most teams will choose to adopt the supported framework, even if they are not required to do so.</li><li>There are a number of patterns and supporting solutions that should be consistently applied to create a production-quality, supportable system — e.g. monitoring &amp; alerting, identity management, rate limiting, version management, testing tools, build &amp; release pipeline, etc., all of which should be solved consistently with common investments, enabling all service teams to achieve a high quality and supportability bar.</li><li>It is easy to build a microservice, but it is relatively hard for many independent teams to simultaneously create a set of services that collectively form a coherent platform <em>product</em>, which achieves the desired business and technical outcomes. If we start by creating a service architecture blueprint — looking broadly across the business use cases and through the lens of our business and technical goals — then we have a north star with which we can engage individual capability teams to refine the service architecture and achieve the desired system-level results. The absence of an overarching service architecture blueprint often results in disconnected teams building disparate services that achieve little reuse and composability, and may present performance and supportability challenges when aggregated into call chains.</li></ul><h3>Up Next</h3><p>A thorough understanding of platform business and technical objectives provides an essential guidepost as organizations develop architecture, leadership, and execution strategies. In subsequent articles, I’ll discuss common obstacles — both organizational and technical — and potential mitigation strategies. I’ll then build upon the objectives and obstacles to discuss specific architecture and execution strategies.</p><p>Feel free to <a href="https://www.linkedin.com/in/jeffcoble/">contact me</a> with questions or comments about this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5d6857e55afb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>