This project builds a full-stack Java web service that provides event search and personalized recommendation for users. The interactive frontend web page is developed using html, CSS and JavaScipt, and the backend server implements several Java Servlets in Apache Tomcat to handle different business logics. Functionalities supported are account registering, event searching based on date and geo-location, user favorite history tracking and event recommendation based on user favorite history. Event data are provided by TicketMaster via TicketMaster Discovery API. User data are stored and managed using relational and NoSQL databases.
Project diagram |
The source code is in eventgrab
.
src
- backend server (can be deployed onto Amazon EC2 or other cloud platforms)db
- classes that handle database connectionexternal
- classes that parse TicketMaster API responsesrecommendation
- classes that implement business recommendationrpc
- Servlets and helper classes that handle remote procedure calls (HTTP requests and responses)
WebContent
- frontend web contents
The source code in db
implements connection with two types of databases: relational (MySQL) and NoSQL (MongoDB). You can choose to use either by setting the private field DEFAULT_DB
in db.DBConnectionFactory
.
- Choosing MySQL:
private static final String DEFAULT_DB = "mysql";
- Choosing MongoDB:
private static final String DEFAULT_DB = "mongodb";
To use the TicketMaster APIs, you will need to register an account at https://developer.ticketmaster.com/. Substitue the field API_KEY
in external.TicketMasterClient
with your own API key:
private static final String API_KEY = "YOUR_TICKETMASTER_API_KEY";
Login page |
Main page |