Unit 5 Software Architecture and Communication Flashcards

1
Q

What is a software architecture?

A

The structure of a system. What elements it is comprised of and how they are related.

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

Define Fault tolerance.

A

The ability of a system to fail gracefully ie if a part of the system fails, the system should only fail proportionally.

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

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

A

Responsiveness - If one part of the system needs to wait a long time to get a response from another part this is inadequate. For users poor responsiveness is frustrating.
Throughput - the rate at which the work gets done. influenced by speed of software components and reliability of network connections.

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

Describe the client-server architecture

A

Client sends requests to server. Server responds.
Disadvantage, too many clients connected to a single server will eventually affect responsiveness. Central role of server = single point of failure.
Load balancing may be achieved by getting the client to download and run an applet from the server.

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

What is Load Balancing

A

Load balancing is distributing the work across the system, maximising use of resources.

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

Multiple Servers acting together - advantages and disadvantages

A

Client speaks to one server that in turn may request information fro other servers. This system may be implemented using data partitioning or data replication.
Advantage. - better fault tolerance as clients can be diverted to another server in case of failure.
Also if all ops on the data are mirrored on each server, it may be easier to pick up and detect failure if a server fails.

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

Describe a proxy server architecture and list what a proxy server can do.

A

The proxy server acts as an intermediary between clients and servers.

  • can remove identifying info from client ensuring anonymity
  • can cache data allowing for faster service - eg BBC website latest news stories stored locally in cache saves overpowering their servers
  • can block offensive content
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Peer to peer - what are the advantages?

A

No distinct clients or servers. Data can be replicated as in multiple server style. no single point of failure.

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

Give an example of load balancing for each style of software architecture

A

Client Server - some processing can be done by clients (applets)
Multiple server - load can be shared among servers.
Proxy Server - proxy takes over some work.
Peer to peer network - work is shared across peers.

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

Describe a traditional two-tier architecture.

A
Thick clients (able to do some processing) form one tier, while a database server provides the second tier.
The database acts only as a repository for data and enforces some constraints to preserve the data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the advantages and disadvantages of two tier architecture?

A

Advantages - Clients can work independently with their own view of the data (user, administrator). Best suited to situations where the number of clients is limited and there are no major security issues.
Disadvantages - Scalability - the server will only support a limited amount of connections.
Single point of failure.
Distribution - if changes are made to the software for the client then this will have to be distributed to each client.

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

N Tier architecture - describe

A

Three or more tiers. Often a clear distinction between operations of the application (presentation, middletier, database). typically uses a thin client as these let the server do the processing.

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

What are the benefits of the N tier model?

A

Scalabilty
Reuse - modularised so reuse is possible. Can
Improved Data integrity and security. All data passes through middle tier so this can ensure data is valid. More security points.
Redundancy in event of failure.

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

Drawbacks of the n tier model?

A

Increased complexity, doubling of communication.

Security - more points in the system to secure.

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

What is an Enterprise?

A

An enterprise is an organisation of some kind. Typically an enterprise has the following resources, people, plant, processes and it wishes to protect/preserve these resources while expanding.
Preserve - eg integrate legacy system within newer system
Protect - security measures

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

What are the tiers of the Java Platform Enterprise Edition?

A
EIS (Enterprise Information system) tier - houses the database - may be distributed or held in one location
Business Tier (resides in Java EE server) - uses enterprise beans  - software related to business logic.
Web Tier (resides in Java EE Server) - required if there are web clients. Makes business logic accessible for web apps.
Client Tier (lives in client machine) - deals with presentation or user interface. Clients may be applets, web clients or application clients.
17
Q

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

A

The java EE tiered module is a specific example of an n-tier architecture, with separate database, middle and client tiers. It differs from the 3-tier architecture in that the middle tier is further divided into the web and business tier.

18
Q

What is the difference between synchronous and asynchronous message-passing?

A

