Unit 5 Software Architecture and Communication Flashcards
What is a software architecture?
The structure of a system. What elements it is comprised of and how they are related.
Define Fault tolerance.
The ability of a system to fail gracefully ie if a part of the system fails, the system should only fail proportionally.
What factors measure the performance of a distributed system’s architecture?
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.
Describe the client-server architecture
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.
What is Load Balancing
Load balancing is distributing the work across the system, maximising use of resources.
Multiple Servers acting together - advantages and disadvantages
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.
Describe a proxy server architecture and list what a proxy server can do.
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
Peer to peer - what are the advantages?
No distinct clients or servers. Data can be replicated as in multiple server style. no single point of failure.
Give an example of load balancing for each style of software architecture
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.
Describe a traditional two-tier architecture.
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.
What are the advantages and disadvantages of two tier architecture?
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.
N Tier architecture - describe
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.
What are the benefits of the N tier model?
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.
Drawbacks of the n tier model?
Increased complexity, doubling of communication.
Security - more points in the system to secure.
What is an Enterprise?
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
What are the tiers of the Java Platform Enterprise Edition?
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.
What do the standard three-tier architecture and Java EE tiered architecture have in common and how do they differ?
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.
What is the difference between synchronous and asynchronous message-passing?
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.
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?
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.
How can deadlock arise in communication? How can deadlock be resolved?
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.
Explain marshalling and unmarshalling
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.
What does it mean to say a remote procedure call is action-oriented?
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
Name two distributed communication paradigms.
Remote Procedure Call paradigm and distributed object paradigm.
Without using RPC, what would the sequence of steps be to call a procedure remotely? (data- oriented)
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.