Topics In Demand
Notification
New

No notification found.

Green Software Architecture: Key Principles
Green Software Architecture: Key Principles

December 18, 2023

292

1

Organizations are increasingly leveraging digital technology to be an integral part of all their products and services, leading towards Software-defined Everything (SDE), e.g., Software-defined vehicles, remote patient monitoring, cold chain monitoring, cryptocurrencies, OTT streaming, etc. SDE is realized by millions of lines of code embedded in the device and the cloud-native codes in hyperscalers. These software codes and associated architecture will impact the power consumption at the device and hyperscaler level, contributing to the GHG emissions associated with the product and services. As per the current estimate, by 2040, Information technology could contribute up to 14% of total GHG emissions compared to less than 2% in 2007. With more organizations taking pledges towards "Net Zero," reducing GHG emissions associated with their Information technology is vital. This is where designing and realizing sustainable or green software architecture becomes critical.

Green software architecture, sometimes called sustainable software architecture, focuses on designing, developing, and deploying software that minimizes environmental impact. Green architecture principles are targeted toward reduced resource consumption and computing power, which in turn reduces energy consumption and associated carbon footprint. Apart from aligning with the organization’s broader sustainability goals, green software architecture has the potential to positively impact operational costs.

Green software architecture requires a holistic approach covering software design, development, and deployment. Organizations used to focus on velocity and productivity, but in green architecture, trade-offs between velocity, productivity, functionality, performance, carbon footprint, etc., are essential for striking a finer balance.

This article will focus on the levers to improve carbon footprint across software products or platform lifecycle, leaving apart the traditional aspects like physical product design, including materials used, manufacturing, logistics, packaging, etc. The aspects of green software architecture become increasingly important while designing products and platforms with colossal scalability in terms of usage by end customers or for large enterprises size across the globe.

Green architecture levers across the software lifecycle:

  1. Requirements: In typical software development, bloat is common. Amazingly, many features in enterprise software are rarely or never used. A practical question must be debated without emotion: Is this a real need? Developing minimalistic software is an upfront approach to reducing build and operational emissions. 
  2. Non-Functional Requirement: Many non-functional requirements are commonly conveyed as a "must have" and sometimes overstated during the envisioning phase. Overstated NFRs can exponentially increase carbon emissions with more assets, development efforts, and idle machines. For example, is 99.99% availability a necessity for a non-critical application, and what assumptions led to this ask? To mitigate the overstated Non-functional requirement, a thorough product management and user-based experience approach is essential, which will keep this as needed.
  3. Energy Efficiency: Implementing Energy-efficient coding and design practices, including optimizing algorithms that minimize CPU and memory usage, reducing unnecessary computations, and using appropriate storage, retrieval, and archival mechanisms.
  4. Green Data Centres: In a traditional data center setup, green architecture involves consolidating multiple servers onto fewer physical machines or using virtualization, which helps to reduce energy consumption and hardware waste. Choosing data centers or even regions to deploy in hyper scaler which are powered by renewable energy sources or implementing energy-efficient data center designs is also part of green architecture.
  5. Cloud Computing: Leveraging cloud computing resources can be more environmentally friendly than running on-premises data centers because cloud providers can optimize energy use and resource allocation. One of the critical things Green Architecture focuses on is choosing the correct availability zone within cloud providers that use more sustainable energy. This is where collaboration with hyperscalers and optimization of on-prem, hybrid, and public clouds come into the picture.
  6. Green Design Patterns: Enforcing some of the design patterns and practices which can reduce carbon emissions, a Few examples (not exhaustive)
    • Minimizing the amount of data transferred over the network by compressing data, choosing efficient protocols, and reducing unnecessary communication can reduce energy consumption.
    • Serverless Architecture, using environment-friendly spot instances,
    • Reducing the number of microservices with proper implementation of domain-driven architecture, which in turn reduces the network traffic. The same principle is applicable while using the Function as a Service principle.
    • Optimize resources like memory, storage, and network bandwidth through resource pooling, virtualization, and load balancing.
    • Energy’s carbon intensity is a function of time and location, a helpful lever that can be leveraged while scheduling batches in the least carbon intensity. AI/ML can take Batch scheduling to the next level, where batches can be scheduled cognitively.
    • Consider approximation algorithms for the entitled use cases. Perfect results are not always required, and trade-offs can be achieved. Route calculation is a practical example of using such algorithms.
  7. Technology Platform: Choice of technology also plays a critical factor in terms of Carbon Emission
    • Choosing the correct container based on the need (e.g., can lightweight Docker Swarm satisfy the requirement?)
    • Choice of a messaging platform might require a critical evaluation to determine whether a high-throughput, distributed log Kafka is necessary, or one can live with fire and forget Redis.
    • An overly scattered API will lead to multiple hops; this could be inefficient as each call consumes processing power, memory, and networking, adding to carbon.
    • A highly verbose API can also be inefficient, as partial or sometimes most of the data traversed through the network is only meant to be discarded.
    • The choice of a programming language is also critical, e.g., a program written in C against a program written in Phyton will emit less carbon.
    • A hybrid architecture that rightly balances the Build vs. Buy scenarios reduces carbon emissions during the development phases and leverages tried and tested components that are fine-tuned for less carbon emission.

