Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


COMP321101

Distributed Systems

2020/2021


Question 1


(a) When implementing a distributed system design, determine which transport layer protocol is most appropriate for the following applications:

❼ Real-time streaming

❼ File transfer that is used across the Internet

❼ A clock synchronising service for all computers in a local network

❼ A local file sharing application in which clients need to automatically locate the server and cannot reply on the name service to be present.



(b)  Using a programming language of your choice (Java, C++, Python), create a Protocol Data Unit format to

hold the following object data:

❼ Customer name: Annie Hall

❼ Customer age: 38

❼ Address: 129 Mulholland Drive, Fargo, Old County, UK

Provide an illustration of the serialised form of your PDU and state any assumptions that you make.


(c) A Java-application manipulates management information as remote objects. Suppose a method updatePrice is written to update the price of an item represented as a remote object:

public  void updatePrice(Money price)  throws  RemoteException,

NegativeAmountException;

Identify the performance issues in relation with the use of class Money.


(d)  Consider ths issue of scalability in distributed systems.  A distributed system has N components and each component interacts with approximately half of the other components in the system.

(i) What is the level of interaction complexity in such system?

(ii) What is the formula for calculating the number of separate interactions that occur?


(iii)  How many separate interactions occur if there are 20 components in the system?


(e) A server program written in one language (for example C++) provides the implementation of an object that is

intended to be accessed by clients that may be written in a different language (for example Java). The client and server computers may have different hardware, but all of them are attached to the network.  Describe four problems due to the aspects of heterogeneity that need to be solved to make it possible for a client object to invoke a method on the server object.



Question 2


(a)  From a local machine mycomputer.comp.uleeds.uk , you would like to access the URL

www.maps.google.com/home/index.html.  Assume that your local name server is the one covering the comp.uleeds.uk domain. There is a root server R available, and com, google, and maps are administrative zones for the the URL you are trying to access.   Draw a diagram showing the recursive name resolution process, assuming that no part of the name is cached at any of the servers. Number your steps, and at each step, show the information that is being passed between the name servers.


(b) A client attempts to synchronise with a time server. It records the round-trip times and timestamps returned

by the server in the table below:



(i) Which of these times should it use to set its clock?

(ii) To what time should it set it?

(iii) The system is required to synchronise a file server’s clock to within x 1 millisecond. Can this requirement be met using Cristian’s algorithm? Explain.




(c)  Many distributed algorithms require one process to act as coordinator, at least initially.  If a process detects that the original coordinator is no longer responding to requests, it initiates a new election. Consider a group of 7 nodes labelled 0..6. Initially node 6 is the coordinator but it crashes. Node 3 is the first node to notice that the coordinator has crashed. Describe the election using:

❼ the bully algorithm;

❼ the ring algorithm where the nodes are arranged in a logical ring and only communicate with their

upstream neighbours.

Your answer should define the types of messages exchanged between nodes. It should also clearly indicate all

messages exchanged between nodes in the election process and which node is elected as the new coordinator.


(d)  Consider the Byzantine Generals problem. Two generals are on hills either side of a valley. They each have an army of 1000 soldiers. In the woods in the valley is an enemy army of 1500 men. If each general attacks alone, his army will lose.   If they attack together, they will win.  They wish to send messengers through the valley to coordinate when to attack.  However, the messengers may get lost or caught in the woods (or brainwashed into delivering different messages).  How can they devise a scheme by which they either attack with high probability, or not at all?


(e) A company has decided to leverage the web conferencing services provided by a cloud provider and to pay for

those services as they are used. The cloud provider manages the infrastructure and any application upgrades. What type of cloud delivery model is this an example of?




Question 3


(a) You are deploying an application in the form of a Web service composition, which consists of a mix of SOAP and RESTful services. Some services run on your local machine, others are externally provisioned by a service provider.  What are the factors that may affect the performance of your application?  In what ways, and at what cost, could performance be improved?


(b) Which statement best describes the relationship between application, server, and client in a multi-tenancy cloud environment?

(i) Single instance of software running on a server and serving one client.

(ii) Single instance of software running on a server and serving multiple clients.

(iii)  Multiple instances of software running on a server and serving multiple clients.

(iv)  Multiple instances of software running on multiple servers and serving one client.




(c)  MapReduce is a programming model and an associated implementation for processing and generating large data sets. Decide if the following statements are true or false.

(i)  Each mapper must generate the same number of key/value pairs as its input had.

(ii) With n mappers and m reducers there will be n r m distinct copy operations in the sort/shuffle phase. (iii) The reducer is applied to all values associated with the same key.

(iv)  It is possible to start the reducers while some mappers still run.


(d) Strawberries growing in greenhouses are very susceptible to two main factors:  air temperature (significant from the coverage of the greenhouse up to harvest) and water irrigation amount (very important both during the first few months after planting and before harvest).   Propose a cloud computing-based solution that allows to instantly check environmental and production parameters and generate notifications when urgent corrections are needed in the field. Discuss how to deploy your solution and include any information that you feel is relevant to back it up.


(e)  Consider a distributed system in a smart factory where mobile robots are supported by an Edge Computing

environment. The robots move around the factory floor independently to perform their tasks.

(i)  Explain briefly how Edge Computing can support this distributed system.

(ii)  Discuss the implications of the concurrent execution of components property on the engineering of such a distributed system.