Backend service for a retail web portal, operationalized and scaled.
Stack | Dependancies | Dev Dependancies |
---|
======= | Node.js | Mongoose | Artillery | | MongoDB | dotenv-safe | New Relic | | Docker | Express.js | eslint -airbnb | | JavaScript | | Express.js |
My role in the remote team that developed trendee's backend was re-designing and optimizing the systems of the Questions & Answers Service.
See the Docker section for more information on how to use the images contained in this repository.
There was a unique need to display multiple pieces of relational data in a clean and user friendly way. I chose to display these data points in an accordion style UI to reduce scrolling and support user control.
The panel functionality is controlled with a queue-like function I implemented with Javascript, and supported by pure CSS properties and ternary operators that switch element class names to show or hide information based on user interaction.
To update and transfer the 3mil+ Questions, 12mil+ Answers, and 3mil+ Photos of legacy data, I created and automated an ETL process, using a combination of Javascript, Regex, and Node.js child processes.
I chose to implement a noSQL database to store the data, as the needs of the application are primarily read heavy and non-transactional. Using a normalized data model with manual references, supported by Mongoose's populate method, I was able to reduce decision points in the database and improve latency over the legacy system.
Utilizing Docker, I created containers for the backend to maintain a reproducible baseline prior to load testing and blueprint future scalability when deployed to AWS clusters.
Check out Operation for an overview of the services' backend functionality or the Preview below for a demonstration of it's stress test.
- Clone repository.
- From within the QuestionsAndAnswers directory:
npm install
- From within the QuestionsAndAnswers directory:
npm start
-
Send an inappropriate question or answer to a collection for review.
/qa/questions/:question_id/report
/qa/answers/:answer_id/report
-
Vote a question or answer helpful.
/qa/questions/:question_id/helpful
/qa/answers/:answer_id/helpful
-
Retrieve all questions related to a product and their corresponding answers.
/qa/questions
-
Retrieve all answers related to a question.
/qa/questions/:question_id/answers
/qa/questions/:question_id/report
/qa/answers/:answer_id/report
-
Vote a question or answer helpful.
/qa/questions/:question_id/helpful
/qa/answers/:answer_id/helpful
-
Retrieve all questions related to a product and their corresponding answers.
/qa/questions
-
Retrieve all answers related to a question.
/qa/questions/:question_id/answers
![GET Response Times]( "GET Response Times") ![UPDATE Response Times]( "UPDATE Response Times") ![POST Response Times]( "POST Response Times")
Tested using Artillery.io in development.
Tested using New Relic in production.
Krista Brock [Questions And Answers Service]
Edwin Ekpenyong [Related Products Service]
Zachary Shold [Ratings And Reviews Service]