Skip to content

Commit

Permalink
Merge pull request #276 from Green-Software-Foundation/dev
Browse files Browse the repository at this point in the history
Merge Dev into Main - Release 1.1
  • Loading branch information
russelltrow authored Oct 25, 2023
2 parents 02be74f + c2a75d8 commit 6d773f3
Show file tree
Hide file tree
Showing 9 changed files with 149 additions and 17 deletions.
43 changes: 43 additions & 0 deletions docs/catalog/cloud/evaluate-other-cpu-architectures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: 2023-10-25
category: cloud
description: Applications are built with a software architecture that best fits the business need they are serving. Cloud providers make it easy to evaluate other CPU types
tags:
- cloud
- size:small
---

# Evaluate other CPU architectures

## Description

Applications are built with a software architecture that best fits the business need they are serving. Cloud providers make it easy to evaluate other CPU types, such as x86-64, which can be included in the evaluation along with many cost effective alternatives that feature good performance per watt.


## Solution

Other CPU architectures besides x86_64 should be evaluated for the application with energy efficiency and execution performance in mind.

## SCI Impact

`SCI = (E * I) + M per R`
[Software Carbon Intensity Spec](https://grnsft.org/sci)

Evaluating other CPU architectures can impact SCI as follows:

- `E`: Other CPU architectures may provide better energy efficiency for the application use case and, as such, reduce the overall energy consumption

## Assumptions

- Assumes that the framework can be executed on other CPU architectures as well and is optimized for it

## Considerations

- Also consider specialized accelerators for workloads that cloud providers might offer

## References

- [Azure Well-Architected Framework Sustainability Pillar](https://learn.microsoft.com/en-us/azure/architecture/framework/sustainability/sustainability-application-design)

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: TBD
published_date: 2022-11-09
category: cloud
tags:
- cloud
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog/cloud/remove-unused-assets.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: TBD
published_date: 2022-11-22
category: cloud
tags:
- cloud
Expand Down
43 changes: 43 additions & 0 deletions docs/catalog/cloud/use-async-instead-of-sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
version: 1.0
submitted_by: srini1978, markus-ntt-seidl
published_date: 2023-10-25
category: cloud
description: When making calls across process boundaries to either databases or file systems or REST APIs, relying on synchronous calls can cause the calling thread to become blocked, putting additional load on the CPU
tags:
- cloud
- size:medium
---

# Use Asynchronous network calls instead of synchronous

## Description

When making calls across process boundaries to either databases or file systems or REST APIs, relying on synchronous calls can cause the calling thread to become blocked, putting additional load on the CPU.

## Solution

Using asynchronous patterns frees the calling thread from being blocked on the response and, as such, additional work can be achieved without CPU cycles being consumed.

## SCI Impact

`SCI = (E * I) + M per R`
[Software Carbon Intensity Spec](https://grnsft.org/sci)

Using asyncronous calling patterns impacts SCI as follows:

- `E`: Optimal utilization of the CPU leads to reduced energy consumption
- `M`: Optimized average CPU utilization can reduce the amount of resources needed which will decrease the amount of embodied carbon required to support them

## Assumptions

- The specific library for making asynchronous calls is available in the language being used for web development e.g. Task parallel library in C#.

## Considerations

- Consider higher level patterns for asynchronous communication as well e.g. Queues, Topics and Streams

## References

- Async/Await (https://en.wikipedia.org/wiki/Async/await)
- [Azure Well-Architected Framework Sustainability Pillar](https://learn.microsoft.com/en-us/azure/architecture/framework/sustainability/sustainability-application-design)
2 changes: 1 addition & 1 deletion docs/catalog/cloud/use-serverless.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: TBD
published_date: 2023-01-17
category: cloud
tags:
- cloud
Expand Down
17 changes: 9 additions & 8 deletions docs/catalog/web/enable-text-compression.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: TBD
published_date: 2023-10-25
category: web
description: Web browsers often communicate with web servers in a human readable format. These can be HTML, JavaScript and/or CSS files and REST requests which can return a response in JSON. This human readable communication is redundant and, as such, can be compressed to save bandwidth.
tags:
- web
- size:small
Expand All @@ -13,29 +14,29 @@ tags:

## Description

Web browsers often communicate with web servers in a human readable format. These can be HTML, JavaScript and/or CSS - files and also REST requests which can return a response in JSON. This communication is human readable and therefore highly redundant, therefore it can be highly compressed saving a lot of bandwidth.
Web browsers often communicate with web servers in a human readable format. These can be HTML, JavaScript and/or CSS files and REST requests which can return a response in JSON. This human readable communication is redundant and, as such, can be compressed to save bandwidth.

Web browsers and servers can communicate the compression format dynamically via the "Accept-Encoding"/"Content-Encoding" HTTP Headers. This allows the communication to dynamically switch to compression formats both side support.
Web browsers and servers can communicate the compression format dynamically via the "Accept-Encoding"/"Content-Encoding" HTTP Headers. This allows the communication to dynamically switch to compression formats both sides support.


## Solution

Enable all supported compression formats on the server, this allows clients to use the best available format.
Enable all supported compression formats on the server, allowing clients to use the best available format.


## SCI Impact

`SCI = (E * I) + M per R`
[Software Carbon Intensity Spec](https://grnsft.org/sci)

Concerning the SCI equation, the compression will impact the equation as follows:
Enabling text compression will impact SCI as follows:

- `E`: Reducing the amount of emissions by reducing electricity needed while transferring and processing text files.
- `M`: Reducing the amount of size of the files can also reduce the amount of storage requirements of the web page on the server
- `E`: Reducing emissions by reducing the amount of electricity needed while transferring and processing text files
- `M`: Reducing the size of the files can also reduce the storage requirements of the web page on the server

## Assumptions

- The ability to use web servers that allow compression formats
- The use of web servers that allow compression formats

## Considerations

Expand Down
10 changes: 5 additions & 5 deletions docs/catalog/web/keep-request-counts-low.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: TBD
published_date: 2023-10-25
category: web
description: Accessing a web page usually retrieves a HTML file from the web server. The HTML may then reference additional resources that the browser has to download.
tags:
- size:medium
- role:web-developer
Expand All @@ -13,19 +14,18 @@ tags:

## Description

Accessing a web page usually retrieves a HTML file from the web server. The HTML can then reference additional resources that the browser has to download.
To use the least amount of CO2, reduce the amount of files needed to display a page in the browser.
Accessing a web page usually retrieves a HTML file from the web server. The HTML may then reference additional resources that the browser has to download. More requests means more energy consumed. As such, reducing the amount of files needed to display a page in the browser also reduces the environmental impact.

## Solution

Reduce the amount of files needed and also the amount of requests done by the loaded JavaScript to display the final page.
Reduce the amount of files needed and requests made by the loaded JavaScript in order to display the final page.

## SCI Impact

`SCI = (E * I) + M per R`
[Software Carbon Intensity Spec](https://grnsft.org/sci)

Concerning the SCI equation, keeping the request counts low will impact:
Keeping request counts low will impact SCI as follows:

- `E`: Reducing the amount of requests reduces the energy needed to display the page
- `M`: Reducing the amount of requests can also reduce the amount of files and therefore the storage requirements of the web page on the server
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog/web/minimize-main-thread-work.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: TBD
published_date: 2022-11-22
category: web
tags:
- web
Expand Down
45 changes: 45 additions & 0 deletions docs/catalog/web/use-server-side-rendering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
version: 1.0
submitted_by: markus-ntt-seidl
published_date: 2023-10-25
category: web
description: Use server-side rendering for high-traffic pages
tags:
- web
---

# Use server-side rendering for high-traffic pages

## Description

Modern web applications feature a lot of interface elements that are stored in templates on the server. The template is downloaded with the application code and then rendered with requested data from the server.
This can dramatically increase the SCI in different scenarios: When the client device doesn't have access to green energy, when the page usage is short (e.g. accidental clicks, pages with short dwell time like landing pages) or if a lot of server round-trips are needed to gather data.


## Solution

Consider using server-side rendering as a method to reduce energy consumption on the client side. Frameworks like Angular or React already provide solutions on how to implement this efficiently.
Server side rendering can improve site loading times (including rendering time on slower hardware), reduce network requirements (less round trips needed), and utilize caching (pre-rendered pages can be stored on the client device).

## SCI Impact

`SCI = (E * I) + M per R`
[Software Carbon Intensity Spec](https://grnsft.org/sci)

Server side rendering will impact SCI as follows:

- `E`: Pre-rendering once can dramatically reduce energy consumption; pre-rendering on every request can reduce energy consumption if the server is more energy efficient and has access to green energy

## Assumptions

- Assumes that the frontend technology being used allows for pre-rendered content
- Assumes that the web page is visited in high enough volumes so as to affect the overall SCI

## Considerations

- Consider using a caching mechanism to store rendered pages if they change frequently but are still met with a high load. This can significantly reduce the server load by serving pre-rendered content for frequent requests.
- Consider the other patterns in the web category

## References

- [Azure Well-Architected Framework Sustainability Pillar](https://learn.microsoft.com/en-us/azure/architecture/framework/sustainability/sustainability-application-design)

0 comments on commit 6d773f3

Please sign in to comment.