CS 4352 Midterm Exam

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

How is the Physical View effected by non-functional requirements?

*Availability:* The inclusion of redundant processors for failover capabilities. *Budget:* How much can be spent to deploy the system. *Performance:* The inclusion of sufficient processing capacity to meet the current processing requirements e.g. TPM (Transactions per Minute). *Scaling:* The ability to add additional processing capacity to meet future processing requirements. *Security:* Partitioning database and other repositories of sensitive information from publically accessible web servers.

Describe each of Kruchten's Four = Structure (Views) of Architecture.

1. *Logical View:* Presents the system entities described by the problem domain. Describes the classes and relationships between classes in terms of the services / responsibilities each has been assigned. 2. *Development View:* Presents system component from the implementation components i.e. packages, components, libraries, and other implementation artifacts. Also presents the task breakdown, scheduling, task dependency, and assignment of tasks to developers. 3. *Process View:* Describes the assignment of services to processes/executable programs. Describes the use of threads, communication paths between processes and the information that is passed. 4. *Physical View:* Presents the assignment of components or subsystems (processes) onto processors (servers), communication (e.g. network) channels, physical locations, and other aspects of the system's deployment.

Describe the two categories of recommendations provided by the book for designing a 'good' architecture.

1. *Process* refers to the activities and 'process' an organization follows when developing the architecture for a new system or application. This is similar to the SDLC processes we studied in Software Engineering. 2. *Structural* refers to recommendations on how to design and ultimately construct the architecture. Structure refers to the system's design, which patterns are used, and other software engineering best practices e.g. encapsulation and loose coupling.

What are the three GOF categories?

1. Creational 2. Structural 3. Behavioral

What are the three important features of design patterns given in the slides?

1. Design patterns describe a design problem which occurs over and over again in software development, and also describes the core of a solution to that problem. 2. Design patterns are a mechanism used to capture the experience of software designers and record those experiences for their peers. 3. Design patterns are a tool used to communicate designs at a higher level than text, diagrams, or code.

What are the seven activities the architect (role) performs during the software development lifecycle?

1. Helping to understand the system's business case. 2. Capturing (and understanding) the system's requirements. 3. Building the system's architecture. 4. Communicating the architecture to the organization. 5. Evaluating alternative system architectures for the best approach. 6. Implementing the system. 7. Ensuring the implementation conforms to the architecture.

Give two examples of the use of patterns in Java's SDK libraries? Name the pattern and describe where it is used.

1. Iterator : Is used in the java.util collections package. 2. Observer : Is used in the Swing library. 3. MVC : Is used in the Swing library. 4. Object Pools : Used in JDBC for Connection Pools. 5. Others are possible and will be evaluated on demand.

What are the three types of 'scenarios' discussed in class? Which type is described as the Happy Path?

1. Main Success Scenario (Happy Path) 2. Alternative Success Scenarios 3. Alternative Failure Scenarios

What are two important features of a Pipes and Filter design?

1. The design of the filter is based on its transformation of input into output data. Its design should not depend on the implementation of its upstream or downstream filters. 2. Filters should be simple and cohesive. Each filter should do "one thing" in the design. 3. Filters should be designed for reuse, both within the system and perhaps in different systems. 4. Filters should be replaceable. A filter's implementation can be substituted with a different design/implementation so long as the data it accepts and produces, and its processing algorithm remains constant across all implementations.

Give three examples of how an organization's previous investments or experiences can affect decisions concerning the design of a new application, service, product or other development effort.

1. The organization will have an investment in specific hardware, operating system, or services. For example, they may have invested in Linux or Windows. They may have invested in Oracle or MS SQL Server DBMS. 2. The organization will be staffed with developers and other support personnel that are trained with specific technologies. For example, a staff that is experienced with Java, C++, or .NET languages and tools. 3. The staff's expertise may extend to specific frameworks within a technology. For example, the use of JEE or Spring frameworks (these are Java-based frameworks used to assemble and deploy systems). 4. The organization may have invested in an internally developed framework which they want to reuse in new development. 5. The organization may wish to leverage an existing system, hoping to extend the existing system to meet future needs.

