HomeStay Hotline is an open-source accomadation booking application designed with service oriented architecture. This project is especially for the review service component and the goal of this project is to build a new back end for the review service component to handle production level traffic. I inherited a legacy code base, which had a fully working front end. Initially, it could only handle 350 request per second after deployed. I started with a project scope, then reshaped database schema, benchmarked databases, performed local stress testing and cloud-based stress testing. By observing the performance during testing, I identified and solved bottlenecks. As a result, it can handle 1300 request per second when deployed, which is about 370% higher then original throughput. That means more users can interact with the application at the same time without waiting, which improved user experience.
- HomeStay-Hotline Photos Module
- HomeStay-Hotline Info Module
- HomeStay-Hotline Carousel Module
- HomeStay-Hotline Reservation Module
Node.js
Postgres SQL
Clone this repository
$ git clone https://github.com/HomeStay-Hotline/reviews-service.git
$ cd reviews-service
Install dependencies
$ npm install
Run following script to buid webpack bundle.
npm run build
To start this project, you can pass in database host, database user and password as environment variable as you run server
VAR1 => database username
VAR2 => database password
VAR3 => database host
npm start
GET request: Select all reviews that are associated with the given listing id Endpoint: '/api/homes/:id/reviews'