Register
Submit a solution
The challenge is finished.

Challenge Overview

Background 

TopCoder is considering to refactor the TC Direct application by using RESTful APIs instead of calling various EJBs, 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 make the TC Direct to call the AWS API gateway instead.  This way we isolate the depenencies with TC Direct and EJB services, then we can move ahead quickly.

Scope

For this challenge, it is Proof Of Concept. We'd like to try out. You are expected to 

1. Sign up for AWS, there are free tiers to use for freshers.

2. Rampup yourself with AWS Lambda

3. Use Java to create a AWS Lambda Function to call the ProjectServiceFacade EJB in a common VM (info provided in forum), you just need to call the following method.

/**
 * <p>Creates a project with the given project data.</p>
 *
 * <p>Note, any user can create project and the project will associate with him/her.</p>
 * <p>
 * Update in v1.0.2: add parameter TCSubject which contains the security info for current user.
 * </p>
 * @param tcSubject TCSubject instance contains the login security info for the current user
 * @param projectData
 *            The project data to be created. Must not be null.
 *            The <code>ProjectData.name</code> must not be null/empty.
 *            The <code>ProjectData.projectId</code>, if any, is ignored.
 * @return The project as it was created, with the <code>ProjectData.projectId</code> and <code>ProjectData.userId
 *         </code> set. Will never be null.
 * @throws IllegalArgumentFault if the given <code>ProjectData</code> is illegal.
 * @throws PersistenceFault if a generic persistence error occurs.
 * @see ProjectService#createProject(ProjectData)
 */
ProjectData createProject(TCSubject tcSubject, ProjectData projectData) throws PersistenceFault, IllegalArgumentFault;

4. Please follow http://docs.aws.amazon.com/lambda/latest/dg/lambda-java-how-to-create-deployment-package.html to create the deployment package.

5. Deploy to the free tier of your account and make sure the functionality is working.

Reference

1. Competitors are not required to have separate VM for development, a common VM will be provided info, if you meet any problem with VM, please post in the corresponding thread.

2. In order to invoke the createProject method, there needs user auth info, to ease the AWS Lambda, you can mock the auth/idenity info for testing purpose.

3. the JNDI port for Jboss with TC Direct installed is 5001

4. the lookup name is remote/ProjectServiceFacadeBean



Final Submission Guidelines

  • AWS Deployment Package with the original source code
  • Deployment and Verfication Guide

ELIGIBLE EVENTS:

2016 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30053327