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 build 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
This contest is going to implement web socket messages during open/close a problem in a SRM contest. You are expected to analyze the current arena applet, see what kinds of requests and responses are sending between arena applet and main listener. and port them properly for web socket listener.
General Approach
We'd like to make the web socket listener as a wrapper over the main listener, the main logic should be implemented inside the main listener, we will provide the winning submission for Module Assembly - TopCoder Competition Engine - Connecting Web Socket Listener and Main Listener for reference (provided in forum), the code is already checked in github repositories (https://github.com/cloudspokes/app/commit/c30c4115bb04f2861a94812f66e3d8b96d22f559).
Please check the https://github.com/cloudspokes/app/wiki/Connect-Web-Socket-Listener-to-Main-Listener as a base knowledge to connecting the web socket listener and main listener, and follow the same approach to implement, any improvement is welcome.
Please reuse existing functionality used in main listener as much as possible.
Multi-Messages After User Login
Currently, when user login through arena applet, a series of messages are sent from listener to arena applet, and the main screen of the arena applet will not be displayed after retreiving them all, you can see
The list of messages, are started with a StartSyncResponse, and ended with a EndSyncResponse.
We'd like process the multi-messages mode and demonstrate that in web arena.
Here are the responses need to be properly processed in the contest.
- com.topcoder.netCommon.contestantMessages.response.EndSyncResponse
- com.topcoder.netCommon.contestantMessages.response.StartSyncResponse
- com.topcoder.netCommon.contestantMessages.response.UserInfoResponse
- com.topcoder.netCommon.contestantMessages.response.RoundScheduleResponse
- com.topcoder.netCommon.contestantMessages.response.SyncTimeResponse
- com.topcoder.netCommon.contestantMessages.response.KeepAliveInitializationDataResponse
For each response, instead of return a string, you should return the JSON data format.
Active User HeartBeat
Currently, for web arena demo, the logon user will be kicked, because no heartbeat is sent to listener.
We'd like implement the heartbeat approach, to make the logon user not kicked.
The heartbeat ratio should be from KeepAliveInitializationDataResponse
- com.topcoder.netCommon.contestantMessages.request.KeepAliveRequest
- com.topcoder.netCommon.contestantMessages.response.KeepAliveResponse
Web Demo
In order to demonstrate your solution, you are expected to update the demo, to demonstrate similar use cases.
- multi-messages process, during the middle of multi-messsages processing, no other actions are allowed.
- print the sync time.
- keep alive cases, add an option in the demo to turn the heartbeat off, and demonstrate that by doing so the system will log the user out
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.