Challenge Overview

  • Create a Kafka processor to CUD (Create / Update / Delete) data in legacy Informix database based on the events received in Kafka bus.

Project background

  • Topcoder is streamlining its APIs and in this project we will be upgrading the existing Project API to V5 standards

  • Project API powers Topcoder connect, Topcoder Challenge V5 API and supplies data for Direct as well

Technology Stack

  • Node.js 8.11.x

  • Kafka

  • Informix

  • Docker & Docker-compose

Challenge Assets

  • You could check out Legacy member processor for reference. Please note that the codebase shared is just for reference and the requirements for this processor will vary from the reference processor.

  • Source code of Project API can be found here. Please make sure to check `v5-upgrade` branch.

  • Source code of Direct Project API (which is currently handling backfilling data in Informix) is provided in the challenge forum which will be accessible after registration.

Individual Requirements

Create Kafka Consumer

  • Create a Kafka Group Consumer and make it listen to 3 configurable topics

    • project.notification.create

    • project.notification.update

    • project.notifcation.delete

  • Kafka consumer should support connecting to ES hosted in AWS as well.

  • Please refer this thread to learn more about the structure of Kafka message that will be used by this processor

  • Only following messages are in scope, remaining messages need to be ignored

    • Message 1 - Topic - ‘project.notification.create’, Resource - ‘project’

    • Message 2 - Topic - ‘project.notification.create’, Resource - ‘project.member’ 

    • Message 3 - Topic - ‘project.notification.update, Resource - ‘project’

    • Message 4 - Topic - ‘project.notification.delete, Resource - ‘project.member’

Informix Processing logic

  • Please refer the existing Direct Project API calls from Project API and source code of Direct Project API

  • Implement code for below scenarios based on the Kafka messages listed above

    • Create new project (Message 1)

    • Add Copilot to the project (Message 2)

    • Add Manager to the project (Message 2)

    • Update billing account of the existing project (Message 3)

    • Remove Copilot from the project (Message 4)

    • Remove Manager from the project (Message 4)

Docker based deployment

  • Please follow the docker based deployment approach followed in the reference processor

Tests with coverage report

  • You would need to create E2E tests for this processor. If there is a piece of code which can’t be tested by E2E tests, you could create unit tests for those piece of code and execute it as part of E2E tests itself.

  • Ideally the code coverage is expected to be 100% for all files except logger. If there is difficulty in achieving it, please discuss the same in forum. 

  • We expect that the tests should be robust enough to capture bugs in future development

  • Use Mocha and Chai for testing and Istanbul for code coverage report

  • Use Sinon for mocking if there is a need to mock any scenario

  • Use the commands `npm run test` for running E2E tests and `npm run test:cov` for running E2E tests with code coverage report

Deployment document

  • You may reuse the deployment document from the reference processor but please make sure to update the content according to the requirements of this processor and clean up the unnecessary contents.

Validation document

  • Please create a brief validation document to verify the legacy project processor created as part of this challenge.

Important Notes:

  • Use Async / Await pattern in the codebase

  • Please try to reuse the code as much as you can instead of creating redundant code for processing similar messages.

  • Ensure that there are no lint errors and every test pass.

  • Clean up the unnecessary code before submitting

  • If you have any doubts, Please feel free to post it in the forum. We will be happy to resolve your queries as soon as possible.



Final Submission Guidelines

  • Zip your codebase with validation document and submit the zip file using the submit link in the challenge.

  • After submitting, please ensure that you are able to download your submission from Online Review

ELIGIBLE EVENTS:

Topcoder Open 2019

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30094407