avatarSheen Brisals

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

5164

Abstract

bove picture, the logic of payment authorization changes frequently. A traditional service setup will force the Payments service to be deployed every time anything changes. With a granular serverless microservices architecture, the changes become isolated to the Authorization service, and the deployment becomes lean and granular.</p><h2 id="e1cb">Improve developer experience</h2><p id="90c0">In general, the agile and iterative development practices have improved the team working experience a lot.</p><p id="566f">The shorter cycles of work with team-aligned goals bring greater visibility of progress. Due to this incremental delivery stream, we rarely witness teams proceeding in the wrong direction for weeks or months before realization and scrapping the work and starting all over again. Such wastage is rare these days.</p><p id="f9a5">The iterative development that we discussed in the <a href="https://readmedium.com/how-to-build-sustainable-serverless-applications-ffab8ae4e690">previous part</a> reduces the cognitive load on teams. The focus in each iteration becomes well-defined, and the accomplishment of one target attributes to the developers’ motivation for the next. Overall, it is a sustainable work pattern and a delivery process the agile teams go through.</p><h1 id="bb95">Practicing Sustainable Processes</h1><h2 id="7438">Automate everything</h2><p id="8aa0">Automation is the core of modern DevOps. Reducing waste is one of the many benefits of automation. Provisioning the right-sized resources at the right time and automating the clean-up of unwanted ones is a simple example.</p><p id="72b1">Automation in development processes is not just about the build and deployment pipelines. It also includes steps to decommission redundant resources, delete stale data, remove obsolete functions, data stores, etc.</p><h2 id="870b">Encourage reuse</h2><p id="1cc7">Many teams follow the DRY (Don’t Reinvent Yourself) principle. It is prevalent in organizations that work with serverless and cloud. As cloud providers take care of the sustainability <b><i>of</i></b> the cloud, when we use a managed service rather than building one ourselves, we promote sustainability.</p><p id="166b">Serverless teams often build prototypes to validate their ideas. With good planning, a prototype can be shaped further towards developing it as an MVP instead of throwing it away and starting all over again.</p><h2 id="d60b">Be agile, incremental, and iterative</h2><p id="c033">The benefits of the incremental and iterative approach are known to all. Serverless is an enabler of iterative development. As we focus on <i>just-the-required</i> resources in each iteration, we make sure that we don’t over-provision cloud resources, thus, attributing to the sustainability <b><i>in</i></b> the cloud.</p><h2 id="7798">Go granular — don’t change everything every time!</h2><p id="a46a">The <i>Reduce service churn</i> section above highlighted the reason why the serverless development process must incorporate building and operating granular services. Among the many benefits it brings, the ability to optimize services and the resources within each service individually to the optimum level is one of the great benefits of serverless.</p><figure id="11e6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*KTwRyRv_5yh3M5mpPPDdYA.png"><figcaption>Independent service deployment. Source Author</figcaption></figure><div id="c79f" class="link-block"> <a href="https://readmedium.com/think-and-develop-serverless-applications-as-set-pieces-4fa36d79ac3f"> <div> <div> <h2>Think and develop serverless applications as ‘set-pieces’</h2> <div><h3>Everything is possible when you break it down!</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*jHDwhYuiW8CiftDsUpBhWQ.png)"></div> </div> </div> </a> </div><h2 id="33c0">Follow event-driven architecture and service decoupling</h2><p id="dba0">Enough has been said about building asynchronous event-driven serverless applications. I highlighted the following principles that help develop sustainable applications in the <a href="https://readmedium.com/how-to-build-sustainable-serverless-applications-ffab8ae4e690">previous article</a>.</p><figure id="2d66"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*bU2oiuof0HPXCGSf9cWi8Q.png"><figcaption></figcaption></figure><h2 id="cca6">Grow serverless teams</h2><p id="49a6">Skills shortage in the IT industry is common, especially for newer technologies. Organizations that have strong product portfolios for the modern consumer base need stronger engineering teams to deliver value.</p><p id="8662" type="7">Sustaining serverless teams is a long-term investment!</p><p id="bf72">Employing external resources is a temporary fix and not a long-term solution. Sustaining serverless teams takes time and effort and is a long-term investment. How quickly teams can be grown depends