The technology team and the business must critically evaluate these choices among speed, feature and development complexity, and appropriate trade-offs.

  1. Green User Experience: Encouraging users to adopt energy-efficient practices through user interface design, such as displaying energy consumption statistics or offering power-saving options like dark mode.
  2. Sustenance : Implementing real-time monitoring tools to track energy and resource usage  to  identify areas for improvement and guide optimization efforts using AI/ML techniques. E.g. : Scale only when in need, shut down the unused servers. Periodically clearing the backups is also an effective guideline towards sustainability during sustenance. 

Measuring total carbon emissions for software products and platforms :

We can only control or optimize things that can be measured; therefore, measuring total carbon emissions from existing software products and platform landscape is critical.

GHG protocol is the most common method for measuring total carbon emissions from an organization and is classified into three categories.

The most widely used method for software products and platforms to measure GHG impact is Software Carbon Intensity (SCI) designed to measure the rate of emissions complementing existing GHG protocol. The main principle of SCI is instead categorizing into scopes 1,2, or 3, bucketize into operational emissions (resulting from software running) and embodied emissions (hardware/Devices required to hist and run the software). It's also an intensity rather than a total. One cannot reduce the SCI score by purchasing neutralizations and compensations or offsetting electricity through renewable energy credits. SCI score will decrease if the application is more energy-efficient, hardware-efficient, or carbon-aware. In other words, GHG protocol is to estimate total emissions, and the SCI is a tool to enable the elimination of software-driven emissions.

Green software architecture is crucial today to address environmental concerns, comply with regulations, reduce costs, and demonstrate a commitment to sustainable and responsible business practices. As the world becomes more conscious of technology's ecological impact, incorporating green principles into software development becomes increasingly important. Green Software Architecture needs to be infused from the beginning of product and platform development instead of taken as something to be fixed later, which will undoubtedly cause a huge amount of refactoring of the design.

 

Author

Sanjay Datta, Head of Design and Architecture Office, Digital Product and Platform Engineering, Tech Mahindra


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


Tech Mahindra offers technology consulting and digital solutions to global enterprises across industries, enabling transformative scale at unparalleled speed. With 147,000+ professionals across 90+ countries helping 1100+ clients, Tech Mahindra provides a full spectrum of services including consulting, information technology, enterprise applications, business process services, engineering services, network services, customer experience & design services, AI & analytics, and cloud & infrastructure services. Tech Mahindra’s Engineering Services (ES) delivers solutions enabling “Digital Engineering Enterprise” across aerospace and defense, automotive, industrial, telecom, healthcare, energy & utilities and ISVs. With 50+ exclusive global engineering centers supporting new program launches and major global Engineering enterprises, Tech Mahindra is an established leader for Engineering Services in the industry.

© Copyright nasscom. All Rights Reserved.