http://einstein.sv.cmu.edu:9006
- JDK 7
-
Language: Java, html5
-
Web Server App: Play! Framework, REST API
-
Host: tmux
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"
Currently we are providing APIs in 3 categores:
Category 1: Account Management
Category 2: Recommandation
Category 3: Registration
- Show user register page
- Add a service user
- Show user update page
- Update a service user
- Show user delete page
- Delete a service user
- Get information of current usage summary and details
Detailed Usages:
####Account Management
-
- Purpose: Log into the website with username and password.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/login
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/login
- Result: HTTP 200 if the logged in successfully posted, HTTP 500 if failed.
-
- Purpose: Log into the website with authentication.
- Method: POST
- URL: http://einstein.sv.cmu.edu:9006/estimator/login?username=<"username">&password=<"password">
- Semantics:
- username: Existing user name.
- password: Password of the user.
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/login?username=<"username">&password=<"password">
- Result: HTTP 200 if the logged in successfully posted, HTTP 500 if failed.
-
- Purpose: Provide a summary of the account.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/accountSummary?userName=<"username">
- Semantics:
- username: Existing user name.
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/accountSummary?userName=
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
-
- Purpose: Log out from the website.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/logout
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/logout
- Result: HTTP 200 if the logged out successfully, HTTP 500 if failed.
####Recommodation
-
- Purpose: Provide a turorial video about how to connect the vistrails workflow to the Einstein Website.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/tutorial
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/tutorial
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
-
- 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:
-
- Purpose: Get the result of workflow estimation
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/2
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/2
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
-
Get Virtual Machine Recommendation
- Purpose: Get the information of recommended virtual machine for workflow execution
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/3
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/3
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
####Registration
-
- Purpose: Show user register page.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/register
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/tutorial
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
-
- 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:
- Prepare input service user data in a json file:
- "contestUser.json" file contains: {"userName": "John", "password": "123", "firstName": "John"}
- curl -H "Content-Type: application/json" -d @user.json "http://einstein.sv.cmu.edu:9006/estimator/register/publish"
- Prepare input service user data in a json file:
- 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.
- Command Line Example:
-
- Purpose: Show user update page.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/updateUser
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/updateUser
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
-
- 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:
- Prepare input contest user data in a json file:
- "contestUser.json" file contains: {"userName": "John", "password": "123", "firstName": "John", "lastName": "White"}
- curl -H "Content-Type: application/json" -d @user.json "http://einstein.sv.cmu.edu:9006/estimator/updateUser/update"
- Prepare input contest user data in a json file:
- Result: HTTP 201 if the user has been successfully updated, HTTP 400 if the userName/password is wrong
- Command Line Example:
-
- Purpose: Show user delete page.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/deleteUser
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/deleteUser
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
-
- Purpose: Delete a service user.
- Method: DELETE
- URL: http://einstein.sv.cmu.edu:9006/estimator/deleteUser/delete<"userName">/<"password">
- Semantics
- userName (string, not null): Service user name
- password (string, not null): Password
- Sample Usages:
- Command Line Example:
- Result: HTTP 201 if the contest user has been successfully deleted
-
Get information of current usage summary and details
- Purpose: Get information of current usage summary and details.
- Method: GET
- URL: http://einstein.sv.cmu.edu:9006/estimator/adminPage">
- Sample Usages:
- Command Line Example: curl http://einstein.sv.cmu.edu:9006/estimator/adminPage
- Result: HTTP 200 if returned successfully, HTTP 404 if not found.
Please contact Zhaokun Li, Xia Liu, Dong Chen
Professor Jia Zhang