Topcoder - Update Challenges Listing API and Member Challenges Listing API To Use ElasticSearch Only

Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Currently, for Challenges Listing API (GET /v3/challenges) and Member Challenges API (GET /member/{handle}/challenges) in Challlenge, it is using a mixed approach (Elasticsearch and DB querying) in order to provide the final result.

This is not a good pratice, so we changed the challenges-logstash-conf to aggregate and push all related information into Elasticsearch, you can see the related queries in (https://github.com/topcoder-platform/challenges-logstash-conf/blob/populate_more_challenge_info/conf/challenges-feeder-conf.j2)

For this challenge, we'd like to update Challenges Listing API and Member Challenges API to be READ-ONLY API from Elasticsearch.

Here is the expected changes.

1. Define a seperate model for Challenge data from ElasticSearch, it contains more information and different format.
2. Update Challenges Listing API and Member Challenges API by getting rid of DB queries and transform the result from the Challenge data model. The API response should remain same. 
Notes, the populating queries are slightly different, it is not a directly mapping. 

For example, in order to get rid of getReviewScores, you can use the reviews field from Elasticsearch, but the average logic should be done in the challenge service code, find the review for a specific submission, and calculate the average.

Be sure the compare the sqls used in challenge service and in challenges logstash conf. Raise questions in forum if you have any confusion.

3. Cleanup the useless DAO logic.
4. Make sure the filtering logic is still working properly.

Local Setup
- Please follow Build and Run with Docker compose to build and run direct app and online review locally
- Follow the README.md file to build and start the challenge service.
- Update https://github.com/topcoder-platform/challenges-logstash-conf/blob/populate_more_challenge_info/env.sh file to point to the informix db above, and run the dockers by https://github.com/topcoder-platform/challenges-logstash-conf/blob/populate_more_challenge_info/docker-compose.yml (Please update to use tag - populate_more_challenge_info-0d82734640199507a9f98e6ba681985ad6e06e95), Related Verification Steps will be provided in forum, so you can follow to populate the related field easily.

Final Submission Guidelines

- Code change 
- Verification Steps
 

 

ELIGIBLE EVENTS:

2018 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30061131