Challenge Overview

Background 

Topcoder is considering to refactor the TC Direct application by using RESTful APIs instead of calling various EJBs and directly contacting the underline database, which will allow us to begin decoupling TC Direct from its existing backend and provide exposure to some of its core services. As a first step, we want to avoid rewriting some of the complex business logic.

For the initial stage, we'd like to use AWS Lambda Function and AWS API Gateway to wrap around the EJB calls and database calls, and make the TC Direct to call the AWS API gateway instead.  This way we isolate the depenencies between TC Direct and EJB services/informix, then we can move ahead quickly.

Scope

Previously in we have launched severeal challenges like Proof Of Concept - AWS Lambda Function to Invoke Direct EJB Service etc, and sorted out the way to use AWS Lambda Function to wrap arround the EJB calls and  Database calls.

For this challenge, we'd like to follow the same approach to create AWS Lambda Function for add/remove resource. 

Requirements

1. We'd like to mimic the similar logic in Topcoder Direct and Online Review, please learn from the existing logic to implement properly.

2. There will be two aws lambda functions to be created, in the same codebase.

  • Add Resource
  • Remove Resource

3. For adding resource, we will validate resource terms of use and eligibility, check duplication, add the resource role, add timeline notification, set forum watch etc, Please check 

com.topcoder.service.facade.contest.ejb.ContestServiceFacadeBean.assignRole(TCSubject tcSubject, long projectId, long roleId, long userId, com.topcoder.project.phases.Phase phase,
        boolean addNotification, boolean addForumWatch,    boolean isStudio, boolean checkTerm)

4. For removing resource, it should be just reversed as adding resource.

5. Please create the swagger api doc for the created aws lambda functions, please following the example provided in forum.

6. Please use AWS lambda swagger https://github.com/awslabs/aws-apigateway-importer to create api gateway endpoint using the created swagger api doc, and hook it with the aws lambda function

7. The json response should be simple and clear.

Reference

1. Competitors need to request your own VM for development and testing.

2. For testing the getting general project info operation,  you can directly create in Topcoder Direct for testing purpose.

3. You can visit http://<<vm-ip>>:8580/ to find the JNDI lookup name for remote EJB calls.

4. Please reuse any components in TC Direct instead of creating your own if possible. 

5. The previous challenges will be provided in forum for reference.

VM ENVIRONMENT

If you need a Topcoder VM to work on this challenge, Please request the VM in the challenge forum.

Information about VM can be found below:

VM specific information is found here: http://www.topcoder.com/wiki/display/docs/VM+Image+2.5 and https://github.com/appirio-tech/direct-app/blob/dev/README.md

Upon registration as a submitter or reviewer you will need to request a VM based on the new TopCoder Cockpit/Direct image. To request your image, please use the forum. Before requesting your VM, you need to ensure that you have an SSH key created and in your member profile. Instructions to do so are here: http://www.topcoder.com/wiki/display/projects/Generate+SSH+Key, and instructions to connect afterwards are here:http://www.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.

 

 



Final Submission Guidelines

  • Complete source code for aws lambda function
  • Working VM and aws lambda function for testing
  • Deployment Guide and Verification Documentation

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30053663