What four questions are asked of Figure 2.1?

1. What is the *nature of the elements*? 2. What are the *responsibilities of the elements*? 3. What is the *significance of the connections*? 4. What is the *significance of the layout*?

Which of the four views bests presents the following design information? The assignment of processes to processors.

Physical

Which of the four views is of most interest to the following stakeholder roles? System Engineers.

Physical

What four 'things' influence the design of an architecture as described in the book in Chapter 1?

1. the system stakeholders 2. the development organization 3. the background and experiences of the architects 4. the technical environment i.e. current trends in technology and design

*** Answer each of these questions based on A. Each answer does not need to be detailed, but it should be specific to your selection.

???

***These assignments are driven by architectural decisions that support the system's non-functional requirements for performance, scalability, and reliability. Also Understand for Exam: How the logical view contributes to the development view. How the development view contributes to the physical view.

???

What is the major difference between designs that use Client-Server vs. Pipes and Filters in how information is processed?

A design that uses client-server typically 1) uses a single thread to respond to the client's request and 2) returns a value to the client when request processing is complete. A design that uses pipes & filters (dataflow) uses several independent processing stages (filters) each of which execute in its own thread. Filters are connected by communication "pipes" that pass messages from one connected stage to the next. In a P&F design, messages pass from one stage to the next in a one-way processing flow. It is difficult to arrange for a result to be provided to a client. In fact, it is incorrect to think of clients and servers in these designs.

How can performance and scalability be improved with each of these?

A process can be replicated across several processors to achieve increased performance and reliability. A task (thread) can be executed on a multi-core processor to achieve increased performance though parallel execution of several task instances concurrently.

What artifact must be produced before the views can be designed?

A set of scenarios that describe the system's requirements.

Describe why a client-server control strategy can be applied to a wider range of design problems than pipes and filters.

Because many systems require a request - response interaction between a client and server component. For example, between a user and the system (web applications).

Describe why a design based on pipes and filters will likely have better cohesion and will be easier to understand and maintain than many client-server designs.

Because pipes and filters work best with a problem whose solution can be divided into separate processing steps (filters). Filters should be focused on a single data processing operation and should not share state with other filters in the system. These restrictions are almost the definition of high cohesion and loose coupling

What category does the Mediator pattern belong to?

Behavioral

Describe the conceptual differences between the Façade and Mediator design patterns.

Both classes suggest a method of creating a composite service that utilizes (delegates to) one or more behind the scene services classes. Façade is a structural pattern and describes a method of structuring/organizing a number of objects to implement a service. The Façade is the interface provided to a client which hides from the client the services being accessed. Mediator is a behavioral pattern and describes a means of designing a complex behavior that uses (delegates to or mediates between) several services. They seem similar but the differences lies in the complexity of service implemented by the class. If the service simply passes information to the delegate classes without any decisions (a simple workflow), it is a Façade. If the service encapsulates business rules and makes decisions about how information is gathered and processed, it is a Mediator.

Why is it important that a service's implementation deployed as a Singleton be stateless?

Careful consideration should be made to using the singleton design pattern for a service that is stateful. That is, a service class which maintains a state (instance variables). Consider that the single object instance will be accessed concurrently by multiple threads and it may be possible that the state of the object may be corrupted by overlapping access to the object's services (methods). The safest, most certain method of ensuring that these types of problems do not occur is to utilize only stateless services as singletons. If a stateful service is to be deployed as a singleton, then the service's implementation must be thread safe i.e. its implementation must be protected by critical sections. Because multiple clients will be sharing the same (single) instance it is possible that multiple threads will be also be interacting with the same instance. For this reason it is important that the class design be either free from race-conditions, or that any methods that are susceptible to race-conditions be protected by a critical section (synchronized). When deploying stateful services, an alternative to the Singleton is the use of the Object Pool design pattern. Object pools allow each client's request to have exclusive access to a service object while eliminating the need to create a new service object (instance) for every client request.

Which of the following best describes a 'uses' relationship between components. 1. Client-Server 2. Shared Memory 3. Asynchronous Messages 4. None of the above

