GithubHelp home page GithubHelp logo

envite-consulting / camunda-carbon-reductor Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 1.0 3.92 MB

The Camunda Carbon Reductor allows you to time shift your processes' carbon emissions when energy is clean while still fulfilling the requested SLAs.

License: MIT License

Java 99.58% Dockerfile 0.42%
bpmn camunda camunda-platform-8 connector green-it sustainability

camunda-carbon-reductor's People

Contributors

actions-user avatar hehnle avatar henningkrause95 avatar lwluc avatar maxbehr801 avatar tobiasschaefer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

thandayuthapani

camunda-carbon-reductor's Issues

[FEATURE] implement minimum threshold for execution delay

Is your feature request related to a problem? Please describe.
Delaying the process may only be wanted if a specific threshold of CO2e reduction is possible.

Describe the solution you'd like

  • Allow setting a minimal amount of g/CO2 per kWh which should be saved at least
  • Think about a retry logic

Additional context
none

[FEATURE] Measurement Mode

Is your feature request related to a problem? Please describe.
To measure the possible impact without the shifting intervention, we add a mode to collect data only.

Describe the solution you'd like
The measurement mode should not time shift the process, it should just collect the data. Using the data, you can analyze the impact time shifting has on your business process.

Additional context
Measuring the impact first offers a better basis for argumentation.

[FEATURE] Camunda Platform 7.20 Update

Is your feature request related to a problem? Please describe.
Camunda Platform 7.20 is released with compatibility to Spring Boot 3.1 (see).

Describe the solution you'd like

  • Camunda Platform Update to 7.20
    • Camunda test dependencies should be updated as well
  • Spring Boot Update to 3.1

Additional context

[FEATURE] Incident Handling

Is your feature request related to a problem? Please describe.
Incident are not handled equally in C7 and C8: In C7 exceptions are catched in C8 not.

Describe the solution you'd like

  • unify incident handling for C7 / C8
  • potentially add input whether Carbon Reductor errors should be returned to the process

Additional context
none

de.envite.greenbpm.api.carbonawaresdk.ApiException: Message: Forbidden

Hello friends of Camunda and the planet, I hope this message finds you well!

I follow these documents step by step:
camunda-carbon-reductor-c8
AND
api-carbon-aware

I was able to create the user on watttime.org and generate the token through login.

I made the changes indicated in docker-compose as follows:
docker-compose.yaml

I uploaded docker with docker-compose up and tested:
http://localhost:8090/emissions/forecasts/current?location=westus
It's working correctly.

However, the connector is giving an incident:
Expected to throw an error event with the code 'carbon-reductor-error' with message 'Could not query API to get infos about future emissions', but it was not caught. No error events are available in the scope.

In the camunda-8-carbon-reductor-connector docker console:

2023-10-14 10:29:11 2023-10-14 13:29:11.223 ERROR 1 --- [pool-1-thread-1] d.e.g.c.c.a.w.CarbonAwareSdkClient : Error when calling the API for the optimalForecastUntil
2023-10-14 10:29:11
2023-10-14 10:29:11 de.envite.greenbpm.api.carbonawaresdk.ApiException: Message: Forbidden
2023-10-14 10:29:11 HTTP response code: 403
2023-10-14 10:29:11 HTTP response body: {"title":"WattTimeClientHttpException","status":403,"detail":"Error requesting forecast?ba=UK","traceId":"00- 304b5b25e57e4c7b918e9dba41e166c2-f751c3da54859e37-01","errors":{}}
2023-10-14 10:29:11 HTTP response headers: {content-type=[application/problem+json; charset=utf-8], date=[Sat, 14 Oct 2023 13:29:10 GMT], server=[Kestrel], transfer-encoding=[chunked]}
2023-10-14 10:29:11 at de.envite.greenbpm.api.carbonawaresdk.ApiClient.handleResponse(ApiClient.java:1115) ~[api-carbon-aware-2.0.2.jar!/:2.0.2 ]
2023-10-14 10:29:11 at de.envite.greenbpm.api.carbonawaresdk.ApiClient.execute(ApiClient.java:1028) ~[api-carbon-aware-2.0.2.jar!/:2.0.2 ]
2023-10-14 10:29:11 at de.envite.greenbpm.api.carbonawaresdk.api.CarbonAwareApi.getCurrentForecastDataWithHttpInfo(CarbonAwareApi.java:790) ~[api-carbon-aware-2.0.2.jar!/:2.0 .two]
2023-10-14 10:29:11 at de.envite.greenbpm.carbonreductor.core.adapter.watttime.CarbonAwareSdkClient.getOptimalForecastUntil(CarbonAwareSdkClient.java:37) ~[carbon-reductor-core-2.0.2.jar!/ :2.0.2]
2023-10-14 10:29:11 at de.envite.greenbpm.carbonreductor.core.adapter.watttime.CarbonAwareSdkClient.getEmissionTimeframe(CarbonAwareSdkClient.java:28) ~[carbon-reductor-core-2.0.2.jar!/ :2.0.2]
2023-10-14 10:29:11 at de.envite.greenbpm.carbonreductor.core.domain.service.DelayCalculatorService.calculateDelay(DelayCalculatorService.java:39) ~[carbon-reductor-core-2.0.2.jar!/ :2.0.2]
2023-10-14 10:29:11 at de.envite.greenbpm.carbonreductorconnector.adapter.in.zeebe.CarbonReductorWorker.execute(CarbonReductorWorker.java:45) ~[classes!/:2.0.2]
2023-10-14 10:29:11 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
2023-10-14 10:29:11 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
2023-10-14 10:29:11 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
2023-10-14 10:29:11 at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
2023-10-14 10:29:11 at io.camunda.zeebe.spring.client.bean.MethodInfo.invoke(MethodInfo.java:51) ~[spring-client-zeebe-8.2.3.jar!/:8.2 .3]
2023-10-14 10:29:11 at io.camunda.zeebe.spring.client.jobhandling.JobHandlerInvokingSpringBeans.handle(JobHandlerInvokingSpringBeans.java:52) ~[spring-client-zeebe-8.2.3.jar!/:8.2 .3]
2023-10-14 10:29:11 at io.camunda.zeebe.client.impl.worker.JobRunnableFactory.executeJob(JobRunnableFactory.java:44) ~[zeebe-client-java-8.2.3.jar!/:8.2 .3]
2023-10-14 10:29:11 at io.camunda.zeebe.client.impl.worker.JobRunnableFactory.lambda$create$0(JobRunnableFactory.java:39) ~[zeebe-client-java-8.2.3.jar! /:8.2.3]
2023-10-14 10:29:11 at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
2023-10-14 10:29:11 at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[na:na]
2023-10-14 10:29:11 at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
2023-10-14 10:29:11 at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
2023-10-14 10:29:11 at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
2023-10-14 10:29:11 at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

I'd like to know what's wrong.

[FEATURE] GraalVM

Is your feature request related to a problem? Please describe.
To reduce the resource usage of the worker we should ahead-of-time compile our applications with GraalVM.

Describe the solution you'd like
We're compiling the worker to a native image using GraalVM (Docker multi-stage build maybe).
Also have a look at building a custom JDK distribution (jlink) for smaller target images.

Goal is to optimize resource usage and reduce startup time as well as memory consumption.

Additional context
By switching to GraalVM we can consider using Micronaut as framework.

Fix Problem with ResponseHeader from Carbon-Aware-SDK

java.lang.NullPointerException: Cannot invoke "Object.toString()" because the return value of "de.envite.greenbpm.api.carbonawaresdk.ApiException.getResponseHeaders()" is null
at de.envite.greenbpm.api.carbonawaresdk.ApiException.getMessage(ApiException.java:164)
at ch.qos.logback.classic.spi.ThrowableProxy.(ThrowableProxy.java:78)
at ch.qos.logback.classic.spi.ThrowableProxy.(ThrowableProxy.java:62)
at ch.qos.logback.classic.spi.LoggingEvent.(LoggingEvent.java:119)
a...

[BUG] Build and Publish Docker Multi-Arch

Describe the bug

ERROR: Multiple platforms feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")

See: https://github.com/envite-consulting/camunda-carbon-reductor/actions/runs/5690641292/job/15424376716

Expected behavior
Build and publish für multiple architectures.

Environment (please complete the following information):

  • GitHub Actions only

Additional context
Possible opportunities would:

[FEATURE] Improved Variable and Class naming

Is your feature request related to a problem? Please describe.
The variables and domain class names could be improved to be easier to catch.

Describe the solution you'd like
Improved variable and class names, mainly in the core-module.

Additional context
none

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.