Synchronous - where each process has to be at the point of sending and receiving at the same time. Also known as blocking communication.
Asynchronous - where a buffer may be used so each process does not have to be at sending/receiving point at the same time.

19
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 message has completed. how can a non-blocking receive be implemented?

A

By using a thread to deal with the receive. The main thread can continue processing until it arrives at the point where it requires the data from the receive thread. The main thread and receive thread can then be joined again.

20
Q

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

A

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

21
Q

Explain marshalling and unmarshalling

A

Marshalling - taking a collection of data items and assembling them into a form suitable for transmission
Unmarshalling - disassembling them on arrival and rebuilding them
Also known as flattening.

22
Q

What does it mean to say a remote procedure call is action-oriented?

A

It means that the action of calling a procedure remotely is the focus, rather than the lower level creation of sockets, selection of protocol, marshalling and unmarshalling of data

23
Q

Name two distributed communication paradigms.

A

Remote Procedure Call paradigm and distributed object paradigm.

24
Q

Without using RPC, what would the sequence of steps be to call a procedure remotely? (data- oriented)

A

Set up a 2 way communication.
Package the message, specifying the name of the procedure and any arguments it may take.
Send the message.
On receipt the message must be unpacked, procedure executed, any return value packaged and sent.
Calling process receives call and unpacks it.

25
Q

Advantages of RPC

A

it’s at a higher level of abstraction so it is action oriented.

  • easier to debug and maintain
  • easier to program
  • implementation details are hidden
26
Q

Where does the RPC layer reside?

A

it resides in the application layer , covering the session and presentation layer of the OSI model.

27
Q

RPC is one of the first examples of middleware. What is middleware?

A

Middleware is a layer of software that aims to mask the heterogenity of the underlying platforms. this simplifies the development of distributed applications.

28
Q

What is the difference between a local and a distributed object?

A

A local object can only have its methods invoked by a local process (one residing on the same machine)
A distributed object is one whose methods can be invoked by remote process (running on a different machine)

29
Q

RMI is a homogeneous middleware. what does this mean?

A

RMI is a Java mechanism, therefore the invoking object as well as the object with the method being invoked must be implemented in Java.

30
Q

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

A

Both are synchronous because the calling process is blocked while the call is being made, and can continue only when the call returns.

31
Q

What is the role of the timers in RPC implementation?

A

-ensure that a process does not ‘hang’ indefinitely

32
Q

Distinguish between data-oriented, task-oriented and object-oriented forms of communication. Give examples of each.

A

Message passing is data-oriented - the focus is on the data being exchanged.
RPC and RMI are action - oriented, the focus is on the work that needs to be done which is expressed through calling procedures or invoking methods.
RMI is also object-oriented - local and remote objects are treated in the same way, and methods may be invoked on either.

33
Q

How is the ORB (Object Request Broker) different to RMI? How is it similar?

A

In RMI the process requests the object directly, whereas with ORB it makes the request via the ORB.
Both are additional layers of software functioning as middleware.
The ORB is capable of allowing communication among heterogenous systems.

34
Q

Message System Paradigm/Message Queue/Message Oriented Middleware - how does this work?

A

The sender leaves a message with the messaging system, which then takes on the job of delivering the message to the appropriate receiver. If the receiver is not available the messaging system will hold onto the message until it is. This is reliable and asynchronous.

35
Q

How does the publish subscribe model work? What is it associated with?

A

It is associated with events. Applications may subscribe to messages for particular events. When the event occurs there is a notification. The message may be multicast in that the publish operation can send the message to a group.

36
Q

In peer to peer file sharing the host sends the file only once but it gets to a whole swarm of connected computers. How does this work?

A

Files can be broken up and sent in parts, each peer in the system can forward the chunk it downloads on to all the other peers in the swarm.

37
Q

What are the trade-offs ie disadvantages of using a layer such as RPC?

A

The downside is a further layer adds more complexity and may slow down communication.

38
Q

Where a fast response time is vital, what is the best communication to use?

A

Sockets.