Client-server describes the situation where the client uses the server to request a service provided by the server.

Which of the hierarchical views (System, Service, or Component) best describes the follow aspects of the system's design? Most useful when communicating the system's design to the developers.

Component

Which of the hierarchical views (System, Service, or Component) best describes the follow aspects of the system's design? The classes and relationships between classes that make up the system's design.

Component

What is the purpose of decomposing a system into sub-systems/components?

Component decomposition describes how the designer decomposes (divides) complex problems, systems, components, etc. into smaller, less complex units. If properly decomposed (i.e. cohesively and loosely coupled), then each of these simpler components can be independently designed and constructed reducing the conceptual load on the individual.

What category does the Singleton pattern belong to?

Creational

Which view is most likely to be described using each of the following UML diagrams? Hint: Present one view per diagram. Deployment Diagrams

Deployment View

Which of the four views bests presents the following design information? The source code's package structure.

Development

Which of the four views is of most interest to the following stakeholder roles? Project Manager.

Development

Describe how the Batch Processing strategy can be used to delay data processing until off-peak hour.

During the system's busy hour, work (data) can be collected into a batch e.g. a file or database. Processing of the batch can be scheduled during off peak hours to make better use of the enterprise compute resources (either on-site or in the cloud).

Briefly describe a filter's processing loop.

Each filter has a separate thread that executes a simple processing loop: 1. Read a new data item from its input pipe. The filter thread will block if there are not data elements in the filter's input pipe. 2. Process the input item producing an output item, 3. Write the output item to its output pipe.

Provide a brief description of ETL. What are its advantage and disadvantage?

Extract, Transform, Load is a strategy where existing data sources can be repurposed to meet the requirements of new applications. An ETL extracts and aggregates information from one (and usually several) enterprise databases. The extracted data is stored in a separate application-specific database. The advantage of an ETL is that new applications can be installed that utilize existing enterprise database without the need to modify either the legacy databases or the legacy application that maintain the data. The disadvantage of an ETL is that the extracted data is not real-time i.e. it reflects the state of the enterprise that existed when the ETL was performed.

Identify requirement as being functional or non-functional: The customer must register and sign in before they can checkout.

Functional

Identify requirement as being functional or non-functional: The site will organize the customer's browsing experience according to product categories.

Functional

Identify requirement as being functional or non-functional: The site will present the user with a personalized home page containing items they examined on past sessions.

Functional

Describe how component decomposition increases the reusability of the used (server) component.

If we include the implementation of the service in a single component we will have embedded the service's implementation in the same component requiring the service. What if the service is needed by a second or third component in the design? Do we duplicate the service in each of the component requiring the service? Duplicating code is always a poor decision as it increases the size of the code base and makes maintaining (bug fixes, etc.) the service error prone. When we decompose the service into a client and server, we can reuse the service in other situations. That is, we make the service (server) available to other clients in the system's design. This produces a system that is easier to maintain and opens the possibility of reusing the service in other systems.

Which view is most likely to be described using each of the following UML diagrams? Hint: Present one view per diagram. Component Diagrams

Implementation (also Logical)

What was the reason given in class for partitioning Customer Management and Customer Reporting into two processes?

It was felt that Reporting is CPU intensive and report generation would impact the performance (throughput) of customer management requests. Hosting these services on separate processors would minimize the impact of report generation on other critical system services.

Which of the four views bests presents the following design information? The object-oriented software design.

Logical

Which of the four views is of most interest to the following stakeholder roles? The SME.

Logical

Which view is most likely to be described using each of the following UML diagrams? Hint: Present one view per diagram. Class Diagrams

Logical view

What is Miller's Law?

Miller's Law describes how the average person can only maintain 7±2 ideas, tasks, objects, etc. in their short-term memory.

Identify requirement as being functional or non-functional: The site will provide 99.999 percent uptime.

Non-functional

Identify requirement as being functional or non-functional: The site will respond to all requests within three seconds on average.

Non-functional

What is the difference between designs that use Pipes and Filters vs. Batch Processing in how information is processed?

