320 likes | 556 Views
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:
E N D
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
SERVER Send() DATABASE CLIENTS JavaPersistence API Calls (Query) Receive() CLIENT SERVER • Main Thread • GUI Events • Sending messages to server • Main Thread • Sending messages to client • Java Persistence API calls Receive Thread - Receive messages from server Receive Thread - Receive messages from client
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
SERVER Send() DATABASE CLIENTS JavaPersistence API Calls (Query) Receive() CLIENT SERVER • Main Thread • GUI Events • Sending messages to server • Main Thread • Sending messages to client • Java Persistence API calls Receive Thread - Receive messages from server Receive Thread - Receive messages from client
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
SERVER Send() DATABASE CLIENTS JavaPersistence API Calls (Query) Receive() CLIENT SERVER • Main Thread • GUI Events • Sending messages to server • Main Thread • Sending messages to client • Java Persistence API calls Receive Thread - Receive messages from server Receive Thread - Receive messages from client