##Summary This is An interactive web application full stack project for users to search events by their geolocations and get recommendations based on their favorite records.
- Front end: HTML/CSS/JavaScript
- Back end: JAVA8(Eclipse JEE)
- Database: MYSQL MongoDB
- Java servlet: Apache Tomcat v9.0
- Test: Apache JMeter
In this project, I recommend events based on categories that the user has favorited. By knowing the category of the item the user favorited, I recommend some events belong to this category nearby this user.
Concrete steps are as follow:
- Fetch all ids of these events this user has visited.
- Given all these events, fetch the categories of these events.
- Given these categories, find what are the events that belong to them.
- Filter events that this user has visited.
- Sort the recommendation list on ascending order of distance between recommended events's locations and user's location.
Java servelet could handle the lists RPCs below:
- login
- logout
- register
- search items
- recommend items
- set/unset favorite items
I implement two databases: MySQL and MongoDB. I prefer MySQL in the project at first, but if I need to scale the prject, MongoDB could be a good choice. The image below is the schema for MySQL database of this project.
- Launch an ubuntu machine(set port 80)
- Install Java, MySQL or MongoDB, Apache Tomcat
- Upload WAR file
- Start Java servlet(change port to 80)
- http://YOUR_IP_ADDRESS/Jupiter/
- You can register or use a dafault account(username: 1111, password:2222)
I use Apache JMeter to test the maximum QPS in Amazon EC2. The peak throughput happens between 1000 and 2000 threads, so I can test more data points between 1000 and 2000 threads. The throughput will be around 150QPS. When I used 2500 threads, I got errors, which means the memory size is my server's bottleneck.