Options

on the organizational structure and culture. In my article, <a href="https://sbrisals.medium.com/grow-not-build-your-serverless-team-bc3a64454ac0">Grow, not build your serverless team</a>, I discuss the following in detail.</p><figure id="53b0"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*lyCUT4aUrpl_TchLwcoI2Q.png"><figcaption>Serverless team setup. Source Author</figcaption></figure><div id="82fc" class="link-block"> <a href="https://sbrisals.medium.com/grow-not-build-your-serverless-team-bc3a64454ac0"> <div> <div> <h2>Grow, not build, your serverless team!</h2> <div><h3>Serverless adoption made simple!</h3></div> <div><p>sbrisals.medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*vARSJ-N6rIbG5c7CQ-5L2g.png)"></div> </div> </div> </a> </div><h2 id="b59c">Continuous refactoring</h2><p id="f4a2">As explained in my article <a href="https://betterprogramming.pub/why-serverless-teams-should-embrace-continuous-refactoring-217d4e67db5b">Why serverless teams must embrace refactoring</a>, refactoring is no longer an old-fashioned legacy term. In serverless development, it is part of the process. To <a href="https://readmedium.com/how-to-build-sustainable-serverless-applications-ffab8ae4e690">develop sustainable serverless applications</a>, continuous refactoring must be at the heart of the development process.</p><p id="3f24" type="7">In serverless, refactoring is not something that happens once in our lifetime. It is a recurring activity essential for a sustainable application.</p><div id="0abe" class="link-block"> <a href="https://betterprogramming.pub/why-serverless-teams-should-embrace-continuous-refactoring-217d4e67db5b"> <div> <div> <h2>Why Serverless Teams Should Embrace Continuous Refactoring</h2> <div><h3>Stay afresh in serverless</h3></div> <div><p>betterprogramming.pub</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*ijGan-D4xHtiRtSYonGVhg.jpeg)"></div> </div> </div> </a> </div><h2 id="4090">Optimization</h2><p id="8647">Optimization is an activity to make the serverless services and resources the most effective. Its effectiveness depends on two main targets — performance and cost.</p><p id="eff1">Teams often face challenges when it comes to optimization. Successful performance optimization of a cloud resource is not guaranteed to be cost-effective always. Hence, trade-offs become an integral part of the optimization exercise. AWS’s Well-Architected pillars <a href="https://docs.aws.amazon.com/wellarchitected/latest/performance-efficiency-pillar/welcome.html">of performance </a>and <a href="https://docs.aws.amazon.com/wellarchitected/latest/cost-optimization-pillar/welcome.html">cost optimization</a> provide many insights and guidelines.</p><figure id="e625"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/0*fgikxWRZcmk1Pe7E.jpg"><figcaption>Source <a href="https://github.com/alexcasalboni/aws-lambda-power-tuning">Lambda power tuning</a></figcaption></figure><p id="ec3a">Serverless, with its on-demand compute ethos, is already a big enabler of sustainability. It is equally important to understand the reverse effect of over optimization as well.</p><p id="69dc"><a href="https://twitter.com/virtualgill">Gillian Armstrong</a>, a machine learning expert and a senior solutions architect at AWS, raises the following valid points in the article, <a href="https://virtualgill.medium.com/the-next-sustainability-slow-movement-slow-software-196a03574ed1">The next sustainability slow movement — slow software?</a></p><ul><li><i>Make your app as fast as it needs to be, but no faster.</i></li><li><i>Don’t optimize for an up-time that is more than you need.</i></li></ul><h1 id="fbd2">Be Sustainable…</h1><p id="0a7a">In comparison with Part I and II, this article has given a new perspective on sustainability in serverless. The development processes that we follow act as the connecting platform between building sustainable applications and achieving sustainability in the cloud.</p><p id="0941">You might be already following some of the practices we discussed here. If so, you now know that every such simple thought and consideration contributes to how we develop and operate serverless applications.</p><p id="944e"><a href="https://readmedium.com/why-sustainability-of-the-cloud-is-important-to-serverless-48a93792f57d"><i>In the next part</i></a><i>, we will look at the cloud and understand how it connects directly with our lives and the measures to contribute to a sustainable environment.</i></p><p id="a916">Please find the list of <a href="https://sbrisals.medium.com/table-of-contents-set-pieces-16c1ca1ecb33">all my articles, upcoming talks, and podcasts here</a>. Thanks!</p></article></body>