P&F and Batch designs share a common theme of processing stages, interconnected by communication channels, that process messages provided by upstream processes and provide messages to downstream processes. However, there are these differences: 1. In a P&F design, the processes are likely implemented as threaded (active) objects. Messages are processed as they arrive (in realtime) and data flows continuously though the network of filters. 2. In a batch design, the processes are likely entire applications. Each application is executed with an input and output repository (files, databases, etc.). Each application reads information from its input and writes results to its output repository. Each application processes the entire contents of its input repository before exiting. Each application runs separately (not concurrently).

Which of the four views bests presents the following design information? Achieving increased performance.

Process

Which of the four views bests presents the following design information? Interacting Objects.

Process

Which of the four views is of most interest to the following stakeholder roles? System Integrators.

Process

Which view is most likely to be described using each of the following UML diagrams? Hint: Present one view per diagram. Activity Diagrams

Process View

Which view is most likely to be described using each of the following UML diagrams? Hint: Present one view per diagram. Sequence Diagrams

Process View

What type of software reusability do design patterns represent?

Reuse of solutions and of designs.

Which of the hierarchical views (System, Service, or Component) best describes the follow aspects of the system's design? The decomposition of the system's overall functionality into categories of related functionality.

Service

What category does the Façade pattern belong to?

Structural

Provide an example of a problem domain and a stakeholder not described in class.

Surgical Robots and the doctor / patient

Which of the hierarchical views (System, Service, or Component) best describes the follow aspects of the system's design? Most useful when communicating the system's design to the SME.

System

Which of the hierarchical views (System, Service, or Component) best describes the follow aspects of the system's design? The processors and other hardware that make up the system's design.

System

What does a task represent?

Tasks represent a thread that executes in the context of a process. A process can host multiple tasks (threads) each of which execute their own instructions and data.

Describe the differences between the views of the system held by architects vs. developers.

The *architect* has a broad and shallow view of the system. The architect takes a broad view that is concerned with understanding and accommodating all of the features required by the customer. However, because most architects are mere mortals they cannot internalize and understand the design and implementation of each of these features. The *developer* has a narrow and deep view of the system. Each of the several developers working on a project assumes responsibility for the design and implementation (delivering) of several of those features. Design and implementation requires a deep and detailed understanding of the features requirements, code design, etc. However, developers tend to ignore the design and implementation of those features they are not responsible for.

Describe at a high level the responsibilities and relationships between the Enterprise Architect and the Application Architect?

The *enterprise architect* is concerned with the design of enterprise-wide IT infrastructure i.e. systems or services. These may be communication systems (networks) or databases that are used by all of the enterprise's applications. The enterprise architect is also concerned with mandating the development practices and tools that are used to build the enterprise's application. The *application architect* is concerned with the design and delivery of applications that will execute within the enterprise's IT infrastructure. The application architect gathers requirements and design an architecture for a single, specific application.

What is the name given to the specific stakeholder(s) that is the primary source of system features and requirements?

The Subject Matter Expert (SME)

*** What are the suggested sections needed to document a design pattern? Briefly document one of the patterns selected in question 5. Don't select the Singleton. There is no need to include UML or pseudo code.

The answer should capture the four sections 1. Name 2. Problem / Motivation 3. Solution 4. Consequences

How are the designs produced by the application architect constrained by the enterprise architecture?

The application architect works with the tools and policies dictated by the enterprise architects. Their designs must use approved technologies such as technology stacks (Linux/Java vs Windows/.net), vendors (Oracle, MS, etc.), designs, infrastructure services provided by the enterprise, entities, and enterprise-specific business rules.

Provide an example of an architect's prior experience that can influence the decisions they make when designing the architecture of a new system.

The experiences the architect had with a particular technology in a previous project/architecture. If the project was successful, the architect may wish to utilize the same design in a new project, especially if the new project is similar to the previous successful project.

Describe how a Message Queue maintained by a Message Server (Message Oriented Middleware) can be used to implement a batch processing system.

The message queue can be 'backed' by a DBMS and have the capacity to hold many thousands of messages. External message Producers can put messages into the queue that will be safely stored until later when retrieved by the message queue's Consumer. It is interesting to note that the Consumers can be activated during specific scheduled times e.g. off peak hours where Consumers pull and process each of the messages (work items) that have been stored throughout the day.

