visit
Let’s become the architects of a cleaner, greener world
The cloud has a
There aren’t many examples of carbon-aware computing out there - which is why events like ____are significant in crowd-sourcing new ideas and accelerating innovation in software programming to build applications that are both climate-conscious and energy-responsive.
2.Time Shifting: Running our software at a cleaner time; when clean energy is being generated by wind, water, or solar power.
Building carbon-aware applications is challenging, despite various data sources, partly because some of these sources are hard to navigate. The
If you visit
We can hook it to APIs like
Time Shifting: What time is best to run my software?
When time shifting, you can use the /emissions/bylocations/best API endpoint, providing it with the location you are interested in in the location field. Currently, the location names are mapped to Azure region names. You also need to provide the time window during which you are able to move the job. The start time needs to be entered in the time field, and the end of it in the toTime field. The dates provided should be in the ISO 8601 format.
You can directly request data from the API via a Curl request like so:
curl -X 'GET' \
'//carbon-aware-api.azurewebsites.net/emissions/bylocations/best?location=uksouth&time=2022-10-08T00%3A00%2B01%3A00&toTime=2022-10-08T23%3A59%2B01%3A00' \
-H 'accept: application/json'
As output, you will receive an array of JSON objects, with the WattTime region name for the location, time of the data, carbon intensity rating, and duration for which this data is valid (WattTime provides data in 5-minute intervals). This data will be the lowest carbon ratings for the requested location. This query looks at data from a single 24-hour window, so to get an accurate result you might want to request data for multiple days (e.g., by looking at the /emissions/bylocationsendpoint) and check if this is not a one-time drop in carbon intensity!
[
{
"location": "UK",
"time": "2022-10-08T00:45:00+00:00",
"rating": 351.98767912,
"duration": "00:05:00"
},
{
"location": "UK",
"time": "2022-10-08T00:40:00+00:00",
"rating": 351.98767912,
"duration": "00:05:00"
},
{
"location": "UK",
"time": "2022-10-08T00:35:00+00:00",
"rating": 351.98767912,
"duration": "00:05:00"
}
]
When location shifting, you can use the same endpoint as previously (/emissions/bylocations/best), but for this time, provide multiple locations you are interested in and a single time during which you are looking. The example query below has multiple locations provided, taking uksouth, eastus, and francecentral under consideration. You can provide it with a time window (similarly to time shifting) or a single time point instead, filling in the time and toTimefields.
You can directly request data from the API via a Curl request like so:
curl -X 'GET' \
'//carbon-aware-api.azurewebsites.net/emissions/bylocations/best?location=uksouth&location=eastus&location=francecentral&time=2022-10-08T09%3A00%2B01%3A00' \
-H 'accept: application/json'
As output, you will receive the same format of a response, with locations having the lowest carbon intensity, along with the time for that reading, the actual value of the carbon intensity, and the duration for which this data is valid.
[
{
"location": "FR",
"time": "2022-10-08T08:00:00+00:00",
"rating": 242.21832558,
"duration": "00:05:00"
}
]
Demand shaping: How do I adjust user behaviour?
Depending on your use cases, you can allow an entire device, computing job, or application to run exclusively on renewable energy, either by only running when the local grid is green or running only from zones currently powered by green energy.
Carbon-aware computing is the next frontier of sustainable software engineering. Some of the most influential decision-makers in the industry are interested in reducing carbon emissions from software and showing that by lending their resources and contributing significant prize money to
It is now also the job of software engineers to build solutions that do less harm to both people and the planet. Carbon-aware computing is how current and future generations of software engineers can help achieve this goal.
Written by Asim Hussain, Executive Director and Chairperson, Green Software Foundation