Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Context

Project Context

Ubahn is an employee management system to determine employees that are no longer working on active projects and to understand their qualifications and expertise for suitability in other projects

 

Challenge Context

Store user’s group information in the Ubahn database itself instead of using the groups api

 

Expected Outcome

We should no longer be calling the groups api to get group information for a user. This information should be available within the Ubahn database itself.

 

Challenge Details

Technology Stack

  • Nodejs version 12

  • Elasticsearch version 7.x

 

Development Assets

Two code bases are involved here

  • You can find the API code base here. Ensure that you are using the “develop” branch.

  • You can find the Elasticsearch processor code base here. Ensure that you are using the “develop” branch.

 

Individual requirement

Requirement 1 - Update Elasticsearch Processor (Major Requirement)

  • Currently, the existing elasticsearch processor listens only to events related to ubahn data topics.

  • The processor needs to now also listen to the groups.notification.member.add and groups.notification.member.delete topics too.

  • When a user is added to a group, a message will arrive in groups.notification.member.add.

    • The format of the message will be shared in the contest forum

    • In the message, you will have information about the group name, the group id and the user id. Note that the ubahn user id will be present as universalUID attribute in the message.

    • Update the elasticsearch database to associate the user with the group. Use the user id (universalUID) to identify the user and store the group id and group name for that user in Elasticsearch

  • When a user is removed from a group, a message will arrive in groups.notification.member.delete.

    • The format of the message will be shared in the contest forum

    • In the message, you will have information about the group id and the user id (universalUID attribute).

    • Update the elasticsearch database to remove the association of the user with the group.

 

Requirement 2 - Update API (Major Requirement)

  • Right now, the Ubahn API retrieves the details of the groups associated with a user from the group api. Relevant code here.

  • Remove this code.

  • The groups data for the user will now exist in the ubahn api’s own elasticsearch database (same as the one used by the elasticsearch processor above).

  • Thus, instead of calling the api, the groups data will now be read from elasticsearch itself and passed along with the other data in the response.

  • Note that the API also interfaces with Amazon QLDB database. The groups data will NOT be stored in this database. Only elasticsearch will have information about the groups associated with the user.

 

Important Notes

  • Use standard for your lint tool

  • Use the async await pattern

  • For the API, tests are not needed. For the processor, update existing tests and fix any issues with current tests (Minor Requirement)

  • You will have to update the elasticsearch index creation script to accommodate groups, as needed.

 

Deployment guide and validation document

Update the deployment guide as needed.

 

Scorecard Aid

Judging Criteria

  • Against each requirement, we have identified Major and minor requirements.

  • Reviewers will use the respective sections in the scorecard, depending on the type of requirement.



Final Submission Guidelines

You need to submit a zip file containing the git patch of the changes made, which will be applied to the “develop” branch. Submit two git patch files - one for the api and one for the processor. This is the recommended approach. However, if you face issues generating the patch, you can upload the entire code base too in the zip file. As much as possible, please upload ONLY the patch files.

 

ELIGIBLE EVENTS:

2021 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30141547