Unit 5 Distributed systems: Software architecture and communication Flashcards

1
Q

Which factors measure the performance of a distributed system’s software architecture?

A

(Part 2)The performance of a system can be measure by responsiveness and throughput.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the weaknesses of the client-server style?

A

(Part 2) The central role of the server forms a bottleneck and so limits the performance of the system. This central role also forms a single point of failure making it vulnerable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What different types of services can be offered by proxy servers?

A

(Part 2) Proxy servers can provide:

  • a caching service by storing local copies of previously visited web pages on the proxy - a form of security
  • by anonymising the IP address details of clients
  • implementation of data content policies, by allowing acceptable content to reach a client and blocking offensive web content
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is load balancing? Give an example of load balancing for each style of software architecture (client-server, multiple servers, proxy server, peer-to-peer) discussed?

A

(Part 2) Load balancing is a strategy to improve the performance of a distributed system, such that the workload of the system is shared among many processes, rather than only one process as this inevitably leads to other proceesses having to wait. For the system architectures discussed: -

  • in the classic client-server system architecture, load balancing can take place if some of the processing is carried out by the clients
  • in the multiple server model, the load can be shared among the servers
  • in the proxy server model, the proxy takes over some of the work from the servers, it relays information to the clients that would otherwise have to be provided by the server
  • in the peer-to-peer architecture, the work is shared among all the peers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the advantages and disadvantages for the two-tier and n-tier architectures?

A

(Part 3) Advantages of both two-tier and n-tier: they can incorporate seperate presentations for different types of user.

Advantages of n-tier compared to two-tier: better scalability, encourages reuse, improved security and availability.

Disavantage of two-tier: does not scale well, poor strategy for dealing with failure, difficulty in updating client software for remote users.

Disadvantage of n-tier: increased complexity, increased security risks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are thin and thick clients? Explain which type of client is more likely to be used in the two- and n-tier architectures.

A

(Part 3) Thin clients do not carry out much processing and leave this to the server - more regularly used in n-tier architectures.

Thick clients carry out more processing - more regularly used in two-tier architectures.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do the standard three-tier architecture and the Java EE tiered architecture have in common, and how do they differ?

A

(Part 4) The Java EE tiered architecture is a specific example of the n-tier architecture, with seperate database, middle and client tiers. It differs from the three-tier architecture in that the middle tier is split into further tiers: the web tier and the business tier.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which form of communication, i.e. synchronous or asynchronous, requires a buffer? Why?

A

(Part 5) In asynchronous message passing, a process sends a message with no regard as to whether the recipient is in a position to accept it or not. If it arrives before the receipient is ready to receive it, the message must be stored (buffered) until the recipient can read it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In an asynchronous message-passing system, the process that sends a message can continue processing. A receiving process is normally blocked until the receive method has completed. How can a non-blocking receive could be implemented?

A

(Part 5) By creating a seperate thread that deals with the receive, the main thread can continue processing until it arrives at the point when it requires the data from the receive thread. The main thread and the receive thread would then be joined again.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can deadlock arise in communication? How can deadlock be resolved?

A

(Part 5) Deadlock can be the result of programming errors, or misunderstandings about the orderinng of the receive and send operations with two or more processes waiting to receive from each other before they can continue. Most deadlock problems are overcome by using timeouts so that the call is abandoned if it appears unsuccessful after a specified time slot.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the difference between a ServerSocket object and a Socket object?

A

(Part 6) A ServerSocket object listens at a particular port for requests from a client. A Socket object forms part of the connection by menas of which client and server communicate. Both the client and the server have a socket which, together form the connection. Each socket provides input and output streams that enable the client and the server to receive data from and send data to the connection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Describe how the connection between a client and a server is made. How do client and server communicate once this connection is set up?

A

(Part 6) The client creates a socket based on the internet address of the server’s computer and the port on the server’s computer at which the connection will be made. This act of creating the socket can be though of as requersting a connection with the server.

The server creates a ServerSocket object associated with the port on its own machine at which the connection with the client is to be made. The method accept is invoked on this server socket, which causes the server to wait for the client’s request. When this arrives, accept makes the connection with the client and returns the server’s connection socket object through which it will communicate with the client.

The client and the server use the output and input streams associated with their own socket to the connection for sending data to and from each other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Explain whether the DateServer application is synchronous or asynchronous.

A

(Part 6) It is asynchronous because the sending process can send its message, irrespective of whether the receiving process is ready for it. An example of this is the statement:

out.write(message);

executed by the DateServer which is equivalent to a send. Similarly, the receiving process can pick up the message as and when it requires the message (which may have been buffered.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the advantages of having a multithreaded server, rather than a single-threaded server?

A

(Part 6) If a server can handle only one client at a time, the server would be rather unsatisfactory for most applications. Each client trying to communicate with this server would have to wait until the previous client has finished. This would be very unresponsive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In the case of implementing a client for a chat server, why does it make sense to implement this with two threads?

A

(Part 6) In the case of a chat client, there are two separate actions going on:

  1. forwarding messages from fellow chat clients (as sent by the chat server) are being received and printed to the screen
  2. contributions from the chat client itself are being sent to the server so that they can be forwarded

These actions are working continually and it cannot be determined beforehand at exactly which point either the client or the other chat clients would want to make a contribution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Is RPC an asynchronous or synchronous form of communication? And RMI?

A

(Part 7) RPC and RMI are both synchronous forms of communication, because the calling process is blocked while the call is being made, and it can continue only when the call returns.

17
Q

What is the role of the timers in the RPC implementation?

A

(Part 7) The main role of the timers is to ensure that processes do not “hang” indefinitely if there are problems in the communication. A timer expiring is essentially a timeout, and is a signal to the RPC service that some form of action needs to be undertaken to remedy the situation.

18
Q

Distinguish between data-oriented, tasl-oriented and object-oriented forms of communication. GIve examples for each form.

A

(Part 7) Message passing is data-oriented - the focus is on the data that is exhanged between the processes , and it is only as a result of data being exchanged that things get done.

RPC and RMI are action-oriented - the focus is on the work that needs to be done, which can be expressed through calling procedures or invoking methods.

RMI is object-oriented - local objects and remote objects are treated in the same way, and methods can be invoked on either.