How To Practice Sustainable Development Processes In Serverless!

In Part I: Think Sustainability While Developing Serverless Applications, we discussed why sustainability is applicable in serverless developments.

In Part II: How To Build Sustainable Serverless Applications, we looked at the longevity of applications and ways to sustain them.

In this Part III, the focus is on the sustainable development processes that help build our serverless solutions.

Sustaining is the process of keeping something going for a prolonged period by nurturing it with a continuous provision of nourishment to ensure its growth and existence.

Recap: The Serverless Sustainability Triangle

The Sustainability Triangle shows how the three aspects of sustainability in serverless development are interrelated.

The Serverless Sustainability Triangle. Source Author.

The Need For Sustainable Development Processes

Development Processes are the methods and tools that enable us to build sustainable serverless applications and operate them in the cloud. These methods (processes) act as the gateway between our minds (people) and the machines (cloud) that host and run our applications. They act as the guidelines for the engineers who develop and operate sustainable serverless applications.

In the cloud environment, which comprises compute, storage, and network, they offer guidance to prepare us to act responsively. Cloud resources consume energy. Therefore have a direct impact on the environment. Hence, we all have a greater responsibility.

Presence of Amazon Web Services. Source AWS docs

The above numbers show the reach of AWS alone. Every location runs thousands of equipment. If we take the energy requirements of a compute resource and extrapolate it to millions across the globe, we can easily derive its magnitude. Hence, every simple process improvement we make goes a long way.

The following sections brief the reasons why we need sustainable development processes.

Reduce development waste

Cloud has democratized the compute platform and made it a level playing field for everyone — solo engineers, start-ups, and big enterprises. It also removed the traditional physical barriers between the different staging environments — development, QA, acceptance, production, etc.

Cloud environments. Source Author

In the cloud, be it develop, test, sandbox, or live, the resources we consume are mostly the same. The stage separation is just a logical boundary. Hence, the consciousness of reducing waste and following lean principles is essential across all the environments and not just production.

Improve value-stream mapping

The value-stream mapping process is one of the lean principles to reduce waste that originated in the manufacturing industry but is also common in software development.

As shown in the diagram below, to improve the value-stream, the wait time needs to be reduced.

Value-stream map. Source Author

For example, you are developing a new feature. You raised a PR and wait for the QA to be completed. If the wait is long, then the resources you provisioned in the test environment stay alive, costing money and consuming energy.

Reduce service churn

We often hear about code churn. Code churn is a measure to identify how often a piece of code gets changed.

Almost every team builds and operates microservices. Unlike the traditional containerized microservices, serverless offers granularity to break them into smaller microservices.

Traditional vs Serverless microservices. Source Author

Let’s say, in the above picture, the logic of payment authorization changes frequently. A traditional service setup will force the Payments service to be deployed every time anything changes. With a granular serverless microservices architecture, the changes become isolated to the Authorization service, and the deployment becomes lean and granular.

Improve developer experience

In general, the agile and iterative development practices have improved the team working experience a lot.

The shorter cycles of work with team-aligned goals bring greater visibility of progress. Due to this incremental delivery stream, we rarely witness teams proceeding in the wrong direction for weeks or months before realization and scrapping the work and starting all over again. Such wastage is rare these days.

