Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Challenge Objectives

  • Integrate ElasticSearch in our existing api

  • Implement pagination

  • Implement a health check endpoint

  • Update tests and add new tests

 

Project Background

The lookup api aims to provide an api to be used across Topcoder’s front end apps that provide a consistent set of results for actions such as looking up countries, educational institutions and others.

 

Technology Stack

  • Nodejs version 10

  • Elasticsearch version 7

 

Code access

You can find the existing code here. Use the develop branch as your base branch

 

Individual requirements

Integrate ElasticSearch in our existing api (Major Requirement)

  • Currently, the api uses DynamoDB as its database.

  • Keeping the existing database, proceed to integrate Elasticsearch into the api.

  • Here is how it will work:

    • When a new record is created or updated, we will first carry out the action in Dynamodb, as we do currently. Once that is successful, we proceed to create the record in Elasticsearch.

    • When an existing record is updated or deleted, we will first carry out the action in Elasticsearch. Once that is successful, we proceed to update / delete the record in Dynamodb.

    • When an api client attempts to read data (fetch all records, fetch a specific record, search for records), we will fetch the data from Elasticsearch. If it is not found in Elasticsearch, we will proceed to read from Dynamodb as we do currently.

  • Use the same schema as defined currently for the existing resources in Elasticsearch too.

Implement Pagination (Major Requirement)

  • Currently, the api defines pagination parameters in the swagger specification only. It has not been implemented in the code.

  • Update the code to support pagination for the relevant endpoints, using the definition defined in swagger (you can find it in the docs folder).

  • Pagination parameters will only be supported by Elasticsearch. They will be ignored (as we do currently) when working with Dynamodb.

Implement a health check endpoint (Minor Requirement)

  • Implement a health check endpoint, that exists for all of Topcoder’s services. It responds with the health status for the app.

  • Check out the one present on submission api that you can use as reference (only for the health check).

 

Deployment guide and validation document

Update the deployment guide as needed for this contest. No verification document necessary.

 

Important Notes

  • Follow existing conventions used in the app

  • Please don’t provide any local instance of Elasticsearch through docker.

  • Please don’t provide any scripts to populate the data or any helper scripts. Please focus on the requirements mentioned in this specification.

  • The existing roles and scopes based authorization checks are still applicable before interfacing with Elasticsearch.

  • You need to provide tests and update existing tests. Reviewers will use the dedicated test section in the scorecard when considering issues related to tests



Final Submission Guidelines

Submit a git patch of your changes. You need to ensure that we can apply the patch with git apply patch command.

 

ELIGIBLE EVENTS:

Topcoder Open 2019

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30093841