uni-notes

:mortar_board: Sunway University BSc in CS notes :memo: (201701 intake)

View the Project on GitHub potateros/uni-notes

NET3204 Distributed Systems

Chapter Notes

Characterization of DS

What is a distributed system?

“A system in which hardware or software components located at networked computers communicate and coordinate their actions only by message passing. - Coulouris

“A distributed system is a collection of independent computers that appear to the users of the system as a single computer.” - Tanenbaum

“A distributed system is one on which I cannot get any work done because some machine I have never heard of has crashed.” - Leslie Lamport

Why Distributed Systems?

Reason Examples
Functional separation Clients and Servers, and data collection and processing
Inherent distribution Information, people, inventory systems, etc
Power imbalance & load variation Distribute load
Reliability data replication at different locations
Economics sharing reduces cost, building using common off-the-shelf components is cheaper
Characteristics Explanation
Parallel activities  
Communication via message passing No shared memory
Resource sharing  
No global state No single process knows the global state
No global clock Limited precision for processes to sync their clocks compared to non-DS
Challenges Means
Heterogeneity components must be able to interoperate across different OSes, hardware arch, comm arch, languages, software interfaces, security measures & information rep
Openness & Interoperability to have interfaces be publicly available to ease inclusion of new components (open specifications, standards from ANSI, ISO, IEEE, etc)
Security distributed system used as intended (confidentiality, integrity, availability, non-repudiation, encryption, authentication, authorization)
Scalability efficient operation even with increasing users by adding resources (challenges: cost, performance loss, bottlenecks)
Fault Tolerance failure of 1 component != system-wide failure (fault detection, masking, toleration, recovery)
Concurrency requires shared access to resources (fair scheduling, preserve dependencies, avoid deadlocks)
Distribution Transparency should be hidden from the user as much as possible (access, location, failure, replication, migration, concurrency, performance, scaling, persistence, transactional transparency)
Quality of Service The quality of the distributed system through reliability, security, performance, adaptability

System Models

Physical Models

Distributed Systems Early Internet-scale Contemporary
Scale Small Large Ultra-large
Heterogeneity Limited (typically relatively homogenous configurations) Significant in terms of platforms, languages, and middleware Added dimensions introduced including radically different styles of architecture.
Openness Not a priority Significant priority with range of standards introduced Major research challenge with existing standards not yet able to embrace complex systems.
Quality of Service In its infancy Significant priority with range of services introduced Major research challenge with existing services not yet able to embrace complex systems.

Architectural Models

Communication Entities

From system perspective:

From programming perspective, more problem-oriented abstraction have been proposed:

Communication Paradigms

Entities communicate in Distributed Systems via:

Communicating Entities Communication Paradigms
System-oriented Entities Inter-process Communication
- Nodes, Processes - Message Passing, Sockets, Multicast
Problem-oriented Entities Remote Invocation
- Objects, Components, Web Services - Request-reply, RPC, RMI
  Indirect Communication
  - Group Communication, Pub-sub, DSM
  - Message Queues, Tuple spaces
Roles and Responsibilities

In a Distributed System, processes take on given roles and these roles are fundamental in establishing the overall architecture to be adopted.

Two architectural styles stemming from the role of individual processes:

Architecture Pattern
Layering

Tiered Architecture

2-tier architecture

3-tier architecture
Thin Client
Middleware

Fundamental Model

Interaction Model

There are more but I got real tired and ran out of time so you gotta fill in the blanks yourself

Mid Term Test Questions

  1. List and explain FIVE characteristics of Distributed Systems (10 marks)

  2. List and discuss the FIVE challenges in developing Distributed Systems (10 marks)

  3. You are required to design and Distributed System for GrabCar which is a car hire company. Please sketch out a three-tier solution to the provision of their underlying distributed car hire service. Use this to illustrate the benefits and drawbacks of a three-tier solution considering issues such as performance, scalability, dealing with failure and also maintaining the software over time.

Past Year 2016 Test Questions

Question 1

  1. Describe what a Distributed System is. (2 marks)

    Answer

  2. List and explain THREE benefits obtained with Distributed System. (6 marks)

    Answer

  3. Provide a Distributed System example that is used in creative and entertainment industries and explain the contribution of that system. (4 marks)

    Answer

  4. List and describe FIVE characteristics of Distributed Systems. (10 marks)

    Answer

  5. Explain what client-server computing is and state that which of them is playing the active role or passive role. Explain remote invocation in this context. (6 marks)

    Answer

  6. A distributed system is described as scalable if it remains effective when there is a significant increase in the number of resources and the number of users. However, these systems sometimes face performance bottlenecks. How can this be avoided? (4 marks)

    Answer

  7. List and Explain FOUR challenges in achieving Distribution Transparency in Distributed System. (8 marks)

    Answer

  8. Consider a simple server that carries out client requests without accessing other servers. Explain why it is generally not possible to set a limit on the time taken by such a server to respond to a client request. (2 marks)

    Answer

  9. Consider there are two communication services have been implemented in asynchronous distributed systems. In service A, a message may be lost, duplicated or delayed and checksums apply only to headers. In service B, messages may be lost, delayed or delivered too fast for a recipient to handle them, but those that are delivered arrive with the correct contents. Describe the classes of failure exhibited by each service. Classify their failures according to their effects on the properties of validity and integrity. Can service B be described as a reliable communication service? (5 marks)

    Answer

  10. Explain what middleware is and how it is useful in Distributed Systems. (3 marks)

    Answer

