Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
COMP2211-WE01
Networks and Systems
Section A Databases
Question 1
(a) Consider the XML document below.
Nick Rickson Hardware
58000 cinema theater
2013
Peter Aniston
Salary
67000
cycling
2018
Maria Jones Software
75000 books cinema
2021
i. Draw the directed tree structure (i.e. the Hierarchical Tree Model) of the above XML file. Please ensure that you include in your tree all the necessary labels.
Hint: If you do not have enough space, you can write the names of the nodes next to the nodes (instead of inside the nodes). [20 Marks]
ii. Write an XPath query for the following: “Select the names of staff who either have an internal score of at least 40 or have been hired after 2015 (or both)” . Provide also the output of your query. [4 Marks]
iii. Write a query in XQuery for the following:
“Find the name nodes, the topics, and first year at work of all staff members whose salary is larger than the average salary of the staff who like cinema”.
Provide also the output of your query. [6 Marks]
(b) Consider the following transaction schedules at sites S1 , S2 , S3 . Describe how the distributed deadlock detection method works, starting at site S1 . For the transaction schedule given, is there a distributed deadlock? If yes, find and list all of them. Justify your answer and show all your work in detail, including any required diagrams.
[20 Marks]
Section B Distributed Systems
Question 2
A group of Durham CS Level 2 students want to implement a distributed system for hosting a multi -player networked game. The game provides a shared envi- ronment, which comprises a landscape for game players to navigate and interact with game objects or other game players.
(a) For implementation, the distributed system is constructed by two networked server computers. Each server hosts an independent instance of the game supporting up to 16 game players simultaneously.
The system has publicised the server IP addresses. Each game player can then choose which server to connect to for game playing. If the chosen server is overloaded, the player will be transferred to another server.
Analyse whether the proposed system is compliant with the design criteria of distributed systems. Justify your answer with two reasons. [5 Marks]
(b) To allow more game players interacting in the same game playing session simultaneously, the system in (a) is altered to use the two servers collabo- ratively hosting one game instance.
For implementation, the game landscape is logically divided into two equal- sized and non-overlapping partitions. Each server manages one of these partitions. However, each server is installed with all game contents, i.e., including those contents that do not belong to its managed partition.
Each incoming game player will be assigned to a landscape position that can balance server workloads. During a game playing session, if a player moves to a position that belongs to the landscape partition maintained by another server, the player will be transferred to that server before they can continue to play.
Draw a block diagram to show a suitable design for the distributed system. You should take into account your answer in (a). Describe the functions of each server. [10 Marks]
(c) Design a replication architecture that can enforce failure transparency of the distributed system in (b). Draw a block diagram showing your design and use it to explain how your design works to support reliable game play- ing and justify your answer. Explain the minimum number of new server computers required and describe their functionalities. [17 Marks]
(d) Analyse whether a forward or a backward recovery mechanism should be implemented on top of the distributed system in (c) to enable the system to recover from any major failure. Justify your answer. [5 Marks]
(e) The collaborative server system in (b) works fine initially. However, during a game playing session, some local regions of the game landscape become popular with many game players interacting in these regions, inducing high server workload.
Suppose there is usually one popular local region during a game playing session and such a region can be relocated from time to time. Design a load distribution method that can balance the workload among the two server computers.
In your answer,
i. Describe how your design balances server workloads. Justify your answer. [4 Marks]
ii. Describe the main operations involved. [4 Marks]
iii. Explain how your design adapts to popular local region relocation while minimising the extra workload generated from the load distri- bution process. [5 Marks]