Authors: Nisarg Shah, Joanna Ko
- View our Project 1 Demo Video here: https://www.youtube.com/watch?v=OlU795mq0hg
- View our Project 2 Demo Video here: https://www.youtube.com/watch?v=SDhbaxUaCQI
- View our Project 3 Demo Video here: https://www.youtube.com/watch?v=PhrO_PNp6J4
- View our Project 4 Demo Video here: https://www.youtube.com/watch?v=-firS5-hSrM
! View our Project 5 Demo Video here: https://www.youtube.com/watch?v=DmsVD8qfRug-
NOTE : Our img/* folder is /graphImages
Out logs/* folder is /logs
-
Project 5 Video Demo Link: https://www.youtube.com/watch?v=DmsVD8qfRug
- The JMeter file used for Demo has been added here
-
Instruction of deployment: Click here
-
- Worked on Connection Pooling Changes
- Worked on testing (all the nitty-gritty around it)
- Worked on Setup alongside Joanna
- Wrote Connection Pooling changes
- Worked with Nisarg on Task 2 - 4
-
-
Include the filename/path of all code/configuration files in GitHub of using JDBC Connection Pooling.
- FabFlix/src/LoginServlet.java
- FabFlix/src/AddMovieServlet.java
- FabFlix/src/AddStarServlet.java
- FabFlix/src/AutoCompleteServlet.java
- FabFlix/src/CartServlet.java
- FabFlix/src/DashboardLoginServlet.java
- FabFlix/src/FetchGenres.java
- FabFlix/src/FetchMetaData.java
- FabFlix/src/MoviesServlet.java
- FabFlix/src/PageCountServlet.java
- FabFlix/src/PaymentServlet.java
- FabFlix/src/PlaceOrderServlet.java
- FabFlix/src/SearchServlet.java
- FabFlix/src/SessionServlet.java
- FabFlix/src/SingleMovieServlet.java
- FabFlix/src/SingleStarServlet.java
- FabFlix/web/META-INF/context.xml
All changes were commited here
Previously, the Tomcat Servlet connected to the database by using url and creating connections and run queries. This took alot of time, establishing new connection and new queries each time. With Connection Pooling we reduce the time it takes by making a more secure connection that stored in
context.xml. We define our datasource with connection pooling by allocating set of connections in ourcontext.xml. When we get connections, it takes a connection from the pool that is pre-created and does not need to be established again. When our connection is finished, we callclose(), which does not physically close the connection but returned to the pool for future use. Thus the time it takes to establish and free connections is saved.With two backend SQL, we have our database connection to either the Master or Slave's database, and achieves the same purpose explained as above, saving time on establishing and freeing connections.
-
-
-
Include the filename/path of all code/configuration files in GitHub of routing queries to Master/Slave SQL.
- FabFlix/src/AddMovieServlet.java
- FabFlix/src/AddStarServlet.java
- FabFlix/src/PlaceOrderServlet.java
- FabFlix/src/UpdateEmployeeSecurePassword.java
- FabFlix/src/UpdateSecurePassword.java
- FabFlix/web/META-INF/context.xml
All changes were commited here
With MySQL Replication, a client or web app reads and writes to MySQL Master and only reads to MySQL slave. In our FabFlix, we route write requests to Master while allowing read requests to either Master or Slave.
-
-
- The
log_processing.pyfile is located at the base of the repo, to use it, simply in the command line type:
python3 log_processing.py [LOG_FILE]
Observation: Amazon instances with their limited resources might have proven to the bottlenecks for slight inconsistencies in query times, as we encountered instances getting stuck occassionally because of the bombardment of requests.
-
Git clone repository:
git clone https://github.com/UCI-Chenli-teaching/cs122b-spring20-team-46/ -
Change directory into repo:
cd cs122b-spring20-team-46 -
Build war file:
mvn package -
Copy the war file into tomcat:
cp ./target/*.war /home/ubuntu/tomcat/webapps -
Open Tomcat Domain at <your-amazon-instance-domain>:8080
-
Go to Manager Apps > Click FabFlix
You should now be on the movie list page.
git clone https://github.com/UCI-Chenli-teaching/cs122b-spring20-team-46/
Import Project from External Model > Choose Maven
- Click
Add Configurations/Edit Configurations - Fix button should appear at bottom right screen
- Click
FabFlix:war exploded - Apply changes and click
OK - Click
Runapplication to build, connect server and launch Tomcat.
You are now all set up! Visit FabFlix on at http://localhost:8080/FabFlix.
Used the following from Instructions on P2 Task 2 (LIKE)
Mainly our LIKE statements reside under SearchServlet.java files, but there is also a replicatino (not exactly the same) under PageCountServlet.java to make sure we are fetching the correct # of pages.
For example: where title like ? "AND year like ? AND director like ? -- This is the format adapted in the file and ? if replaced with parameter setting (PreparedStatement)
- Create an APK package
./gradlew build - Open Android Emulator
emulator -avd {REPLACE_WITH_EMULATOR_NAME} - Install Android APK to Emulator
adb install -t app/build/outputs/apk/debug/app-debug.apk
We use the Levenshtein (Edit Distance) Algorithm (LEDA) to implement the fuzzy search.
- Flamingo, from the Professor's research is used to make the UDF.
To make use of
ed(Edit Distance Algorithm function in MySQL), in our backend (AutoCompleteServlet.java&SearchServlet.java) we dynamically set thethresholdby checking the length of query.
- If length of title is less than 4, than 1 error is allowed.
- If length if less than 6 than 2 errors are allowed.
- Else, 3 errors are allowed. (3 is the most errors one can make for fuzzy search to be considered)
- We convert the title to lowercase when conducting
edto not include case errors as typing errors. - We conduct an
ORquery to consider Fulltext search along with Fuzzy search. - (Ex:
select * from movies where match(title) against ("+s* +lov*" in boolean mode) OR ed("s lov",lower(title)))
We have written two files inconsistentGenreInMovies.md and inconsistentGenres.md
We have not written out as talked about in the demo inconsistences in parsing (such as parseInt kind of problems.
To make parsing efficient, we adapted two crucial steps.
- We load all needed data into JAVA memory in one query ( saving back-n-forth with db)
- We output the
newinserts such as forstars,genres,movies,stars_in_movies, andgenres_in_moviesinto.txtfiles so that we can easily and efficientlyloadthem into the sql database.
This we noticed saved us HUGE amount of time compared to when we tried single inserts in the middle of parsing.
- Worked with Joanna on SQL queries and table creattions.
- Mainly worked on the front-end (JS and HTML)
- Conducted fixes in pom.xml and servlet's
- Worked on the SQL table creations for
moviedb. - Worked on the Java files.
- Changed/fixed front end UI.
- Created and worked with Joanna on:
- MainPage, NavBar, Payment, Cart, Order, etc.. (JS)
- HTML/CSS
- Servlets for fetches of genre's, sessions, payments, orders, etc.. (Java)
- Login Page
- Building SQL queries with Nisarg
- Single Movie/Stars, Movie List page with Nisarg
- Creditcard Page
- Worked on front end (html/css) for correlated pages
- Worked on reCaPTCHA and HTTPS
- Helped with understanding and writing encryption and stored procedure
- Contributed in the _dashboard screen.
- Worked with joanna on parsing and storing xml data efficiently
- Worked with Nisarg with reCaPTCHA set up
- Worked on HTTPS
- Worked on Encryping passwords
- Wrote Stored Procedure for adding movies
- Worked with Nisarg on XML parsing
- Worked on the fronend of Autocomplete for FabFlix.
- Worked with Joanna on developing the Mobile app (Constraint layouts, backend calls and parsing, etc.)
- Integrated Fuzzy Search into the backend.
- Wrote Full Text Search SQL commands
- Worked on AutoComplete Servlet
- Worked with Nisarg on Android Studio App