Question 2

  1. A distributed application known as Play and Match for finding lovers had been hacked and millions of user accounts being compromised. Play and Match is a Remote Method Invocation (RMI) application with the client-server architecture. Assuming that you are the security adviser for the application company, please suggest at least FOUR (4) solutions for improving the security of a distributed system. (8 marks)

    Answer

  2. Describe what is meant by scalability of a system. (2 marks)

    Answer

  3. List and describe FOUR challenges face in designing scalable Distributed System (8 marks)

    Answer

  4. Scalability can be achieved by applying different techniques. List these techniques and provide an example. (7 marks)

    Answer

Question 3

  1. Draw an architecture diagram for the physical and architectural models to describe the design of a Point of Sales (POS) system for Aeon Big supermarket which has over 5000 supermarkets in Malaysia. They have round 25000 computers and generate averagely around 12 million transactions per day. The designed system should be scalable and reliable system due to they going to double up their business in coming year. (15 marks)

    Answer

  2. Based on the diagram from part a), provide justification for the design and describe the principles you follow to achieve scalability and reliability. (10 marks)

    Answer

Question 4

  1. Consider using Java Remote Method Invocation for implementing Election service in coming Malaysia election system. Discuss the effect of maybe semantics on the Election service. Explain and provide justification either at-least-once call semantics be acceptable for the Election service or would you recommend at-most-once call semantics. (8 marks)

    Answer

  2. You are required to use AKKA middleware to build a distributed system for International Auctions.

    1. Identify the possible actors and messages that are required in the systems. (5 marks)

      Answer

    2. Design a communication protocol for bidding an item with a sequence diagram. (8 marks)

      Answer

  3. Contrast Java RMI middleware and AKKA middleware in term of their characteristic. (4 marks)

    Answer

Exercises

  1. Give five types of hardware resource and five types of data or software resource that can usefully be shared. Give examples of their sharing as it occurs in practice in distributed systems.

    Hardware: Hard drives, printers, scanners, server, speakers. Software: files, databases, videos, data objects, music

  2. How might the clocks in two computers that are linked by a local network be synchronized without reference to an external time source? What factors limit the accuracy of the procedure you have described? How could the clocks in a large number of computers connected by the Internet be synchronized? Discuss the accuracy of that procedure.

    Answer

  3. Consider the implementation strategies for massively multiplayer online games as discussed in Section 1.2.2. In particular, what advantages do you see in adopting a single server approach for representing the state of the multiplayer game? What problems can you identify and how might they be resolved?

    Answer

  4. A user arrives at a railway station that they has never visited before, carrying a PDA that is capable of wireless networking. Suggest how the user could be provided with information about the local services and amenities at that station, without entering the station’s name or attributes. What technical challenges must be overcome?

    Answer

  5. Compare and contrast cloud computing with more traditional client-server computing? What is novel about cloud computing as a concept?

    Answer

  6. Use the World Wide Web as an example to illustrate the concept of resource sharing, client and server. What are the advantages and disadvantages of HTML, URLs and HTTP as core technologies for information browsing? Are any of these technologies suitable as a basis for client-server computing in general?

    Answer

  7. A server program written in one language (for example, C++) provides the implementation of a BLOB 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 an internet. Describe the problems due to each of the five aspects of heterogeneity that need to be solved to make it possible for a client object to invoke a method on the server object.

    Answer

  8. An open distributed system allows new resource-sharing services such as the BLOB object in Exercise 1.7 to be added and accessed by a variety of client programs. Discuss in the context of this example, to what extent the needs of openness differ from those of heterogeneity.

    Answer

  9. Suppose that the operations of the BLOB object are separated into two categories – public operations that are available to all users and protected operations that are available only to certain named users. State all of the problems involved in ensuring that only the named users can use a protected operation. Supposing that access to a protected operation provides information that should not be revealed to all users, what further problems arise?

    Answer

  10. The INFO service manages a potentially very large set of resources, each of which can be accessed by users throughout the Internet by means of a key (a string name). Discuss an approach to the design of the names of the resources that achieves the minimum loss of performance as the number of resources in the service increases. Suggest how the INFO service can be implemented so as to avoid performance bottlenecks when the number of users becomes very large.

    Answer

  11. List the three main software components that may fail when a client process invokes a method in a server object, giving an example of a failure in each case. Suggest how the components can be made to tolerate one another’s failures.

    Answer

  12. A server process maintains a shared information object such as the BLOB object of Exercise 1.7. Give arguments for and against allowing the client requests to be executed concurrently by the server. In the case that they are executed concurrently, give an example of possible ‘interference’ that can occur between the operations of different clients. Suggest how such interference may be prevented.

    Answer

  13. A service is implemented by several servers. Explain why resources might be transferred between them. Would it be satisfactory for clients to multicast all requests to the group of servers as a way of achieving mobility transparency for clients?

    Answer

  14. Resources in the World Wide Web and other services are named by URLs. What do the initials URL denote? Give examples of three different sorts of web resources that can be named by URLs. page 26 1.15 Give an example of an HTTP URL. List the main components of an HTTP URL, stating how their boundaries are denoted and illustrating each one from your example. To what extent is an HTTP URL location-transparent?

    Answer

  15. Give an example of an HTTP URL. List the main components of an HTTP URL, stating how their boundaries are denoted and illustrating each one from your example. To what extent is an HTTP URL location-transparent?

    Answer


Back to Home