Get Started

Learn how to use the replication package.

Requirements

Java 8 or later and Maven 3.

Installation

Clone the replication package from Github and build everything.

                     
                       git clone https://github.com/sosygroup/synthesis-context-aware-choreographies.git synthesis-context-aware-choreographies
                       cd synthesis-context-aware-choreographies
                       mvn clean install
                     
                  

Deployment and Enactment

Setup your target nodes

Install on your (virtual) machine(s) one or more servlet containers (e.g., Apache Tomcat). Be sure that each servlet container is accessibile from the network.

Deploy provider and prosumer services

The folder participant-services contains the set of business services and clients.

Folder Description
consumers Contains the Early Warning System and Drone artifacts. They are the two consumer participants of the choreography.
prosumers Contains the artifacts of the prosumer participants of the choreography. After running mvn install from the root of the repository, a war folder containing all the compiled services is created. Deploy these services where you want.
providers Contains the artifacts of the provider participants of the choreography. After running mvn install from the root of the repository, a war folder containing all the compiled services is created. Deploy these services where you want.

Deploy Context Evaluator

The folder contextevaluator contains the Context Evaluator service. After running mvn install from the root of the repository, a war file is created into the folder. Deploy the service where you want.

Deploy Coordination Delegates

The folder coordinationdelegates contains the CDs and the eCD. Deploy the CDs and the eCD on an orchestrator engine for WS-BPEL like Apache Ode.

After that your orchestrator engine has been deployment, make sure to add the sia-endpoints-manager.jar file, contained in the sia-endpoints-manager folder, in the library of the orchestrator engine. If you are using Apache Ode, simply copy it into WEB-INF/lib/ folder of your Apache Ode webapp deploymeny directory.


Execution and Monitoring

Set Invocation Address

In order to le the system know the deployment location of each service, it is needed to configure and run the application located in sia-endpoints-client folder.

After having deployed the providers, prosumers, Context Evaluator, CDs, and eCD, edit the endpoints.properties file contained into sia-endpoints-client/src/main/resources directory. It is sufficient to change the host address and the port of the servlet container of each service.

Execute mvn clean compile to apply changes and then mvn exec:java to run.

A default deployment schema is provided if you want to avoid to perform this step:

Service Default host:port
All prosumer and provider services localhost:9080
CDs and eCD localhost:8080
Context Evaluator localhost:9080

Run the Choreography

The participant that starts a new choreography instance is earlywarningsystem.

Before running the application, edit the file application.properties contained into participant-services/consumers/earlywaringsystem/src/main/resources, by setting the location of the deployed CDs, if needed. You can also set the simulated earthquake duration and the number of instances to run sequentially.

Execute mvn clean compile to apply changes and then mvn exec:java to run the choreography.

Simulate Drones

If simulated context conditions enable variants V1 or V2, you can use drone application to simulate the interaction of the choreography with drones after that the choreography instance has been started.

Before running the application, edit the file endpoints.properties contained into participant-services/consumers/drone/src/main/resources, by setting the location of the dronefleetcontroller service and of cdDrone, if needed.

Execute mvn clean compile to apply changes and then mvn exec:java to start the simulation.

View the Civl Protection dashboard

According to the deployment address of the service civilprotection, the dashboard is available at http://[host]:[port]/civilprotection/docs/dashboard.html. The default host and port are localhost:9080.

View the Monitor

The folder monitor contains the monitor service that allows to check the timeline of all the choreography instances that have been executed.

Before running the application, edit the file application.properties contained into monitor/src/main/main/resources, by setting the monitor.port property for the port of the monitor service, and the monitor.services.baseUrl properties for the host and port of provider and prosumer services.

Execute mvn clean compile to apply changes and then mvn spring-boot:run to run the monitor service.

According to the selected port, the service is available at http://localhost:[port]/monitor/.