330 likes | 413 Vues
Prerequisite Checker . Neeharika Bollepalli Masters Report, Final Defense Guidance by Dr. Dan Andresen. Overview . Motivation Biggest Challenge System Architecture Features Functional Testing Performance Testing Conclusions Project Metrics Progress of the Project
E N D
Prerequisite Checker Neeharika Bollepalli Masters Report, Final Defense Guidance by Dr. Dan Andresen
Overview • Motivation • Biggest Challenge • System Architecture • Features • Functional Testing • Performance Testing • Conclusions • Project Metrics • Progress of the Project • Effort & Time Distribution • Reflections • Demo
Motivation • Role of advisors • Requirement to satisfy the prerequisites for a student to enroll in a course • Web service that provides automated checking of the prerequisites for a student or a class
Biggest Challenge • Tree like structure of the prerequisites for a course Ex: CIS 520 requires CIS 450 or EECE 431; and B or better in CIS 501 • Mapping the prerequisite structure of a course to the database • Updating the prerequisite structure of a course from the Web interface
CIS 520 AND CIS 501 OR EECE 431 CIS 450 B or better Biggest Challenge (Contd…) 1 14 13 2 3 12 9 8 10 11 4 5 7 6 Prerequisite Structure of CIS 520 Entries in ‘prereq’ table for CIS 520
Prereq root parent plft prgt id lft rgt course name students ssn fname lname email advisor Prerequisite Structure of the course courserecords recordID ssn sem year dept number hours grade recommended Mapping prerequisites of a course to the course records of student(s) enrolled for that course Biggest Challenge (Contd…)
Clients Apache Tomcat Server Request or Response JSP – Client requests are interpreted here MySQL Server Request or Response Java Beans System Architecture Overall System Architecture
Features • View/Update Prerequisites • Check Student • Check Class • Update Database
Home View/Update Prerequisites Check Class Update Database Check Student Submit form to check class Submit form to view prerequisites Submit form to check student Submit form to add prerequisite Submit form to add department Submit form to add course View the results View the prerequisites Result for adding a department Result for adding a course Result for adding a prerequisite View the results Submit form to go back to Check Student Submit form to edit prerequisites Submit form to go back to Check Class Submit form to go back to Update Database Submit form to go back to Update Database Submit form to go back to Update Database Edit the prerequisites Submit form to go back to View/Update prerequisites Comprehensive Flow Chart
View/Update Prerequisites • Functionalities • View prerequisites • Input: department name, course level, course name • Update prerequisites • Input: new prerequisites and their conditions, additional information if any for the course • Limitations: Web form cannot represent these scenarios • More than 3 prerequisites connected by ‘AND’ • More than 3 prerequisites connected by OR’ • A prerequisite for a course has more than one condition • Connector ‘AND’ under ‘OR’ in the prerequisite structure of a course. Ex: CIS 721 requires CIS 520 or both CIS 622 and EECE 633
JSP Level Java Bean Level Database Level view.jsp Submit ‘viewForm’ view_resultjsp Accesses ‘prereq’, ‘dept_courses’ tables PrereqBean Calls the ‘getPrereq’method on ‘PrereqBean’ to display prerequisites Accesses ‘prereq’ table editPrereqBean Calls ‘getPrereqOnly’ method on ‘editPrereqBean’ to set prerequisites in the form ‘editForm’ Submit ‘editForm’ edit_result.jsp Updates the ‘prereq’ table updatePrereqBean Calls the appropriate method on ‘updateprereqBean’ to update the prerequisites Submit ‘GoToViewForm’ to View/Update Prerequisites for another course Architecture of View/Update Prerequisites
Check Student • Functionality • Eligibility of a Student to enroll in a course • Input: student ID number, semester, year, department name, course name • Limitations • Prerequisites which are not valid courses, default to either true or false. Ex: ‘Graduate Standing’ defaults to true, ‘Permission of Instructor’ defaults to false • ‘Concurrent enrollment’ condition for a prerequisite requires special handling
StudentHome.jsp Submit ‘checkPrereqForStudent’ form studentHome_result.jsp Accesses the ‘prereq’, ‘students’, ‘courserecords’ tables StudentCheck Bean Calls the ‘checkStudentStatus’ method on ‘studentCheckBean’ to display the results Submit ‘GoToStudentHomeForm’ to go back to Check Student Home JSP Level Java Bean Level Database Level Architecture of Check Student
Check Class • Functionality • Check the eligibility of all the students enrolled in a class for their prerequisite requirement • Input: semester, year, department name, course name
JSP Level Java Bean Level Database Level checkClass.jsp Submit ‘checkPrereqForClass’ form checkClass_result.jsp Accesses the ‘courserecords’, ‘students’ tables CheckClass Bean Calls ‘checkPrereqs’ method on ‘CheckClassBean’ to display the results Submit ‘GoToCheckClassForm’ to go back to Check Class Home Architecture of Check Class
Update Database • Functionalities • Add a department • Input: department name • Add a course • Input: department name, course name • Add a prerequisite • Input: department name, course level, course name
JSP Level Java Bean Database Level Level Calls ‘addDept’ method on ‘UpdateDbBean’ Updates the ‘department’ table addDept_result.jsp Submit ‘deptForm’ Submit ‘GoToDatabaseHomeForm’ to go back to Update Database Home databaseHome .jsp UpdateDbBean Calls ‘addCourse’ method on ‘UpdateDbBean’ Accesses ‘department’, updates ‘dept_courses’, ‘dept_prereqs’, ‘prereq’ tables addCourse_result.jsp Submit ‘courseForm’ Submit ‘GoToDatabaseHomeForm’ to go back to Update Database Home Calls ‘addPrereq’ method on ‘UpdateDbBean’ Accesses ‘department’, ‘dept_courses’ tables updates ‘dept_prereqs’ tables addPrereq_result.jsp Submit ‘prereqForm’ Submit ‘GoToDatabaseHomeForm’ to go back to Update Database Home Architecture of Update Database
Functional Testing • HttpUnit • How the web site was tested?
Performance Testing • JMeter • System Configuration Microsoft Windows XP Home Mobile AMD Athlon(tm) 64-bit Processor 2700+ 1.6 GHz, 512 MB of RAM Apache Tomcat 5.5, Sun Jdk1.5.0_01, MySQL Server 4.1 • Load tested the main features of the application with number of users from 100 to 2000
Performance Testing (Contd…) • Individual test cases for Check Student and Check Class as the size of the tables they access change frequently • The size of tables accessed by View/Update Prerequisites and Update Database remain relatively constant
Conclusions • For View/Update Prerequisites, Check Student, Update Database • Apache Tomcat and Java consumed more % of CPU • Load on CPU increases with the number of threads (100% CPU utilization for 400 threads) • To improve the performance, a more powerful application server
Conclusions (Contd…) • For Check Class • MySQL consumed more % of CPU • More load on CPU even for less number of threads (100% CPU utilization for 100 threads) as compared to that of View/Update Prerequisites, Check Student and Update Database • To improve the performance, Performance tuning of the database server and increasing the cache of the system • On the whole, performance is considerably good, given that maximum throughput is between 800 to 900 users for all features on average
Project Metrics • Number of Java Bean classes - 7 • Source Lines of Code • JSP Files – 3524 • Java Beans – 5473 Total ------------ 8997 (9000 approx.)
Progress of the Project • July ‘04 – August ’04 • Database Design, basic architecture of the web interface • September ’04 – December ’04 • View/Update Prerequisites feature, Shifted from Oracle 9i to MySQL 4.1 • December ’04 – January ’05 • Vacation • February ’05 – May ’05 • Check Student, Check Class, Update Database features, Started Testing • June ’05 – July ’05 • Completed Testing, JavaDocs, Documentation
Reflections • Experience in all phases of software development, from requirements to testing • How small things matter ? (Database Design) • Sharpened my JSP, JavaScript, Java skills and SQL programming • Complicated logic that tested my logical and analytical skills • Automated testing – how performance is measured and analyzed? • Role of Documentation