cs122b-spring20-team-60 created by GitHub Classroom
Note: We put the original Fabflix (8080 port) and the load balancer (80 port) on the same AWS instance. So We have 3 AWS instances and 1 GCP.
-
-
scaled: http://18.220.12.68:80
original website: https://18.220.12.68:8443 -
Project 5 Video Demo Link: https://youtu.be/lGPPOcAW6O0
cd Project5 && sudo sh ./deploy.sh
Chenxi Yang:
- task 3 -- Enabled load balancer and routing queries to Master/Slave SQL respectively
- task 4 -- Prepared the codebase for measurement and wrote the processing script; Solved the login issue in testing and preparing the test plan in JMeter
Jingwen Mo:
- task 1 -- Connection pooling in Spring boot
- task 2 -- Master-Slave Replication
- task 3 -- Enabled load balancer in aws and gcp
- task 4 -- tested and measured the performance, and collected the results
-
Project5/src/main/resources/application.properties Project5/src/main/java/com/cs122b/project/Fabflix/Service/DBService.java
Firstly, we configure the connection pooling in spring boot by do the configuration in application.properties, then spring will create a bean for us, and we can inject this DataSource bean and use it to get connection with MySQL.
There are two datasources(Thread pool) in our project, the datasource is binded and connect to the local slave SQL, only for reading data, the writedatasource is connected to the master SQL, and is used to perform write operation. The dbservice request connection from datasources and close that connection after work is done. For the search dbservice, Spring AOP is used for performance monitoring.
-
Project5/src/main/resources/application.properties Project5/src/main/java/com/cs122b/project/Fabflix/Service/DBService.java
We configured two datasources in application.properties, one for read, one for write, and we connect the write datasoure with the master slave. When we have to insert or update the database we use the read datasource.
-
pip install jsonlines python3 log_processing.py test01.log
Website:
http://18.188.106.209:8080/
https://18.188.106.209:8443/
Video: https://youtu.be/JqRsP_cgLZA
Website: cd Project3 && sudo sh deploy.sh
the code for frontend auto-complete: https://github.com/UCI-Chenli-teaching/cs122b-spring20-team-60/blob/master/FrontendSource/Customer/src/views/Search.vue
Note: For the frontend, we use Vue.js framework. Since the aws EC2 instance has limited memory and CPU, we can not install vue-cli, which is essencial to build the forntend on the server, therefore we can not demo build on the EC2. We can only build it locally and deploy the built target to our website resource folder
Jingwen Mo:
- Implement full-text search
- Implement backend for Autocomplete
- Implement Android Login and Movie List Page
Chenxi Yang:
- Implement frontend for Autocomplete
- Implement Android Search and Single Movie Page
Website:
http://18.188.106.209:8080/
https://18.188.106.209:8443/
Video: https://www.youtube.com/watch?v=ehVolnZzvEc
Website: cd Project3 && sudo sh deploy.sh
DataImport: cd Datainsert/dbinsert && sudo sh run.sh
-
In-memory hashmap: use hashmap to reduce duplication and drop no-matching data(invalied foreign key in stars_in_movies)
-
bulk insert for all table
note: star id is generated using MD5(starname).substring(0,7)+'0'
This is our api design document. Our front end and back end communicate base on this.
Jingwen Mo:
- Add reCAPTCHA
- Refractor original datebase query to preparedStatement
- Use encrypted password
- Implement the backend for admin login and Dashboard and also the stored procedure.
- Debug and test
Chenxi Yang:
- Adding HTTPS(Springboot)
- Implement the frontend for admin login and Dashboard
- Implement XML parsing and optimization
- Debug and test
Website: http://18.188.106.209:8080/ Video: https://youtu.be/lAAsxAHhy08
sh ./deploy.sh
Index creation:
use moviedb;
CREATE INDEX movietitle ON movies (title);
CREATE INDEX moviedirector ON movies (director);
CREATE INDEX starname ON stars (name);
Query:
select * from movies where 1=1 AND movies.title LIKE "%t%" AND movies.year = 2003 AND movies.director like "%d%" and id in (select distinct movieId from stars_in_movies inner join stars on stars_in_movies.starId = stars.id where name like '%s%') ORDER BY movies.title asc , (select rating from ratings where ratings.movieId=movies.id) asc LIMIT 10 OFFSET 0;
note: where 1=1
is designed for the convience of query formatting, make no sense in query.
This is our api design document. Our front end and back end communicate base on this.
Jingwen Mo:
- Refactoring the back end stucture from original Spring MVC(project 1) to Spring boot & RESTful
- Design api and implement the back end using Spring boot, Spring MVC and REST and also develop all the database operations
- Debug and test
Chenxi Yang:
- Design api and implement the front end using Vue.js framework and make the UI look nicer.
- Participate in developing the "search" database operations and improve the performance of backend database operations
- Debug and test