5 minute read
400 developers joined #CarbonHack22 to build the best carbon-aware application for a chance to win 40K USD.
A previous colleague of mine, Ismael, kindly re-posted my 'Open to work' post on LinkedIn last month (October). Once I caught up Ismael, I was opened up to an opportunity to join a 3 week long Hackathon organised by the Green Software Foundation 🌍.
The objective of this Hackathon was to build the most innovative carbon-aware software solution using the Green Software Foundation's Carbon Aware SDK; with Intel, UBS, Goldman Sachs, Microsoft, Accenture and more as judges!!
Ahead I went and looked for a project where I could contribute some of my skills and also throw myself into a new project, after being made redundant! I found an idea that I liked the sound of and applied it to be a part of this solution. Upon being accepted, we formed a team of 3 and had a Kick-Off (KO) call to discuss our ideas! Jonathan being the brains of the operation, led the team and discussed his initial thoughts and away we went along with Abdul.
What problem does your idea solve?
So, you might be thinking, what on earth is a "carbon-aware" software solution?
Believe it or not, how you utilise the internet can be harmful to the planet. For example, sending 65 emails is roughly equivalent to driving 1km in a car. To solve this problem The Green Software Foundation has hosted a Carbon Hack where developers around the world can help reduce this impact by creating software that is friendlier to the planet we live on.
Another example is data centres:
On a global level, data centres consume approximately 200 terawatt-hours (TWh) of electricity, or nearly one per cent of global electricity demand, while contributing to 0.3% of all global CO2 emissions, according to the International Energy Agency.
Our solution
I joined a team from the Hackathon called 'Green Webhook'. Personally, I thought this was such an interesting and easy idea for users to become environmentally friendly without too much effort! What also drew my attention to this particular project was the possibility of using RedwoodJS and TailwindCSS in an awesome side project. RedwoodJS, recently released in April 2022, is an App Framework for startups. It allows developers to quickly and easily access the frontend and backend in one place whilst utilising React, Prisma, TypeScript and Storybook!
The Green Webhook project's aim is to enable a radical reduction in carbon emissions in many different ways.
Currently, it enables the reduction of carbon emissions of Azure Cloud to compute workloads and in future, it will enable reductions in personal devices (phones & laptops), smart home devices and IoT devices.
The Green Webhook project is an easy-to-use solution allowing anyone to route traffic and compute-intensive workloads to the most carbon-friendly location or time of day depending on the real-time predictions of the Carbon Aware SDK.
Carbon Aware SDK
We used the Carbon Aware SDK to dynamically divert computer workloads to a time or Azure region that is less carbon intensive.
When a system triggers a webhook event, instead of the request going directly to the system that requires notification of the event, the request can be routed via a Green Webhook which will act as an intelligent proxy using the Carbon Aware SDK to predict which destination and what time is the best in order to result in the lowest carbon.
What we built
We built a working and fully deployed frontend and backend web application for managing and using Green Webhooks that can location shift workloads between different Azure regions.
As well as the above, we have nearly completed the addition of time-shifting support to enable the scheduling of workloads based on a user-provided maximum delay, for a webhook request.
My contributions
With a lot of the logic/fundamentals in place (thanks to Jon), I took a dive into styling and branding the Green Webhook. Firstly, I did some research into a name/logo for our project and worked from there. I used a website called Logaster (now due to be closed) to form a logo that was relevant to our project and the team agreed on this:
After deciding on the logo, I worked on creating functional components for the Header, Navigation and other areas of the web app. The colour of the application to me was pretty important. I recently discovered that a dark background/theme can reduce the amount of work our computer needs to do in order to display information and therefore reduces carbon emissions as well as save some battery life. This meant converting and ensuring our web app worked perfectly in a dark theme.
Impact of our solution
Our project has the potential to result in massive reductions in carbon emissions.
IT professionals can easily use the Green Webhooks to intelligently schedule very large workloads via a simple user interface.
Some examples of workloads that can be shifted are:
- Database backups
- Website scheduled jobs that use a globally distributed database
- Video and audio encoding
- Machine learning training and inference
- Schedule reports, batch jobs
- Any asynchronous trigger that has an SLA of more than 5 minutes to complete
What the future holds
Our vision for the Green Webhook is for it to grow into an "Internet Grid Operator". A carbon-aware webhook that location and time shift the workload that is triggered by any HTTP request. By being the intelligent "internet grid operator" we can provide demand shaping that works in harmony with the electricity grid supply shaping in order to reduce the carbon emissions the grid causes.
Check out our pitch on YouTube - https://www.youtube.com/watch?v=FyEYoeAGso4
Got this far? Try out the Green Webhook now: https://greenwebhook.netlify.app