-
-
- Yaseen Khan(yaseenk@uci.edu)
- Jadon Kwan(jadonk@uci.edu)
-
https://drive.google.com/file/d/1p6V2Ix3EC5MszBOfSZsux6rmG2GLTcid/view?usp=sharing
-
-
- Download the latest version of MySQL if you don't have it
- Login to mysql as the root user:
local> mysql -u root -p
- Create user CS122B and grant privileges
mysql> CREATE USER 'CS122B'@'localhost' IDENTIFIED BY 'FabFlix'; mysql> GRANT ALL PRIVILEGES ON * . * TO 'CS122B'@'localhost'; mysql> quit;
- Create the moviedb database
local> mysql -u CS122B -p mysql> CREATE DATABASE IF NOT EXISTS moviedb; mysql> USE moviedb; mysql> quit;
- Create the moviedb tables using the create_table.sql file:
local> mysql -u CS122B -p < create_table.sql
- Populate the database data using the movie-data.sql file:
local> mysql -u CS122B -p --database=moviedb < PATH/movie-data.sql
Populate the database data using the movie-data.sql file:local> mysql -u CS122B -p --database=moviedb < PATH/movie-data.sql
-
- SSH into your AWS instance. EX:
ssh -i My.pem ubuntu@ec2-myipaddress.us-west-2.compute.amazonaws.com
- Clone the github repo using
git clone https://github.com/uci-jherold2-teaching/cs122b-fall-team-37.git
- If you don't have the moviedb database setup, follow the Database Setup instructions
- If using a different database account, change the username and password in
web/META_INF/context.xml
- Run
mvn package
to build the war file. - Copy the war file:
sudo cp ./target/*.war /var/lib/tomcat9/webapps/
- Refresh your tomcat manager and deploy the app.
- Head to the web page of your AWS instance.
- SSH into your AWS instance. EX:
-
- Clone the github repo using
git clone https://github.com/uci-jherold2-teaching/cs122b-fall-team-37.git
- Open the Project in Intellij
- If you don't have the moviedb database setup, follow the Database Setup instructions
- If using a different database account, change the username and password in
web/META_INF/context.xml
- Build project using maven.
- Set up tomcat to use your war file (IntelliJ has configuration with Tomcat).
- Open your localhost to the correct port.
- Clone the github repo using
-
-
- Set up Connection Pooling
- Performed Single-Instance JMeter tests
- Wrote log_processing.py script
- Set Up Master/Slave instances
- Set Up Load Balancer
- Performed Scaled JMeter tests
-
-
Include the filename/path of all code/configuration files in GitHub of using JDBC Connection Pooling.
- src/main/java/FullTextSearchServlet.java
- src/main/java/SearchMovieServlet.java
- src/main/java/AutocompleteSearchServlet.java
- WebContent/META-INF/context.xml
-
Connection Pooling is utilized in the Search servlets for the JMeter tests. The connection pool configurations are in the context.xml file. The max number of pool connections is 100. The max number of idle connections is 30. The maximum timeout period for a connection is 10000 ms. Additionally, the Prepared Statements for each servlet is cached so more than one JDBC connection can utilize these statements. Caching the Prepared Statements is needed since Prepared Statements are usually associated with one Connection. Once all the Prepared Statements are executed, the database connection closes.
-
Since there are 2 backend instances, there will also be 2 database instances when the connection pools are created. When both the master and slave connections are opened, and a new connection is created in slave or master, the connection pool will direct to where the new connection is created. These connections are added to the connection pool for reusability but are separated by the database.
-
-
WebContent/META-INF/context.xml
For the Slave Instance, if it is given a write request, it uses a different connection and connects to the Master database rather than the localhost (its own). So even if it still receives write requests which is intended, it will write to the other database using the different connection.
-
- The log processing script is written using Python3
- The JMeter logs are stored as text files. The log processing script only supports text files
- To run log_processing.py, you need 2 parameters: directory/filename.txt and a positive integer representing the test case
python3 log_processing.py <directory_name>/logfile.txt <integer case number>
- If the log files are in the same directory as log_processing.py script, then the directory name does not need to be specified
python3 log_processing.py logfile.txt <integer case number>
-
Notifications
You must be signed in to change notification settings - Fork 0
Ykhan799/FabFlix
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published