Bootup
1. [Computation]: Backend server A/B/C read the file dataA.csv, dataB.csv and dataC.csv respectively and store the information in data structures.
○ Assume a “static” system where contents in dataA/B/C.csv do not change
throughout the entire process.
○ Backend servers only need to read the text files once. When Backend servers are handling user queries, they will refer to the data structures, not the text files.
○ For simplicity, there is no overlap of departments or students among data files.
2. [Communication]: After step 1, Main server will ask each of Backend servers which departments they are responsible for. Backend servers reply with a list of departments to the main server.
3. [Computation]: Main server will construct a data structure to book-keep such information from step 2. When the client queries come, the main server can send a request to the correct Backend server.
Query
1. [Communication]: Each client (students and admin) sends a query to the Main server.
○ A student client sends department name and student ID to the main server.
○ The admin client can perform two types of queries:
(a) sending department name and student ID to query a student academic record
(b) sending only a department name to query department academic statistics
○ A client can terminate itself only after it receives a reply from the server (in the Reply phase).
○ Main server may be connected to all three clients at the same time.
2. [Computation]: Once the Main server receives the queries, it decodes the queries and decides which backend server(s) should handle the queries.