A Java EE web application with high scalability allowing customers to search and purchase over 20,000 movies with the response time under 500ms. It also allows employees to add new records for stars and movies through a XML file or a front end interface. Please visit the wiki for more information about this project.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. Alternatively, you can always use the link above to run the application.
The only supported environment is Ubuntu v20.04+, Tomcat v9.0+, MySQL v8.0+, Java v11+, and IntelliJ IDEA.
sudo apt update
sudo apt install openjdk-11-jdk maven
sudo apt update
sudo apt install mysql-server
sudo mysql_secure_installation
- Press "Y"
- Set the password and keep pressing "Y"
mysql -u root -p
CREATE USER 'testuser'@'localhost' IDENTIFIED WITH mysql_native_password BY '122Baws@ICS';
GRANT ALL PRIVILEGES ON * . * TO 'testuser'@'localhost';
quit
- Fetch data files
cd
intosrc/main/sql
wget https://grape.ics.uci.edu/wiki/public/raw-attachment/wiki/cs122b-2019-winter-project1/movie-data.sql
- Put
BEGIN;
before the first line andCOMMIT;
after the last line to speed up the data insertion process
- Put
cd
into the project root directorywget http://infolab.stanford.edu/pub/movies/mains243.xml
wget http://infolab.stanford.edu/pub/movies/actors63.xml
wget http://infolab.stanford.edu/pub/movies/casts124.xml
mysql -u testuser -p
\. src/main/sql/createtable.sql
\. src/main/sql/movie-data.sql
\. src/main/sql/addvalues.sql
quit
mvn clean
mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="com.flixster.password.UpdateSecurePassword"
mvn clean
mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="com.flixster.xml.parser.MainsParser"
mvn clean
mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="com.flixster.xml.parser.ActorsParser"
mvn clean
mvn exec:java -Dexec.cleanupDaemonThreads=false -Dexec.mainClass="com.flixster.xml.parser.CastsParser"
mysql -u testuser -p
\. src/main/sql/stored-procedure.sql
\. src/main/sql/createindexes.sql
quit
- Set up FLAMINGO Toolkit to enable efficient fuzzy search
wget http://flamingo.ics.uci.edu/toolkit/toolkit_2021-05-18.tgz
- Unpack the file
sudo apt install gcc make mysql-server libmysqlclient-dev
cd
into the unpacked foldermake
sudo cp libed*.so /usr/lib/mysql/plugin/
sudo service mysql restart
mysql -u root -p
DROP FUNCTION IF EXISTS ed;
CREATE FUNCTION ed RETURNS INTEGER SONAME 'libed.so';
DROP FUNCTION IF EXISTS edrec;
CREATE FUNCTION edrec RETURNS INTEGER SONAME 'libedrec.so';
DROP FUNCTION IF EXISTS edth;
CREATE FUNCTION edth RETURNS INTEGER SONAME 'libedth.so';
sudo apt update
sudo apt install tomcat9 tomcat9-admin
- Wait for a second and you should see Tomcat is on port 8080:
ss -ltn
sudo ufw allow from any to any port 8080 proto tcp
- Go to http://127.0.0.1:8080 and you should see the "It works!" page
sudo vim /etc/tomcat9/tomcat-users.xml
- Add this block before
</tomcat-users>
and remember to change the password<role rolename="admin-gui"/> <role rolename="manager-gui"/> <user username="tomcat" password="your_password" roles="admin-gui,manager-gui"/>
sudo systemctl restart tomcat9
- Wait and put in the username and password in http://127.0.0.1:8080/manager/html
- You should see the Web Application Manager afterward
- Clone Fabflix into your device:
git clone https://github.com/UCI-Chenli-teaching/cs122b-spring21-team-20.git
- Create
Keys.java
insrc/main/java
and put in your reCAPTCHA secret key and TMDb API key- Follow this to set up reCAPTCHA
- Remember to add "localhost" into the domains
- You need to register a TMDb account and follow this to get an API key from TMDb
public class Keys { public static final String RECAPTHCA_SECRET_KEY = ""; public static final String POSTER_SECRET_KEY = ""; }
- Follow this to set up reCAPTCHA
- Follow the instructions here (Ignore "Create Project in IntelliJ")
- Bootstrap
- jQuery
- Ajax Autocomplete for jQuery
- Line Awesome
- Apache Tomcat
- Gson
- Jasypt
- MySQL
- FLAMINGO Toolkit
- OkHttp
- Adobe Photoshop
- Amazon Elastic Compute Cloud (EC2)
- GIMP
- Git
- Google Cloud Platform
- reCAPTCHA
- IntelliJ IDEA
- Maven
- The Movie Database (TMDb)
- Ubuntu
Item | Contributor |
---|---|
Autocomplete | imliuyzh |
Checkout Back End | AnonymousAnteater, imliuyzh |
Checkout Front End | imliuyzh, AnonymousAnteater |
Dashboard | imliuyzh |
HTTPS | AnonymousAnteater, imliuyzh |
Full-Text & Fuzzy Search | imliuyzh, AnonymousAnteater |
Login Back End | imliuyzh, AnonymousAnteater |
Login Front End | imliuyzh |
Login Filter | imliuyzh |
Movie Page Back End | imliuyzh, AnonymousAnteater |
Movie Page Front End | imliuyzh, AnonymousAnteater |
Password Encryption | AnonymousAnteater |
Portrait | imliuyzh, AnonymousAnteater |
Poster | AnonymousAnteater, imliuyzh |
reCAPTCHA | imliuyzh |
Search Front End | imliuyzh |
Search Back End | imliuyzh, AnonymousAnteater |
SQL Scripts | AnonymousAnteater, imliuyzh |
Star Page Front end | imliuyzh |
Star Page Back End | imliuyzh, AnonymousAnteater |
XML Parsing | AnonymousAnteater, imliuyzh |