Upgrade to Pro — share decks privately, control downloads, hide ads and more …

apidays Paris 2024 - Design, Build, and Run Sus...

apidays
December 31, 2024

apidays Paris 2024 - Design, Build, and Run Sustainable APIs and Softwares - Thierno Diallo, AXA France

Design, Build, and Run Sustainable APIs and Softwares
Thierno Diallo, Staff Engineer at AXA France

apidays Paris 2024 - The Future API Stack for Mass Innovation
December 3 - 5, 2024

------

Check out our conferences at https://www.apidays.global/

Do you want to sponsor or talk at one of our conferences?
https://apidays.typeform.com/to/ILJeAaV8

Learn more on APIscene, the global media made by the community for the community:
https://www.apiscene.io

Explore the API ecosystem with the API Landscape:
https://apilandscape.apiscene.io/

apidays

December 31, 2024
Tweet

More Decks by apidays

Other Decks in Programming

Transcript

  1. Classification : Interne Design, Build, and Run Sustainable APIs and

    Softwares Thierno Diallo/ Staff Software Engineer @Axa France 03/11 to 05/11 – ApiDays 2024
  2. Classification : Interne Green API/Software - What is Green API

    - Key points (Measurement, Green API Design principles, GreenCoding for implementation, and observability for continuous improvement) 2
  3. Classification : Interne Energy-Efficient Design - Pattern: Lazy loading ▪

    Best Practices: Stream API, @Lazy of Spring, Dynamic imports Next.js - Pattern: Optimize for low-latency ▪ Best Practices: Asynchronous Processing, CDN, API Endpoint Design 9
  4. Classification : Interne Efficient Data Processing - Pattern: Cache &&

    Memoization ▪ Best Practices: @Cachable Spring, useMemo Next.js, Redis - Pattern: Support delta updates ▪ Best Practices: Efficient Delta Calculation, Resource Change Tracking, Lightweight Data Representation - Pattern: Batch processing ▪ Best Practices: Chunk-oriented processing SpringBatch, Pagination, Bulk operations 10 API API API
  5. Classification : Interne Optimize Network Traffic - Pattern: API Pagination

    ▪ Best Practices: Pageable Spring, Server-Side paginate Next.js, limit large database query - Pattern: Data Compression ▪ Best Practices: Enable data compression, Gzip Spring/Next.js, Brotli Next.js, large file compression - Pattern: Efficient protocols ▪ Best Practices: Enable HTTP/2 and 3, TLS, webSocket for real-time data/communication 11
  6. Classification : Interne Resources Minimization - Pattern: Rate limiting ▪

    Best Practices: Monitor/feedback requests, Dynamic rate ajustement - Pattern: Optimize database queries ▪ Best Practices: Index, database & query optimization, Denormalization and Caching - Pattern: Reduce the network resources requests to the lowest ▪ Best Practices: Efficient Data Fetching, Cache Utilization, Batch Requests 12
  7. Classification : Interne Green Coding Principles: Code Efficiency - Pattern:

    Avoiding loops and repetitive operations ▪ Best Practices: Stream API, Data structures optimization, refact mapping and looping logic Next.js - Pattern: Object Pooling ▪ Best Practices: ObjectPool Design Pattern, DB Coonections Pooling, handling stateful object in React - Pattern: Code Duplication ▪ Best Practices: AOP Java/Spring, Shared Service, Analyse/Refactor Duplication 14
  8. Classification : Interne Green Ops: Power Efficient Hosting - Pattern:

    Start/Expose APP on-demand ▪ Best Practices: Use DailyClean, SlimFaas - Pattern: Setup Only Infra Needed Resources ▪ Best Practices: monitor real resources need - Pattern: Auto-Scale (Kube context) ▪ Best Practices: Implement HPA, Resources limits and requests, Right size containers, Real time metrics 17
  9. Classification : Interne Take Away: main messages - Every Step

    Toward efficiency count - Measurement, And continuous improvement is the key for success - Adopting Green API/Sofware Principles/Patterns and Practices is our ally - Leveraging Opensource 21
  10. Classification : Interne Take Away: tools/resources sharing 22 1- AxaFrance/dailyclean:

    Save The planet by auto turn off your pods on kubernetes (github.com) 2- AxaFrance/SlimFaas: SlimFaas : The slimest and simplest Function As A Service (github.com) 3- Green-Software-Foundation/if: Impact Framework (github.com) 4- cnumr/ecoCode: Reduce the environmental footprint of applications with this sonarQube plugin 5- LightHouse-ecoIndex-Agregator Axa France (github.com) 6- Sustainable-computing-io/kepler: Kepler (Kubernetes-based Efficient Power Level Exporter)
  11. Classification : Interne Call To Action: We Need You -

    Be The Change ▪ Adopt Green By Design ▪ Adopt Green Coding practices - Start Small, Scale Big ▪ Join global conversation ▪ Learn from - Sustainable Code = Sustainable Future ▪ Commit to measuring and reducing 24
  12. Classification : Interne Thanks « Together, we can code a

    greener future! » Thierno Diallo/ Staff Software Engineer @Axa France 03/11 to 05/11 – ApiDays 2024