Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Project Overview

Currently, TopCoder Competition Engine used a customized way for communication between the client side (Arena applet) and the backend listeners. We are planning to implement a Web-based Arena based Web Socket protocol.

Previously, we have run contests to port all events of main listener to a standalone web socket listener, which provides a good solution by using the combination of socket.io (web client)  and netty.io (server side). 

We are continuing to support more features needed by the new Web-Based Arena.

Competition Task Overview

The challenge is going to update the backend logic for Web Socket Listener, to avoid return source code for challenge phase, instead of returning an image for the source code generated by calling the TC API.

This avoid saving a local copy of the challenged solution for testing. As for challenging phase, you are expected to directly understand the implementation, and challenge directly.

Suggested Approach

For this challenge, we are suggesting to do customized process for com.topcoder.netCommon.contestantMessages.response.OpenComponentResponse in the web socket listener.

  • Add a new field to com.topcoder.netCommon.contestantMessages.response.OpenComponentResponse for holding the image data.  it should be byte[] type, so the image data can be passed to Web Arena using JSON. it can be named like codeImg.
  • The codeImg field will be only set during the web socket listener, when the com.topcoder.netCommon.contestantMessages.response.OpenComponentResponse#editable field is set to com.topcoder.netCommon.contest.ContestConstants#VIEW_SOURCE, for this case, the code field will be reset to empty string, so the web arena client can not get the source code by sniffing the network.
  • For generating the source code image, you are expected to use Generate Source Code Image API, you can see the implementation here. Please make sure the ending point for TC API is configurable, so we can adapt for different environment. For Arena VM, the tc api is installed at api account, and the service is update, you can visit by http://tc.cloud.topcoder.com:8081/ after you setup your hosts file.
  • In order to avoid duplicate generating of source code image, please use cache to store the generated source code image, for caching usage, you can check com.topcoder.server.services.CoreServices class.
  • You are not required to make changes for web arena, but please demonstrate that, the image data do can be received by web arena, and the image data can be rendered properly as image in web page.

How to Test
In order to make your test easiler, you can create a SRM with a long time challenge phase, and during the coding phase, be sure to use different users to submit the solution.

Please be sure to test all five languages.

Web Demo

Or you are update the demo (provided in forum), to demonstrate similar use cases.

in order to prepare the data, you can use Arena applet to do other work.

Winner Responsibility

Winner will be responsible to create pull request in final fix phase, and help with the merge.

About Code Base

For the code under /home/apps/dev directory, some are hosted in internal svn repositories, some are hosted in private repositories in github.

You can check Source Code Management For TopCoder Competition Engine - TopCoder Wiki

For SVN Access, please send request to support@topcoder.com, For github access, please post your github account in forum to ask PM to grant you access.

Arena VM

Before asking your own VM, you need to have a public key on your profile before asking for the VM.

You can find more details on how to generate a key http://apps.topcoder.com/wiki/display/projects/Generate+SSH+Key and how to connect using it http://apps.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.

To use the Arena VM, please follow http://apps.topcoder.com/wiki/display/docs/Competition+Engine+VM+Setup

Currently, we moved several main projects to github, please check http://apps.topcoder.com/wiki/display/~fireice/Source+Code+Management+For+TopCoder+Competition+Engine

If you want to have local access to github, please create your own github account, and ask access in forum.



Final Submission Guidelines

Submission Deliverables

Below is an overview of the deliverables:

  • Code Changes for the solution, please include the svn revision and git commit hash
  • A complete and detailed deployment documented explaining how to deploy the application including configuration information.

Final Submission

For each member, the final submission should be uploaded to the Online Review Tool.

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30045033