From fca338b4c2566edba2a0f56d2015e60adfc3af94 Mon Sep 17 00:00:00 2001 From: Jan Benscheid Date: Thu, 28 Jun 2018 17:40:35 +0200 Subject: [PATCH 1/3] Setup guide --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index be4df5c..1138a24 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,8 @@ This suite of microservices forms the backend of the Distributed Noracle Project Please try out our app at: [dbis.rwth-aachen.de/noracle/](http://dbis.rwth-aachen.de/noracle/) --------------- + +## Setup +1. Build the project using `ant all` +1. Copy *launcher-configuration.ini* to *etc/* +1. Start using `./start-local.sh` for starting in the same shell (useful for testing), or `./start-node.sh` for starting Noracle in a screen (useful for production) From d5afa3f13f89d0dd350bc080b736458dab23b720 Mon Sep 17 00:00:00 2001 From: AlexanderNeumann Date: Mon, 9 Jul 2018 15:33:45 +0200 Subject: [PATCH 2/3] local comit --- build.xml | 4 ++-- launcher-configuration.ini | 3 ++- .../services/noracleService/NoracleService.java | 11 +++++++++-- .../resources/QuestionVotesResource.java | 3 ++- .../noracleService/resources/QuestionsResource.java | 3 +++ 5 files changed, 18 insertions(+), 6 deletions(-) diff --git a/build.xml b/build.xml index f61b544..aa477d2 100644 --- a/build.xml +++ b/build.xml @@ -1,10 +1,10 @@ - + - + diff --git a/launcher-configuration.ini b/launcher-configuration.ini index 7c13017..ff41289 100644 --- a/launcher-configuration.ini +++ b/launcher-configuration.ini @@ -1,8 +1,9 @@ port = 9081 storageMode = MEMORY -useMonitoringObserver = false +useMonitoringObserver = true [bootstrap] +137-016.eduroam.rwth-aachen.de:9009 [serviceDirectories] service diff --git a/src/main/i5/las2peer/services/noracleService/NoracleService.java b/src/main/i5/las2peer/services/noracleService/NoracleService.java index a7b1c8d..2713def 100644 --- a/src/main/i5/las2peer/services/noracleService/NoracleService.java +++ b/src/main/i5/las2peer/services/noracleService/NoracleService.java @@ -14,12 +14,19 @@ import io.swagger.annotations.SwaggerDefinition; @Api -@SwaggerDefinition(info = @Info(title = "Noracle Service", version = NoracleService.API_VERSION, description = "A bundle service for the distributed Noracle system", license = @License(name = "BSD-3", url = "https://github.com/Distributed-Noracle/Distributed-Noracle-Backend/blob/master/LICENSE.txt"))) +@SwaggerDefinition( + info = @Info( + title = "Noracle Service", + version = NoracleService.API_VERSION, + description = "A bundle service for the distributed Noracle system", + license = @License( + name = "BSD-3", + url = "https://github.com/Distributed-Noracle/Distributed-Noracle-Backend/blob/master/LICENSE.txt"))) @ServicePath("/" + NoracleService.RESOURCE_NAME) public class NoracleService extends RESTService { public static final String RESOURCE_NAME = "distributed-noracle"; - public static final String API_VERSION = "0.6"; + public static final String API_VERSION = "0.7"; @Override protected void initResources() { diff --git a/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java b/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java index 1d8edf8..9585082 100644 --- a/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java +++ b/src/main/i5/las2peer/services/noracleService/resources/QuestionVotesResource.java @@ -72,7 +72,8 @@ public Vote putSetQuestionVote(@PathParam("spaceId") String spaceId, @PathParam( obj.put("spaceId", spaceId); obj.put("qId", questionId); - obj.put("functionName", "putSetVote"); + obj.put("functionName", "putSetQuestionVote"); + obj.put("serviceAlias", "distributed-noracle"); obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier()); attributes.put("spaceId", spaceId); attributes.put("qId", questionId); diff --git a/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java b/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java index 07e5aa2..55163ea 100644 --- a/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java +++ b/src/main/i5/las2peer/services/noracleService/resources/QuestionsResource.java @@ -78,9 +78,11 @@ public Response createQuestion(@PathParam("spaceId") String questionSpaceId, @Ap JSONObject obj = new JSONObject(); JSONObject attributes = new JSONObject(); obj.put("functionName", "createQuestion"); + obj.put("serviceAlias", "distributed-noracle"); obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier()); obj.put("qid", question.getQuestionId()); attributes.put("spaceId", questionSpaceId); + attributes.put("userId", Context.getCurrent().getMainAgent().getIdentifier()); attributes.put("body", p.parse(createRelationPojoJson)); attributes.put("result", question.getQuestionId()); obj.put("attributes", attributes); @@ -125,6 +127,7 @@ public Response createRelatedQuestion(@PathParam("spaceId") String questionSpace JSONObject obj = new JSONObject(); JSONObject attributes = new JSONObject(); obj.put("functionName", "createQuestion"); + obj.put("serviceAlias", "distributed-noracle"); obj.put("uid", Context.getCurrent().getMainAgent().getIdentifier()); obj.put("qid", question.getQuestionId()); attributes.put("spaceId", questionSpaceId); From d37af0f6e0868b3886021be9057ca60ef5e16e37 Mon Sep 17 00:00:00 2001 From: AlexanderNeumann Date: Thu, 19 Jul 2018 10:26:18 +0200 Subject: [PATCH 3/3] cleanup --- launcher-configuration.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/launcher-configuration.ini b/launcher-configuration.ini index 5afaadb..3be6ecf 100644 --- a/launcher-configuration.ini +++ b/launcher-configuration.ini @@ -1,9 +1,8 @@ port = 9081 storageMode = MEMORY -useMonitoringObserver = true +useMonitoringObserver = false [bootstrap] -137-016.eduroam.rwth-aachen.de:9009 [serviceDirectories] service