Skip to content

hanwiz/shado-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

213 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHADO-server

Shado backend service

SHADO-server web service is built on Java Spring Boot. Spring Boot Tutorial: https://spring.io/guides/gs/spring-boot/

Build the project locally

To Run the Simulation locally, Go to DataWrapper.java, GreetingController.java and comment out all remote server paths, uncomment local paths and change the local path to your current directory. (The DataWrapper.java is under "shado-server/core/server/src/main/java/server/Output" folder. The GreetingController.java is under "shado-server/core/server/src/main/java/server" folder.)

   //String summary_file_name =   "/home/rapiduser/shado-server/core/server/out/Summary/" + "Workload_Summary.csv"; 
   String summary_file_name =   localSummary + "Workload_Summary.csv";

After switching to the local file path, use the following command to build the project.

 ./mvnw spring-boot:run

Make sure you are in this directory: **shado-server/core/server/ **

Deploy the service

To Deploy the service in a server. You should use systemd to let the program run in the background.

Use:

./mvnw package

to get a .jar runnable and clone/pull the repo in to the server.

Check out the tutorial here: https://spring.io/blog/2014/03/07/deploying-spring-boot-applications to setup the systemd service. Finally, use the following command to start the service.

sudo systemctl restart shado_server.service

Test the SHADO-server

There is a website that can be used to interact with this server running backend. Here is the link: https://shado-av.github.io/shado-webdev/

If you prefer to use your own JSON file as input, please go to this website: http://apps.hal.pratt.duke.edu/shado-webdev/sim-test.html. In this website, you can use the "Choose File" button to upload your own JSON input, then hit the "Run Simulation" button to run the server. A few result download options will appear after the simulation success. If you want a more compact utilization report, please use this link to download it: http://apps.hal.pratt.duke.edu:8080/shado/validation

If you are more comfortable with command line: Try:

curl -H POST http://localhost:8080/shado/runShado -d @shadovar.json \
--header "Content-Type: application/json"

(Remember to substitue the "localhost to your server's URL) To post and you can see the message and session number returned by the server.

Project Structure

Here is a simple layout of SHADO server-side simulation alt text

About

Shado backend service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 38.6%
  • Java 31.8%
  • JavaScript 27.3%
  • CSS 2.3%