diff --git a/.deployment/docker-compose.yml b/.deployment/docker-compose.yml
index c4796da..c6f1955 100644
--- a/.deployment/docker-compose.yml
+++ b/.deployment/docker-compose.yml
@@ -67,6 +67,8 @@ services:
- ./:/data/
environment:
mqtt.broker.uri: tcp://broker.hivemq.com:1883
+ discovery.endpoint.uri: https://tapas-auction-house.86.119.35.213.nip.io/discovery/
+ auction.house.uri: https://tapas-auction-house.86-119-35-40.nip.io
labels:
- "traefik.enable=true"
- "traefik.http.routers.tapas-auction-house.rule=Host(`tapas-auction-house.${PUB_IP}.nip.io`)"
@@ -86,7 +88,6 @@ services:
- ./:/data/
environment:
task.list.uri: http://tapas-tasks:8081
- auction.house.uri: http://tapas-auction-house:8086
executor.robot.uri: http://executor-robot:8084
executor.computation.uri: http://executor-computation:8085
mqtt.broker.uri: tcp://broker.hivemq.com:1883
diff --git a/docker-compose.yaml b/docker-compose.yaml
index c53981f..8566c1b 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -72,15 +72,15 @@ services:
volumes:
- ./executor-computation/src:/opt/app/src
- ./executor-computation/target:/opt/app/target
- executor-robot:
- container_name: executor-robot
- build:
- context: "."
- dockerfile: "./executor-robot/Dockerfile"
- target: development
- ports:
- - "8084:8084"
- - "5009:5005"
- volumes:
- - ./executor-robot/src:/opt/app/src
- - ./executor-robot/target:/opt/app/target
+ # executor-robot:
+ # container_name: executor-robot
+ # build:
+ # context: "."
+ # dockerfile: "./executor-robot/Dockerfile"
+ # target: development
+ # ports:
+ # - "8084:8084"
+ # - "5009:5005"
+ # volumes:
+ # - ./executor-robot/src:/opt/app/src
+ # - ./executor-robot/target:/opt/app/target
diff --git a/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/in/web/TaskAvailableController.java b/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/in/web/TaskAvailableController.java
index 32f3486..66ef496 100644
--- a/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/in/web/TaskAvailableController.java
+++ b/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/in/web/TaskAvailableController.java
@@ -1,4 +1,4 @@
-package ch.unisg.executorBase.executor.adapter.in.web;
+package ch.unisg.executorbase.executor.adapter.in.web;
import java.util.logging.Logger;
diff --git a/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/out/web/ExecutionFinishedEventAdapter.java b/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/out/web/ExecutionFinishedEventAdapter.java
index 5d832db..f683b81 100644
--- a/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/out/web/ExecutionFinishedEventAdapter.java
+++ b/executor-base/src/main/java/ch/unisg/executorBase/executor/adapter/out/web/ExecutionFinishedEventAdapter.java
@@ -1,4 +1,4 @@
-package ch.unisg.executorBase.executor.adapter.out.web;
+package ch.unisg.executorbase.executor.adapter.out.web;
import java.io.IOException;
import java.net.URI;
diff --git a/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorBase.java b/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorBase.java
index be5ddd6..09ded48 100644
--- a/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorBase.java
+++ b/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorBase.java
@@ -1,11 +1,10 @@
package ch.unisg.executorbase.executor.domain;
-import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import ch.unisg.common.valueobject.ExecutorURI;
-import ch.unisg.executorBase.executor.adapter.out.web.ExecutionFinishedEventAdapter;
+import ch.unisg.executorbase.executor.adapter.out.web.ExecutionFinishedEventAdapter;
import ch.unisg.executorbase.executor.adapter.out.web.GetAssignmentAdapter;
import ch.unisg.executorbase.executor.adapter.out.web.NotifyExecutorPoolAdapter;
import ch.unisg.executorbase.executor.application.port.out.ExecutionFinishedEventPort;
diff --git a/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorType.java b/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorType.java
index 30460e6..ca9533a 100644
--- a/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorType.java
+++ b/executor-base/src/main/java/ch/unisg/executorBase/executor/domain/ExecutorType.java
@@ -1,11 +1,11 @@
package ch.unisg.executorbase.executor.domain;
public enum ExecutorType {
- COMPUTATION, ROBOT, HUMIDITY;
+ ADDITION, ROBOT;
/**
* Checks if the give executor type exists.
- * @return Whether the given executor type exists
+ * @return Wheter the given executor type exists
**/
public static boolean contains(String test) {
diff --git a/executor-computation/src/main/java/ch/unisg/executorcomputation/ExecutorcomputationApplication.java b/executor-computation/src/main/java/ch/unisg/executorcomputation/ExecutorcomputationApplication.java
index fe25430..7a22493 100644
--- a/executor-computation/src/main/java/ch/unisg/executorcomputation/ExecutorcomputationApplication.java
+++ b/executor-computation/src/main/java/ch/unisg/executorcomputation/ExecutorcomputationApplication.java
@@ -13,7 +13,7 @@ public class ExecutorcomputationApplication {
public static void main(String[] args) {
try {
- TimeUnit.SECONDS.sleep(40);
+ TimeUnit.SECONDS.sleep(10);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
diff --git a/executor-computation/src/main/java/ch/unisg/executorcomputation/executor/domain/Executor.java b/executor-computation/src/main/java/ch/unisg/executorcomputation/executor/domain/Executor.java
index 2da59db..582b57f 100644
--- a/executor-computation/src/main/java/ch/unisg/executorcomputation/executor/domain/Executor.java
+++ b/executor-computation/src/main/java/ch/unisg/executorcomputation/executor/domain/Executor.java
@@ -7,7 +7,7 @@ import ch.unisg.executorbase.executor.domain.ExecutorType;
public class Executor extends ExecutorBase {
- private static final Executor executor = new Executor(ExecutorType.COMPUTATION);
+ private static final Executor executor = new Executor(ExecutorType.ADDITION);
public static Executor getExecutor() {
return executor;
diff --git a/executor-humidity/pom.xml b/executor-humidity/pom.xml
deleted file mode 100644
index 27ed3b6..0000000
--- a/executor-humidity/pom.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
- 4.0.0
-
- org.springframework.boot
- spring-boot-starter-parent
- 2.5.5
-
-
- org.unisg
- executor-humidity
- 1.0-SNAPSHOT
- executor-humidity
- Demo project for Spring Boot
-
-
- jitpack.io
- https://jitpack.io
-
-
-
-
- org.springframework.boot
- spring-boot-autoconfigure
- 2.5.5
- compile
-
-
- org.springframework
- spring-web
- 5.3.10
- compile
-
-
- ch.unisg
- executor-base
- 0.0.1-SNAPSHOT
- compile
-
-
- org.eclipse.californium
- californium-core
- 3.0.0
- compile
-
-
- com.github.Interactions-HSG
- wot-td-java
- 0.1.1
-
-
-
-
- 16
- 16
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
-
-
-
diff --git a/executor-humidity/src/main/java/ch/unisg/executorhumidity/ExecutorhumidityApplication.java b/executor-humidity/src/main/java/ch/unisg/executorhumidity/ExecutorhumidityApplication.java
deleted file mode 100644
index 181cfeb..0000000
--- a/executor-humidity/src/main/java/ch/unisg/executorhumidity/ExecutorhumidityApplication.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package ch.unisg.executorhumidity;
-
-
-import ch.unisg.executorhumidity.executor.domain.Executor;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class ExecutorhumidityApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(ExecutorhumidityApplication.class, args);
- Executor.getExecutor();
- }
-
-}
diff --git a/executor-humidity/src/main/java/ch/unisg/executorhumidity/executor/adapter/in/web/TaskAvailableController.java b/executor-humidity/src/main/java/ch/unisg/executorhumidity/executor/adapter/in/web/TaskAvailableController.java
deleted file mode 100644
index b66472c..0000000
--- a/executor-humidity/src/main/java/ch/unisg/executorhumidity/executor/adapter/in/web/TaskAvailableController.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package ch.unisg.executorhumidity.executor.adapter.in.web;
-
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RestController;
-
-import ch.unisg.executorbase.executor.application.port.in.TaskAvailableCommand;
-import ch.unisg.executorbase.executor.application.port.in.TaskAvailableUseCase;
-import ch.unisg.executorbase.executor.domain.ExecutorType;
-
-import java.util.concurrent.CompletableFuture;
-
-@RestController
-public class TaskAvailableController {
- private final TaskAvailableUseCase taskAvailableUseCase;
-
- public TaskAvailableController(TaskAvailableUseCase taskAvailableUseCase) {
- this.taskAvailableUseCase = taskAvailableUseCase;
- }
-
- @GetMapping(path="/newtask/{taskType}")
- public ResponseEntity retrieveTaskfromTaskList(@PathVariable("taskType") String taskType) {
-
- if (ExecutorType.contains(taskType.toUpperCase())) {
- TaskAvailableCommand command = new TaskAvailableCommand(
- ExecutorType.valueOf(taskType.toUpperCase()));
- CompletableFuture.runAsync(() -> taskAvailableUseCase.newTaskAvailable(command));
- }
-
- // Add the content type as a response header
- HttpHeaders responseHeaders = new HttpHeaders();
-
- return new ResponseEntity<>("OK", responseHeaders, HttpStatus.OK);
- }
-}
diff --git a/executor-humidity/src/main/java/ch/unisg/executorhumidity/executor/adapter/out/GetHumidityAdapter.java b/executor-humidity/src/main/java/ch/unisg/executorhumidity/executor/adapter/out/GetHumidityAdapter.java
deleted file mode 100644
index c73e356..0000000
--- a/executor-humidity/src/main/java/ch/unisg/executorhumidity/executor/adapter/out/GetHumidityAdapter.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package ch.unisg.executorhumidity.executor.adapter.out;
-
-import ch.unisg.executorhumidity.executor.application.port.out.GetHumidityPort;
-import ch.unisg.ics.interactions.wot.td.ThingDescription;
-import ch.unisg.ics.interactions.wot.td.affordances.Form;
-import ch.unisg.ics.interactions.wot.td.affordances.PropertyAffordance;
-import ch.unisg.ics.interactions.wot.td.clients.TDCoapRequest;
-import ch.unisg.ics.interactions.wot.td.clients.TDCoapResponse;
-import ch.unisg.ics.interactions.wot.td.io.TDGraphReader;
-import ch.unisg.ics.interactions.wot.td.schemas.ObjectSchema;
-import ch.unisg.ics.interactions.wot.td.vocabularies.TD;
-import org.eclipse.californium.core.CoapClient;
-import org.eclipse.californium.elements.exception.ConnectorException;
-import org.springframework.context.annotation.Primary;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.util.Map;
-import java.util.Optional;
-
-
-@Component
-@Primary
-public class GetHumidityAdapter implements GetHumidityPort {
-
- @Override
- public String getHumidity() {
-
- String endpoint = "https://api.interactions.ics.unisg.ch/search/searchEngine";
-
- String input = "@prefix dct: . select ?title where { ?title dct:title 'Mirogate' }";
-
- var httpRequest = HttpRequest.newBuilder()
- .uri(URI.create(endpoint))
- .header("Content-Type", "application/sparql-query")
- .POST(HttpRequest.BodyPublishers.ofString(input))
- .build();
-
- var client = HttpClient.newHttpClient();
-
- try {
- String description = client.send(httpRequest, HttpResponse.BodyHandlers.ofString()).body();
-
- // Parse a TD from a string
- ThingDescription td = TDGraphReader.readFromString(ThingDescription.TDFormat.RDF_TURTLE, description);
-
- Optional humidity = td.getPropertyByName("humidity");
-
- if (humidity.isPresent()) {
- Optional