Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Flight Information Management System Chantelle Erasmus Motivation • Learn about the client/server model with use of database • How the client interacts with the server • How server interacts with database Goals • Create a client/server application with ability to: • Display flight information to user depending on information requested • Only display information that user is authorized to view • Add/Update/Delete flight information if user has proper authorization Implementation Details • • • • • • Use Java Swing for GUI Use Java Use Oracle database Java Persistence API Developed on Windows 7 Netbeans IDE Client Design • Input is gathered from user through GUI • Has main thread for GUI and sending messages • Message sent to server requesting information • Has receive thread for receiving messages from server • Display information through GUI to user if applicable Server Design • Java Persistence API used for communication with the database • Has main thread for sending messages to client and Java Persistence API calls • Has receive thread for receiving messages from clients Database Design • Store all information about flights that may need to be accessed • Store user credentials and authorizations • Very basic; add more information in future Database Details Send() SERVER CLIENTS Receive() CLIENT Java Persistence API Calls (Query) DATABASE SERVER Main Thread Receive Thread Main Thread Receive Thread - GUI Events - Receive messages from server - - Sending messages to server - Receive messages from client - Sending messages to client Java Persistence API calls EVENT_MSG(sent from client) • Client Id • Event type • • • • • Add (type 0) Update (type 1) Delete (type 2) Query (type 3) Login (type 4) • Data • If type 0-3, query to be executed • If type 4, credentials Send() SERVER CLIENTS Receive() CLIENT Java Persistence API Calls (Query) DATABASE SERVER Main Thread Receive Thread Main Thread Receive Thread - GUI Events - Receive messages from server - - Sending messages to server - Receive messages from client - Sending messages to client Java Persistence API calls EVENT_MSG(sent from server) • Client Id • Event type • • • • • Add (type 0) Update (type 1) Delete (type 2) Query (type 3) Login (type 4) • Data • If type 0-2, return whole table • If type 3, result of executed query • If type 4, valid and admin privileges Send() SERVER CLIENTS Receive() CLIENT Java Persistence API Calls (Query) DATABASE SERVER Main Thread Receive Thread Main Thread Receive Thread - GUI Events - Receive messages from server - - Sending messages to server - Receive messages from client - Sending messages to client Java Persistence API calls Basic User: Initial Screen Basic User: Find Gate Info. Basic User: Gate Info. Result Pilot: Login Pilot: Login Error Pilot: Initial Screen Pilot: Aircraft Type Error Pilot: Aircraft Type Info. Admin: Login Admin: Initial Screen Admin: Update Flight Info. Admin: Add Flight Admin: Add Flight Result Admin: Remove Flight Admin: Remove Flight Result Questions/Comments