April 15, 2019

Software Architecture - Mid Sem Solution

Mid-Sem Paper Solutions:



Question:
Q.1 Choose the most appropriate architectural pattern (one) for the 5 descriptions below. Give reasons for choosing the pattern (in 1-2 line maximum)

1. Wants to split a system into a number of computationally independent execution structures (groups of software and hardware) such as database, business logic, web interface and client, connected by some communication media. The structure is chosen to provide a specific server environment optimized for operational requirements and resource usage.

2. A set of heterogeneous specialized modules which dynamically change their strategies as a response to unpredictable events, and the system has to deal with uncertain knowledge.

3. Wants a system that can be divided into reusable, loosely coupled components that can be flexibly combined and arranged to transform between various data formats.

4. Wants a distributed system with a structure that enables that service users do not need to know the nature or location of service providers.  

5. A program relationship in which one program requests a service or resource from another Program.

Nominees:
(a) Layered 
(b) Broker 
(c) Model-view-controller
(d) Pipe-and-Filter 
(e) Client-Server 
(f) Blackboard 
(g) Service-Oriented 
(h) Publish-Subscribe 
(i)  Map-Reduce

For Practice:
  • Wants a system that quickly can analyze enormous volumes of data by sorting the data and then analyzing the grouped data. -> Map-Reduce
  • Wants to set up a set of equal distributed computational entities that are connected via a common protocol to share their services and provide high availability and scalability. -> Peer-to-peer
Answer:

1. Multi-tier
2. Blackboard
3. Pipe-and-Filter 
4. Broker
5. Client-Server

Question:
Q.2. Write brief notes on followings:

2.1  Discuss whether this statement is true or false: “Architecture is a transferable and reusable model”.
Answer:
Yes, it is true. Architecture can be created as transferable, reusable model that forms the heart of a product line.
Below is some key-point which does prove the importance of this.
Architecture can provide the basis for evolutionary prototyping.
Architecture is the key artifact that allows the architect and project manager to reason about cost and schedule.
By restricting design alternatives, architecture channels the creativity of developers, reducing design and system complexity.
Architecture defines a set of constraints on subsequent implementation.

2.2 What parameters (inputs) are typically used in models for analyzing performance
Answer:
Parameters (inputs) for analytic modeling of performance (candidates):
Arrival rate of events
queuing discipline
scheduling algorithm
service time for events
network topology 
network bandwidth
routing algorithm 

2.3 What is the difference between reference architecture and an architectural pattern? 
Answer:

An important difference between a pattern and reference architecture is that a pattern must be a recurrent solution that was already used on existing implementations. On the other hand, reference architecture can propose new, innovative solutions in its structure, whose usage was not yet proven in existing software. As a consequence, reference architecture is more suitable to propose a structure for new domains, which are not still well established.

Patterns and reference architectures document solutions in different levels of granularity. While a pattern focus on a single problem and in a single recurrent solution, reference architecture usually considers the target domain as a whole.

Question:
Q.3. Write any five availability tactics for fault detection. Explain each one briefly. 

Answer
Below are the 5 availability tactics for fault detection:
Ping
– Client (or fault-detector) pings the server and gets response back
– To avoid less communication bandwidth- use hierarchy of fault-detectors,
the lowest one shares the same h/w as the server
Heartbeat
– Server periodically sends a signal
– Listeners listen for such heartbeat. Failure of heartbeat means that the server is dead
– Signal can have data (ATM sending the last txn)
Exception Detection
– Adding an Exception handler means error masking
Voting (TMR)
– Three identical copies of a module are connected to a voting system which compares outputs from all the three components. If there is an inconsistency in their outputs when subjected to the same input, the voting system reports error/inconsistency.
– Majority voting, or preferred component wins
Timer and Time-stamping
– If the running process does not reset the timer periodically, the timer triggers off and announces failure
- Time-stamping: assigns a timestamp (can be a count, based on the local clock) with a message in a decentralized message passing system. Used to detect inconsistency.


Question:
Q.4. What are the various forces which make Blackboard pattern more applicable for a navigation based system.

Answer:
Blackboard architectural pattern
This pattern is useful for problems for which no deterministic solution strategies are known. Several specialized subsystems assemble their knowledge to build a possibly partial or approximate solution.

In Simple words, the idea behind of this pattern is a collection of independent programs that work cooperatively on a common data structure. Each program is specialized for solving a particular part of the overall task, and all programs work together on the solutions.

Navigation based system
It comes under Robot control (navigation, environment learning, reasoning, destination route planning). Some successive sub goals are as.
     to decide on a sequence of places to visit.
     to compute the best route.
     to navigate with a constraint of rapidity.

Forces:
     A complete search of the solution space is not possible.
     Different algorithms to be used for partial solutions.
     One algorithm uses results of another algorithm.
     Input, intermediate data, output can have different representation.
     No strict sequence between algorithms, one can run them concurrently if required.

Benefits: 
     Experimentation- try with different strategies.
     Support for modifiability.
     Fault-tolerance even when the data is noisy.

Important Question

Question:
Difference between REST and SOAP. Explain REST in brief. 

Answer:
REST(REpresentational State Transfer):

REST is an architectural pattern where services are described using an uniform interface. RESTful services are viewed as a hypermedia resource. REST is stateless.

Difference:



Another paper for your reference:

2 comments:

  1. Can you please share Comprehensive paper for DSTN if available.

    ReplyDelete
  2. Very interesting information, worth recommending. However, I recommend this: הסכם קבלן שלד

    ReplyDelete