What does a process represent?

The process is an operating system construct that the system can control. The process is an executable module that can be started, monitored, halted, etc.

How does the Process View contribute to the Development View?

The process view defines the executable modules that host the system's services. The classes that implement the services (processes) must be reflected in the software structure (development view). The executable module is a class that starts, configures, and provides a context for the service classes. In most cases several service classes are managed by a single executable class.

How is the Process View affected by non-functional requirements?

The process view is concerned with the satisfaction of performance, scaling, and reliability (non-functional) requirements. It does this by creating of process and tasks that hosts services that can be executed in parallel or redundantly across multiple processes or processors. Services can be scaled by adding additional processes hosted on separate processors.

How does the Process View contribute to the Physical View?

The processes identified in the process view are the units of deployment in the physical view. Each executable process is assigned to one or more machines and each machine may host one or more executable processes.

Briefly describe the three-tier architecture and the types of services each tier is supposed to implement.

The three-tier architecture describes how application/system designs should be partitioned along three types of services that are usually required by a web application, or any application that provides both a user interface and uses a database to maintain persistent information. These tiers are: 1. *Presentation:* Components that implement GUI/user interface services i.e. services that present information to the user. 2. *Business (Application):* Components that implement application/business logic including data validation, workflows, report generation, controllers, and others. 3. *Service (Data/Persistence):* Components that provides the services needed to persist (save and retrieve) application data to/from a database server. This tier also contains services that act as proxies to external services used by the system.

What is wrong with the following singleton implementation? There are at least two problems.

There are two things wrong: 1. The singleton CustomerDAOImpl does not declare either the singleton attribute static or the getSingleton() accessor method static. Both must be static for the pattern to work. 2. The CustomerDAOImpl constructor is public. It should be private so that the only the singleton accessor can be used to "get" instances of the singleton.

***What type of system what do you think is being described in Figure 2.1 in the book? Product, device, instrument, vehicle, whatever. There is no incorrect answer but be generally specific.

There is no incorrect answer.

T/F: The components of a software architecture should provide a black-box view of the services they implement.

True. A black-view of a component means that external components cannot see inside the target component i.e. external components cannot see the implementation of the services provided by the target component.

What is the name of the mechanism we use to describe the individual services provided by a component to its clients? Hint: The mechanism is typically used to decouple the definition of a service from its implementation

We use an 'interface' to describe the services a component provides to its clients.

Describe how component decomposition increases the cohesion of the using (client) component.

When a component's design requires a service to fulfil its responsibilities we have two options: 1. Implement the service in the component or 2. Decompose the component into two components (client and server) and delegate the service implementation to the server component. If we choose the first option, we are likely creating a component that lacks cohesion i.e. a component whose implementation is large and includes too many responsibilities and will likely become large (lines of code), complex, and difficult to maintain. When we decompose into two components, each component (class) has its own set of focused responsibilities which produces software components that are more easily (individually) understood and maintained. This leads to an overall better software design.

What is the definition of a System's Stakeholder?

anyone who has an interest in seeing the successful delivery of the system

Think of, and describe, a problem domain and an example of a compromise between available resources and customer's desired features in determining a system's design.

the client's desire for a system with more features than can be produced with the resources the client has allocated to the effort e.g. money and/or time.


Kaugnay na mga set ng pag-aaral

7 ARTICLES OF THE US CONSTITUTION

View Set

The Art of Public Speaking - Chapter 9

View Set

Bio Exam 2 (Chpt. 6, 7, 8, & 10)

View Set

5.1: Network Troubleshooting Methodology, 5.2: Hardware & Software Tools, 5.2: Command Line Tools, 5.3: Common Wired Connectivity and Performance Issues, 5.4: Common Wireless Connectivity and Performance Issues, 5.5: Common Network Service Issues

View Set

Roles and responsibilities in a formal review

View Set

CP: Theories of Reasoned Action & Planned Behavior

View Set

Macroeconomics Final Exam (official)

View Set