Skip to content

zhaokunl/NASA-AWS-WorkflowEstimator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SOC Fall 2014 NASA-AWS Project



Table of Contents

Demo site

http://einstein.sv.cmu.edu:9006

Dependencies

  • JDK 7

Technology Stack

  • Language: Java, html5

  • Web Server App: Play! Framework, REST API

  • Host: tmux

Usage

As a pre-requisite, you need to install mongodb and run it. Please find the installation guide here.

Git clone the repository and you're ready to run the app!

$ cd NASA-AWS-WorkflowEstimator

$ play clean start

This should fetch all the dependencies and start a Web Server listening on localhost:9000

[info] Loading project definition from /home/ubuntu/NASA-AWS-WorkflowEstimator-master/project
[info] Set current project to object-collection (in build file:/home/ubuntu/NASA-AWS-WorkflowEstimator-master/)
[info] Compiling 8 Scala sources and 1 Java source to /home/ubuntu/NASA-AWS-WorkflowEstimator-master/target/scala-2.10/classes...
(Starting server. Type Ctrl+D to exit logs, the server will remain in background)

Play server process ID is 26045
[info] application - ReactiveMongoPlugin starting...
[info] application - ReactiveMongoPlugin successfully started with db 'object-collection'! Servers:
		[localhost:27017]
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /0:0:0:0:0:0:0:0:9000

To specify a customized port:

For the production mode in Play 2.x - run

play "start -Dhttp.port=9006"

APIs

Currently we are providing APIs in 3 categores:

Category 1: Account Management

Category 2: Recommandation

Category 3: Registration

Detailed Usages:

####Account Management

  1. Log in

  2. Log in with authentication

  3. Account Summary

  4. Log out

####Recommodation

  1. Tutorial

  2. Get Estimation

    • Purpose: Run estimattion for the workflow.
    • Method: POST
    • URL: http://einstein.sv.cmu.edu:9006/estimator/1
    • Semantics: As a POST method, the API cannot be directly executed through a web browser. Instead, it may be executed through Rails, JQuery, Python, BASH, etc.
    • Sample Usages:
  3. Get Estimation Result

  4. Get Virtual Machine Recommendation

####Registration

  1. Show user register page

  2. Add a service user

    • Purpose: A new service user register estimation service.
    • Method: POST
    • URL: http://einstein.sv.cmu.edu:9006/estimator/register/publish
    • Semantics: As a POST method, the API cannot be directly executed through a web browser. Instead, it may be executed through Rails, JQuery, Python, BASH, etc.
      • userName (string, not null): Non existing unique user name
      • password (string, not null): password
      • firstName (string, optional): first name
      • lastName (string, optional): last name
      • middleName (string, optional): middle name
      • affiliation (string, optional): affiliation
      • email (string, optional): email
      • researchArea (string, optional): research area
      • goal (string, optional): goal
      • algo (string, optional): algo
      • budgetConcerns (string, optional): budget concerns
      • AWSFamilarity (string, optional): AWS familarity
    • Sample Usages:
      • Command Line Example:
        1. Prepare input service user data in a json file:
          • "contestUser.json" file contains: {"userName": "John", "password": "123", "firstName": "John"}
        2. curl -H "Content-Type: application/json" -d @user.json "http://einstein.sv.cmu.edu:9006/estimator/register/publish"
      • Result: HTTP 201 if the user has been successfully added to the database, HTTP 400 if the userName is already been used or register limit has been reached.
  3. Show user update page

  4. Update a service user

    • Purpose: Update a service user's information.
    • Method: POST
    • URL: http://einstein.sv.cmu.edu:9006/estimator/updateUser/update
    • Semantics: As a POST method, the API cannot be directly executed through a web browser. Instead, it may be executed through Rails, JQuery, Python, BASH, etc.
      • userName (string, not null): Non existing unique user name
      • password (string, not null): password
      • firstName (string, optional): first name
      • lastName (string, optional): last name
      • middleName (string, optional): middle name
      • affiliation (string, optional): affiliation
      • email (string, optional): email
      • researchArea (string, optional): research area
      • goal (string, optional): goal
      • algo (string, optional): algo
      • budgetConcerns (string, optional): budget concerns
      • AWSFamilarity (string, optional): AWS familarity
    • Sample Usages:
      • Command Line Example:
        1. Prepare input contest user data in a json file:
          • "contestUser.json" file contains: {"userName": "John", "password": "123", "firstName": "John", "lastName": "White"}
        2. curl -H "Content-Type: application/json" -d @user.json "http://einstein.sv.cmu.edu:9006/estimator/updateUser/update"
      • Result: HTTP 201 if the user has been successfully updated, HTTP 400 if the userName/password is wrong
  5. Show user delete page

  6. Delete a service user

  7. Get information of current usage summary and details

Support

Please contact Zhaokun Li, Xia Liu, Dong Chen

Professor Jia Zhang

About

SOC Fall 2014 NASA-AWS Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published