PoC Assembly - TC Web Arena - LoginResponse sendEvent problem fix and upgrade netty-socketio library

Register
Submit a solution
The challenge is finished.

Challenge Overview

Project Overview

TopCoder is implementing a Web-based Arena by using Web Socket protocol, AngularJS Framework (http://angularjs.orghttp://docs.angularjs.org/guide) and Bootstrap 3 (http://getbootstrap.com/getting-started).

The frontend application is using AngularJS Framework (http://angularjs.orghttp://docs.angularjs.org/guide) and Bootstrap 3 (http://getbootstrap.com/getting-started), and using web socket protocol to exchange data with backend web socket listener.

The backend web socket listener is ready for exchanging messages over web socket protocol.

Competition Task Overview

Previously, we have done a generally porting for the original requests and responses to web socket listener. Based on the logs, all requests and responses can be properly passed between main listener and web socket listener.

but for some situation, like the responses contains some binary data type (byte[] or else), the responses can be reached to the web socket listener from main listener, but can not send over to the web client.

For this contest, we are going to investigate the reasons and see the possibility to fix that or not.

Sending Binary Data

A known situation for this case is LoginResponse, Currently, when user logs in through web arena demo,  a series of responses can be recieved (see logs in web arena demo), except the LoginResponse.

Based on the previously investigation, it seems related to SealedSerializable  which contains binary data type.

If we null this field before sending over to the web arena demo, the response can be properly received.

this is what we current hacked for continuing development.

                if (response instanceof LoginResponse) {
                    client.sendEvent(response.getClass().getSimpleName(), new LoginResponse(((LoginResponse)response).getSuccess(), ((LoginResponse)response).getConnectionID(), null));
                } else {
                    // Pass responses directly.
                    client.sendEvent(response.getClass().getSimpleName(), response);
                }
 
For this contest, we'd like to investigate the root cause of this problem by providing clear evidence, and see the possibility to fix that.
1. does netty not support to send binary data?
2. or it is a problem of netty-socket.io 1.5.0 problem?
3. if it is a problem of netty or netty-socket.io, please suggest if we can ask the project team to fix that?
 
Upgrade netty-socketio to 1.6.4

Currently, we are using netty-socketio 1.5.0 in our TopCoder Competition Engine in order to implement web socket listener for web arena.

see https://github.com/cloudspokes/app/blob/master/ivy.xml#L19

       <dependency org="com.corundumstudio.socketio" name="netty-socketio" rev="1.5.0" />

but if you check https://github.com/mrniko/netty-socketio, the most recently stable version is 1.6.4, which uses a higher version of netty.

Based on the previous try, it can not be simply upgraded to use 1.6.4.

For this contest, we'd like to see how to upgrade it, and see if the newer version can fix the binary data serialization problem.

and also verify that the web arena demo is still working for all cases.

How to Setup

A deployment guide will be attached in forum to how to setup the Arena VM and use the web arena demo, beside the web arena demo.

Local Setup

If you want to have a better way for debugging the problems, you can setup your own local environment, please check https://github.com/cloudspokes/app/wiki/TopCoder-Competition-Engine-Setup-on-CentOS-6.x-x64

Winner Responsibility

Winner will be responsible to create a pull request in final fix phase for merging.

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 document 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:

2014 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30042361