Carbon-Aware vs. Carbon-Efficient Applications
A version of this article was first posted on the LeadDev blog
Carbon-efficiency can be transparent to the end-user. You can be more efficient at every level in converting carbon to useful functionality while still keeping the user experience the same.
At some point, being transparently more carbon-efficient isn’t enough. If the carbon cost of running the application right now is too high, we can change the user experience to reduce carbon emissions further. At the point the user is aware the application is running differently, it becomes a carbon-aware application.
I’m not proposing that we shackle all our applications so they perform worse at all times. I’m suggesting that we start building applications so when the carbon cost of running them is high, they adapt.
Sustainable Software Engineering
As a sustainable software engineer, my primary goal is to build carbon-efficient applications. A carbon-efficient application is one that extracts the maximum value for each gram of carbon it is responsible for emitting into the atmosphere.
Sustainable Software Engineering is an emerging discipline at the intersection of climate science, software, hardware, energy markets, and data center design.
There are 8 principles to sustainable software engineering. I encourage you to take 10 minutes to read them all. To summarize the first 3 principles:
- Reducing carbon emissions is the goal.
- Electricity is a proxy for carbon because most electricity is still created through the burning of fossil fuels.
- The electricity generated through the burning of fossil fuels is said to have a high carbon intensity. The electricity that was generated through renewable or low-carbon means has a low carbon intensity. The carbon intensity unit of measurement is gCO2eq/kWr or grams of carbon per kilowatt-hour.
To be carbon-aware is to implement what I think to be the secret door of an exceptionally creative world, the 7th principle of Sustainable Software Engineering, Demand Shaping.
A great example of demand shaping is video conferencing software. When a resource “bandwidth” is scarce, it automatically changes the user-experience. It reduces video quality while keeping the audio quality high. It shapes the demand (video quality) to match supply (bandwidth).
Demand shaping carbon aware applications is all about the supply of carbon. When the carbon cost of running your application becomes high, shape the demand to match the supply of carbon. This can happen automatically, or the user can make a choice.
Onlign – A Carbon Aware Operating System
An example of what a carbon aware application might look like is the Carbon Aware Operating system. Before you go away and try to install it, it’s a design project by Lu Ye at the Royal College of Art, and it’s on display in their online exhibition. She made a fantastic explanation video here:
The OS has several unique and exciting features. I recommend you take a look at her visually stunning work. The features I particularly loved were that during times it detected high carbon intensity electricity, it would perform some demand shaping. For example, instead of watching a Netflix video, perhaps you want to listen to a podcast?
Instead of making a video call, perhaps a low-carbon touch-sensitive interface will do?
The ideas expressed in this project paint the picture of what a carbon aware application might look like.
Eco-modes are often used in life, my car has an eco-mode, my washing machine has an eco-mode. When switched on, the performance changes and the products consume fewer resources (gas/electricity) to perform the same task. It’s not cost-free; otherwise, we would always choose eco-modes. We make trade-offs.
Because it’s a trade-off, eco-modes are almost always presented to a user as a choice. The user decides if they want to accept the compromises and enter an eco-mode.
Software applications can also have eco-modes.
- Save your data for future enjoyment. Plain text in the morning, Netflix at night.
- Browser warning if browsing website is not on green energy.
- Request smaller size media by default.
- Remove ads, images, videos, minimal media.
Will application eco-modes work?
Application eco-modes work for appliances and cars. If I have the option and I accept the trade-offs, I use eco-modes, perhaps not all the time, but most.
There is evidence that just asking users to change behavior works. Opower uses something called Behavioural Demand Response. At times of high energy demand, the carbon intensity shoots up because the only way to meet that demand is to burn more fossil fuels. Opower realized that just asking users not to use energy at peak times was effective at reducing energy demand.
What might demand shaping look like for a website?
There are many things you can do to build websites that are more carbon-efficient, such as more efficient code. Building websites that are carbon aware is different, as this approach requires a change to the user experience to improve carbon efficiency. Let’s explore what that might look like for a website.
Networking is the sixth principle of Sustainable Software Engineering that building websites often trigger. the 6th Transporting data is a proxy for carbon, so reducing the amount of data and distance it must travel across the network is an excellent way to be carbon efficient. Websites, by their nature, transmit loads of data across the web.
For example, we know that data transmitted over mobile networks, 3G/4G, is 4-7 times more carbon polluting than the same data transmitted over a WIFI network. We perhaps don’t know the absolute carbon numbers. Still, we know it’s relatively worse to browse a website on mobile networks than on WIFI.
Websites can detect whether they are on mobile networks. A demand shaping feature might be to automatically request skinny media (lower quality images and videos) if the website is being browsed over cellular networks.
Alternatively, a website could simply present the user with an eco-mode. If switched on, regardless of the context, the site will run more carbon efficiently, at the expense of user-experience.
If the website detects the user has started using a mobile network, it can suggest that the user switch on the eco-mode, and leave it to the user to decide how to proceed. If some of this makes you think, yes, this would make the website run faster, then yes! Green carbon-efficient applications are almost always going to be cheaper, faster, and more resilient than their gray counterparts.
Carbon-aware applications are not afraid of using demand shaping to reduce carbon emissions at the expense of user-experience.
We can rarely directly measure the carbon cost of our applications. Still, if we follow a resource chain and it eventually links to carbon emissions, then we can use that as a proxy for carbon emissions. Electricity is an excellent example of this, so is the transportation of data across the internet.
Applications can be carbon aware by default and automatically change the user experience. They may have an eco-mode that the user toggles. The least heavy-handed approach is when the application detects that the carbon cost of running has increased, and the application nudges the user to engage the eco-mode.
Consider adding an eco-mode to your application. It’s a feature toggle, so only the users who opt-in will be impacted. Check out the principles of sustainable software engineering for ideas on how to make your application more carbon-efficient during eco-modes. If a resource that can be proxied back to carbon is constrained, then consider adding demand shaping to increase the efficiency of that resource.