Challenge Overview
Challenge Objectives
-
Handle updates to submission event
-
Handle review and review summation creation event
Project Background
-
Legacy submission processor is an existing app that we are looking at rewriting
-
It consists of three modules / repositories:
-
The processor would essentially update the details of a submission in an Informix database, which is used by other processors elsewhere
-
After the update, it would then update the submission details in our submission api
-
This project aims to bring together all three repositories into a single repository with changes made in the workflow
Technology Stack
-
Nodejs version 10
-
Kafka version 2
Code access
You can find the code base here. Kindly use the develop branch as the base code for your changes.
Individual requirements
Handle updates to submission event (Major Requirement)
-
The processor currently only works messages related to submissions creation. For this contest, you will have to update the processor to work with messages related to submission update (message.payload.resource === “submission”) and the original topic of the message is “submission.notification.update” (message.payload.originalTopic === “submission.notification.update”)
-
Here, you need to get the legacySubmissionId for that submission (because in Informix database, this is the key for a submission). You will find this either in the payload itself, or you will have to query the submission api for details about the submission and use the legacySubmissionId received in the process.
-
Once you have that info, you will proceed to update the url for the submission using the legacySubmissionId as the query key in the Informix database
Handle review and review summation creation event (Major Requirement)
-
The processor needs to be updated to handle review and review summation creation events.
-
W.r.t creation of review event:
-
Only reviews that relate to provisional test scores need to be considered
-
Only reviews that are NOT of type Anti Virus scan need to be considered
-
Ensure that all fields that are needed for the process exist
-
And finally, update the provisional score in Informix database
-
-
W.r.t creation of review summation event:
-
Ensure that all fields that are needed for the process exist
-
And finally, update the final score in the Informix database
-
Note. The instructions above are what your solution needs to do. We have provided references to the current code as well, where applicable. However, you will NOT follow every step of the current code (because we are skipping / changing the workflow slightly). Thus, it is important that you follow only those instructions mentioned above and NOT carry out everything from the existing code base. (Example - current code determines the contest type, it also determines if multiple submissions for the same contest are allowed or not and other tasks - which are NOT part of the tasks for this contest). Please only provide the tasks as described in the above steps.
Deployment guide and validation document
Update the deployment guide and validation document present in the source code as necessary for this contest, based on the changes made
Important Notes
-
Follow existing conventions used in the source code provided
-
Use standard library as your linter. Ensure there are no lint errors.
-
Tests are in scope. Use mocha and chai for your tests. Provide both unit and e2e tests with a code coverage more than 80%
-
For your submission, we expect a single app and not multiple apps. The interaction with Informix database as well as with kafka - both will be part of the same codebase.
-
Again - you will NOT provide the same workflow as present in the current codebase(s). Stick to the tasks as defined in the specification
Final Submission Guidelines
Zip your solution and upload it to Topcoder