https://github.com/darkalexwang/eventrecommendation
This is a personalization-based event recommendation systems for event search.
https://github.com/darkalexwang/eventrecommendation
Last synced: 3 months ago
JSON representation
This is a personalization-based event recommendation systems for event search.
- Host: GitHub
- URL: https://github.com/darkalexwang/eventrecommendation
- Owner: DarkAlexWang
- Created: 2020-08-13T18:41:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-12-20T19:05:41.000Z (over 4 years ago)
- Last Synced: 2025-01-26T20:46:44.524Z (4 months ago)
- Language: Java
- Size: 8.46 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Event Recommendation Systems
## Business Design
- To design a personalization based event recommendation systems for event search.## General Instruction
- Design a web service with `RESTful APIs` in Java to handle HTTP requests and responses
- Frontend: an interactive web page with `AJAX` technology implemented with `HTML`, `CSS` and `JavaScript`. The Event Recommendation Website realizes three main functions:
* **Search** events around users
* **Favorite** events they like and also delete events they don’t like anymore
* Get **recommendation of events** around based on their favorite history and distance to where events will be hold
- Backend: use `Java` to process logic request, and some supports are as below:
* Built with both relational database and NoSQL database (`MySQL` and `MongoDB`) to support data storage from users and items searched in TicketMaster API
* Design **content-based recommendation algorithm** for event recommendation
- Deploy website server on `Amazon EC2`: [Event Recommendation
System](http://darkalexwang.xyz/EventRecommendation/)
- Analyze website traffic both online and offline with ELK (`ElasticSearch`, `Logstash` and `Kibana`) and `MapReduce` in MongoDB## Infrastructure Design
- 3-tier architecture
* Presentation tier: HTML, CSS, JavaScript
* Data tier: MySQL, MongoDB
* Logic tier: Java
- Local and remote development environment
> Local development environment
> Remote development environment## API Design
- Logic tier(Java Servlet to RPC)
* Search
* searchItems
* Ticketmaster API
* parse and clean data, saveItems
* return response
* History
* get, set, delete favorite items
* query database
* return response
* Recommendation
* recommendItems
* get favorite history
* search similar events, sorting
* return response
* Login
* GET: check if the session is logged in
* POST: verify the user name and password, set session time and marked as logged in
* query database to verify
* return response
* Logout
* GET: invalid the session if exists and redirect to `index.html`
* POST: the same as GET
* return response
* Register
* Set a new user into users table/collection in database
* return response
> APIs design in logic tier- TicketMasterAPI
[Official Doc - Discovery API](https://developer.ticketmaster.com/products-and-docs/apis/discovery-api/v2/)
- Recommendation Algorithms design
* **Content-based Recommendation**: find categories from item profile from a user’s favorite, and recommend the similar items with same categories.
* Present recommended items with ranking based on distance (geolocation of users)
> Process of recommend request## Database Design
- MySQL
* **users** - store user information.
* **items** - store item information.
* **category** - store item-category relationship
* **history** - store user favorite history
> MySQL database design- MongoDB
* **users** - store user information and favorite history. = (users + history)
* **items** - store item information and item-category relationship. = (items + category)
* **logs** – store log information## Implementation Details
- Design pattern
* **Builder pattern**: `Item.java`
* When convert events from TicketMasterAPI to java Items, use builder pattern to freely add fields.
* **Factory pattern**: `ExternalAPIFactory.java`, `DBConnectionFactory.java`
* `ExternalAPIFactory.java`: support multiple function like recommendation of event, restaurant, news, jobs… just link to different public API like TicketMasterAPI. Improve extension ability.
* `DBConnectionFactory.java`: support multiple database like MySQL and MongoDB. Improve extension ability.
* **Singleton pattern**: `MySQLConnection.java`, `MongoDBConnection.java`
* Only create specific number of instance of database, and the class can control the instance itself, and give the global access to outerclass## User Behavior Analysis
- Online (**ElasticSearch**, **Logstash**, **Kibana**)
* Use Logstash to fetch log (in NoSQL-like form), then store data in ElasticSearch, finally use Kibana to analyze the data in ElasticSearch, getting some tables and graphs like APIs use, request status, geolocation of visitors, etc
> Remote development environment- Offline (**MapReduce in MongoDB**)
* Copy-paste some logs from Tomcat server
* Purify log data and store in MongoDB
* Do ``mapreduce()`` in MongoDB
* Get a list of timebucket-count in descending order of count, then find the peak time of website traffic