Key Information

Register
Submit
The challenge is finished.

Challenge Overview

For the Hercules client, we are going to be doing some work that involves a couple of their drawing technologies, name "pxCore" and "pxScene".  The links below offer a lot more details on these particular technologies.  pxCore is a C++ graphics library that is used on a wide variety of embedded devices that the client distributes.  pxscene is a wrapper application around pxCore that exposes the drawing APIs to Javascript through Node and V8.


The client is concerned that Node and V8 are too "heavy" for their low-powered embedded devices.  To this end, we have been working at integrating duktape (http://duktape.org/) into pxScene, replacing Node. This has gone well.

Pxscene


Pxscene is a platform independent drawing platform / app that will be used on a wide variety of embedded devices for the Hercules client.  You can find more information here, and you can download the app to be used for testing: http://www.pxscene.org/

The code for pxCore / pxscene is available in Github here:

Build instructions can be found here:  https://github.com/pxscene/pxCore/blob/master/examples/pxScene2d/README.md

Step-by-step instructions to build the existing duktape integration on Ubuntu 16.04 can be found here:

https://github.com/topcoderinc/pxCore/blob/duktape_proof_of_concept/step-by-step-duktape-linux-build.md���

-DUSE_DUKTAPE is deprecated (not used)....  Instead, we added two new cmake switches SUPPORT_NODE and SUPPORT_DUKTAPE.  Both are enabled by default.  The app now looks for a file called .sparkUseDuktape in the home directory to enable duktape.

You can validate the engine used through the "about.js" example (just type "about.js" in the address bar of pxScene).  It will list the engine - either Node or duktape.
Requirements

For this challenge, we are going to create some patch files against an existing branch to port over recent changes we have made to the app, including:

* Updating duktape from 1.5 to 2.2
* Fixing some memory leaks
* Using the duktape proxy object
* Adding in websocket support

We have existing pull requests for this functionality against the "master" upstream branch.  The problem is that the client made changes in parallel to our effort to a new branch.  We now need to port over our pull requests and changes to use this new branch, as opposed to "master"

The complexity lies in the fact that the changes the client made include the changes to duktape, but in a different structure than what we did already.

We have to:

* Ensure the new changes are correct
* Port over our changes to use this new branch

Deliverables

The deliverables will be patch files against the "_duktape2" branch of this repo: 
https://github.com/pxscene/pxCore.  You can find the branch here:  https://github.com/pxscene/pxCore/tree/_duktape2

Have a look in examples/pxScene2d/external.  Note that the original dukluv folder exists, and there is a new dukluv2 folder.  One goal of the client is to keep patches to the bare minimum possible.  This will be covered below as well.  The client added the dukluv2 folder because they didn't like overwriting the existing dukluv folder as it generated too many changes to review properly.

For this challenge, you will need to generate 4 individual patch files, all targeting _duktape2.  Each patch file should be self-contained, not relying on any other patches.  We want to do this to ensure that the changes can be committed individually and at different times, as the client has a chance to review the changes.

Patch 1:  Patch file 1 should include any additional updates needed to support duktape / dukluv 2.2.  This is partly a review of the existing integration, to ensure the client didn't miss anything in their updates for the later version of duktape.

Patch 2:  Patch file 2 should include updates to the _duktape2 branch for the fixes in this pull request, fixing some memory leaks:  
https://github.com/pxscene/pxCore/pull/818

Patch 3:  Patch file 3 should include the updates to the _duktape2 branch for the duktape proxy objects changes we made.  Note that the _duktape2 branch may already contain some fixes here.  We want to also review the client's code and compare it to our changes to make sure their changes are correct.  https://github.com/pxscene/pxCore/pull/820

Patch 4:  Patch file 4 should include all the necessary changes for websocket support in the duktape integration.  This is also contained in this pull request:  https://github.com/pxscene/pxCore/pull/841

Documentation

In addition to your patch files, please include documentation on how to deploy the patch files and validate the changes.

Review Goals

For review, we want reviewers to explicitly check that the patch files are the bare minimum possible.  This means that the patch files should be as lean as possible.  We don't want changes for:

* Whitespace
* Brackets or tab alignment, or any other "structural" change
* Anything not related to the explicit requirements of a given patch

The client goes line-by-line to review each and every patch, so anything that's not quite right in a given patch raises all sorts of questions.

At the end of this challenge, the copilot will take the patch files and update the existing pull requests with branches based on _duktape2 with the changes from each patch file submitted.
 

Submission

For this challenge, please submit:

1.  Patch files against the _duktape2 branch in Github (commit hash f64a5b192e7bd5ebda2e7ac79fc84982b328b259 or later)  
2.  Basic deployment guide
 
No video is required for this challenge, but you must submit clear validation documentation 


Final Submission Guidelines

Please see above

ELIGIBLE EVENTS:

2018 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30063046