The iterative development that we discussed in the previous part reduces the cognitive load on teams. The focus in each iteration becomes well-defined, and the accomplishment of one target attributes to the developers’ motivation for the next. Overall, it is a sustainable work pattern and a delivery process the agile teams go through.

Practicing Sustainable Processes

Automate everything

Automation is the core of modern DevOps. Reducing waste is one of the many benefits of automation. Provisioning the right-sized resources at the right time and automating the clean-up of unwanted ones is a simple example.

Automation in development processes is not just about the build and deployment pipelines. It also includes steps to decommission redundant resources, delete stale data, remove obsolete functions, data stores, etc.

Encourage reuse

Many teams follow the DRY (Don’t Reinvent Yourself) principle. It is prevalent in organizations that work with serverless and cloud. As cloud providers take care of the sustainability of the cloud, when we use a managed service rather than building one ourselves, we promote sustainability.

Serverless teams often build prototypes to validate their ideas. With good planning, a prototype can be shaped further towards developing it as an MVP instead of throwing it away and starting all over again.

Be agile, incremental, and iterative

The benefits of the incremental and iterative approach are known to all. Serverless is an enabler of iterative development. As we focus on just-the-required resources in each iteration, we make sure that we don’t over-provision cloud resources, thus, attributing to the sustainability in the cloud.

Go granular — don’t change everything every time!

The Reduce service churn section above highlighted the reason why the serverless development process must incorporate building and operating granular services. Among the many benefits it brings, the ability to optimize services and the resources within each service individually to the optimum level is one of the great benefits of serverless.

Independent service deployment. Source Author

Follow event-driven architecture and service decoupling

Enough has been said about building asynchronous event-driven serverless applications. I highlighted the following principles that help develop sustainable applications in the previous article.

Grow serverless teams

Skills shortage in the IT industry is common, especially for newer technologies. Organizations that have strong product portfolios for the modern consumer base need stronger engineering teams to deliver value.

Sustaining serverless teams is a long-term investment!

Employing external resources is a temporary fix and not a long-term solution. Sustaining serverless teams takes time and effort and is a long-term investment. How quickly teams can be grown depends on the organizational structure and culture. In my article, Grow, not build your serverless team, I discuss the following in detail.

Serverless team setup. Source Author

Continuous refactoring

As explained in my article Why serverless teams must embrace refactoring, refactoring is no longer an old-fashioned legacy term. In serverless development, it is part of the process. To develop sustainable serverless applications, continuous refactoring must be at the heart of the development process.

In serverless, refactoring is not something that happens once in our lifetime. It is a recurring activity essential for a sustainable application.

Optimization

Optimization is an activity to make the serverless services and resources the most effective. Its effectiveness depends on two main targets — performance and cost.

Teams often face challenges when it comes to optimization. Successful performance optimization of a cloud resource is not guaranteed to be cost-effective always. Hence, trade-offs become an integral part of the optimization exercise. AWS’s Well-Architected pillars of performance and cost optimization provide many insights and guidelines.

Source Lambda power tuning

Serverless, with its on-demand compute ethos, is already a big enabler of sustainability. It is equally important to understand the reverse effect of over optimization as well.

Gillian Armstrong, a machine learning expert and a senior solutions architect at AWS, raises the following valid points in the article, The next sustainability slow movement — slow software?

  • Make your app as fast as it needs to be, but no faster.
  • Don’t optimize for an up-time that is more than you need.

Be Sustainable…

In comparison with Part I and II, this article has given a new perspective on sustainability in serverless. The development processes that we follow act as the connecting platform between building sustainable applications and achieving sustainability in the cloud.

You might be already following some of the practices we discussed here. If so, you now know that every such simple thought and consideration contributes to how we develop and operate serverless applications.

In the next part, we will look at the cloud and understand how it connects directly with our lives and the measures to contribute to a sustainable environment.

Please find the list of all my articles, upcoming talks, and podcasts here. Thanks!

Serverless
Sustainable Development
Amazon Web Services
Cloud Computing
Devops Practice
Recommended from ReadMedium