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
Local Information Service By: Uri Gold & Kadan Haba Supervisors: Lev Rechnik & Alexander Arlievsky Agenda • • • • • • Introduction LIS data base. Server application. Client application. Communication. Summary LIS - General Information: • The LIS enables to quickly and easily get administrative information regarding the Meire building and it’s residents through a blueTooth based, Multithreaded Client- Server application. • The clients use an IPAC on a Windows CE platform and the server runs on a PC station under Windows 2000. • The LIS was developed using MFC under Microsoft Visual C++ 6. What kind of Information? • Personal information :name, rooms, office phones, personal phones, schedule etc. • Room information: name and number, phone numbers and personal in the room. LIS data base • The data base was specially designed to answer the special requirements of the LIS project. • Its implemented in C++ (OOP) using MFC and was written from scratch by us. • It is possible to completely replace it with another – as long as the interface remains unchanged. Data base (cont’) • The objects are held on 4 different Linked lists on the top hierarchy of the data base object. • The Lists are MFC standard Linked lists. • All operations on these lists is performed in a Linear time complexity - O(n). Data base structure • The Data base is made out of 4 basic objects: 1. 2. 3. 4. Room Person Phone Event • The objects hold personal data as well as pointers to other related objects. Data base operations • The data base enables to perform many operations on the objects such as creating, modifying tracing and erasing data. • It was built to enable answering all possible inquiries relating the objects, however only part of them was actually passed to the user interface as an optional inquiry. 1.A person list How Do You Do It? Person: name, email, comment, job… Room Room List_of_rooms: Person Personal_phones: Event_list: Person 4.A Room list Room: Name, number… User_list: Event_list: Line: Line: Line: User_pointers: Phone: 2.A Phone list Phone: Phone: Phone: Phone: Phone: My_masters: (Or) List_of_rooms: Area code, phone number… Event: Event: Event: Event: Event: 3.An Event list Room: Person list: Day, time, type… LIS Search • When the details of the inquiry suit more than one data base item, all suitable answers are sent as the result. • A secondary search can be done on these results by choosing one of them, and reinquiring. (this time no search is done, and the details pertaining the desired item are sent back immediately – O(1) ). Server application • The server application is a graphical user interface (GUI) of the data base. • On startup you get a password entering window, that is currently disabled. To enable it the password verification module has to be written. Server Main Window • The “new” buttons (5,6,7) are for creation of new objects. • The “search/Update” buttons (8,9,10) are for searching modifying and deleting objects. Server Main Window (cont’) • The “basic parameter” buttons (11,12,13) enables controlling the primitive parameters of the data base. • Buttons 14 and 15 enable loading data (rooms and phones) into the LIS from text files in a specific format as specified in the server user manual. • Save/open (2,3) - serialization and save/open of the data base. • Go online (4) - start serving clients. Person Window Person Window (cont’) • The window enables entering the following details: personal details, offices, office phones, personal phones and events(reception hours, lectures etc.) • After choosing the rooms from the building room list, the phones that are related to these rooms are add to the “office phones”(11) list. The office phones for the person must be chosen out of this list. • Additional personal (private / cellular) phones can be added. • Events can be shared between a number of people, there for it is possible to add to the person an existing event out of the event list(20) or to create a new one (23). Phone window • This window enables adding new phones to the building as well as modifying existing ones. • If the phone belongs to a room ,it should be added to the room here. Room Window • This window enables adding new rooms to the building as well as modifying existing ones. • If the room has phones in it, the should be added to it here. Lis Server performance: • We have tested the LIS server performance by sending inquiries from a few automated clients who sent inquiries continuously. The LIS server answered ~400 inquiries/sec Under high load, and 400 – 500 inquiries/sec under average load. (high load means searching the worst case Room out of a 1000 rooms database, and average load means searching the average case out of a 1000 rooms data base. ) Client application • The Client Application is an MFC application designed for an IPAC , runs under WinCe. • It enables users to send inquiries to the server as well as to receive results using buttons 1,2. • The configuration button is for setting the server IP address. Client Search Windows: • Searching Room / Person The search result is an exact match to the intersection of the given fields. If more than on result is found, the “Search Result” window will appear. • The “Search Result” window enables choosing one out of the Multiple results and Getting it’s details. Communication • The communication was implemented as a separated object, to enable changing the communication protocol easily without any changes to the rest of the project. • Currently we are using TCP/IP. Communication object • The Communication uses 2 different objects (Server-Communication, and ClientCommunication ). Both inherit the base Communication class that implements basic communication function such as create(), read(), write(), and close(). Communication algorithm Go On Line Server thread Screen Thread •When going online, two threads are created: the first handles all communications, and the second one runs a moving sign on the screen,and enables killing the communication thread while running. Communication algorithm (cont’) • The communication thread has a classic server structure, i.e. it waits for clients inquiries, creates a new thread for every inquiry (up to a maximum of 20 users), and handles all resource allocation. • An inquiry thread receives the inquiry from the user, checks that it’s in a valid format and performs the actual inquiry through the database objects methods. After resolving the inquiry, the thread sends the result to the client. Summary • The LIS is currently using a communication emulator to enable using TCP/IP protocol rather than BLUETOOTH protocol. The project was implemented in a way that when the bluetooth device will be running, only minor code changes will have to be preformed in order to use the LIS with the BLUETOOTH device. • Among the many things we learned through this project were client/server subjects, Windows & WinCE programming, MFC , GUI and more. • We would like to thank: Dr Ilana David the Lab engineer, Alexander Arlievsky for the help with finishing the project, and most of all Lev Rechnik. Kadan Haba & Uri Gold.