Software Architecture Final
Describe each of the four sections suggested to document a design pattern. Briefly document one of the patterns selected in question 1. Don't select the Singleton. There is no need to include UML or pseudo code.
1) Name: Simply a descriptive name for the pattern. 2) Problem / Motivation: A description of the design problem the pattern addresses. Under what circumstances the pattern should be applied. 3) Solution: Describes the implementation of the pattern in a generic fashion i.e. the description is not able to solve the developer's specific problem. This description includes written text, UML diagrams, and sample code. 4) Consequences: In most cases the use of a pattern to solve a design problem places restrictions on the design employing the pattern. This section describes those 'consequences' and may offer suggestions as to alternative patterns that may better serve the specific design problem. For example, a Singleton can only be used to deploy thread safe services. Grader: The student's specific example should include these four sections.
What are the three important features of design patterns given in the slides?
1. Design patterns describe a design problem that occurs many times in software development, and 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.
Which of the four views is of most interest to the following stakeholder roles? Hint: See diagrams. 1. The SME. 2. Project Manager. 3. System Engineers. 4. System Integrators.
1. Logical 2. Development 3. Physical 4. Process why?
Which 4+1 view is most likely to be described using each of the following UML diagrams? Present 1 maybe 2 views per diagram type. 1. Class Diagrams: 2. Sequence Diagrams: 3. Deployment Diagrams: 4. Component Diagrams: 5. Activity Diagrams:
1. Logical view 2. Process view 3. Deployment view 4. Process (describing a process) and Logical 5. Process view
What are three categories of modifiability tactics described in the slides?
1. Minimize the negative effects of future changes to the system with extension points. 2. Tactics that reduce coupling between components. 3. With Architectural Patterns that enhance modifiability e.g. Factory patterns and deferred binding.
What are three ways that patterns enhance communication?
1. Patterns provide a common design vocabulary among the development team. 2. Patterns provide a shorthand for communicating complex ideas / principles. 3. Patterns are useful when documenting a design.
Which of the four views bests presents the following design information? 1. The assignment of processes to processors. 2. The object-oriented software design. 3. Interaction between components / objects. 4. The source code's package structure. 5. Achieving increased performance.
1. Physical 2. Logical 3. Process 4. Development 5. Process
Describe the façade pattern.
A Façade is an interface and implementing service class that implements a simple workflow whose implementation details are to be hidden from the service's clients. It is possible to implement multiple workflows in a single façade with one method implementing each workflow. The façade insulates the client from the complexities of the workflow implementation and from any changes made to the workflow's implementation.
1. Describe the meaning and differences between System Faults and System Failures
A failure occurs when the system is unable to deliver one or more of its design services to the users. A fault is a runtime problem that occurs during system's operations that does not necessarily result in a failure.
2. Describe the purpose of a Firewall.
A firewall is a device that manages network traffic between two networks, typically the public internet and a private subnetwork. A firewall is configured to block all network traffic between these networks except for traffic from the internet addressed to servers hosting publically accessible services as configured by the network's administrators.
1. Explain in a short paragraph how a load-balanced cluster works.
A load balanced cluster is a set of N processors, each of which provides the same services i.e. runs the same software. The cluster includes a 'load balancer' which is a simple device which assigns incoming requests to processors in the cluster. The balancer utilizes some algorithm that determines which processor to assign the next incoming request e.g. round-robin assigns request to P1, 2, 3, 1, 2, etc. (There is a picture in the doc but its not important)
What is the minimum number of processors needed to make the voting tactic work? Describe the reason for this.
A minimum of three processors are needed (although more can be used). This is because the voter compares three and faults the processor with the result that diverges from the other two. Obviously two processors would not work with this strategy.
1. Describe the purpose of the DMZ / perimeter subnet.
A perimeter subnet is an enterprise subnetwork that is accessible from the public internet through the network's Perimeter Firewall. It is called a perimeter subnet because it lies on the edge between the public internet and the enterprise's private network. Publically accessible servers are placed in the perimeter subnet and not in the enterprise' private network. Perimeter subnets are also called DMZ.
3. Describe what is meant by 'Address Translation' between public and private networks.
A publicly accessible service must be reachable at a public internet address. But to increase protection from threats from the internet, machines hosting those services are placed on private networks. The firewall provides an address translation mechanism that forwards network traffic aimed at a public server address to the private network address of the server in the enterprise network.
1. Describe how symmetric Single Key Encryption works.
A symmetric key is be used for both the encryption and decryption operation / algorithm described above in question 1.
Describe the problem of, and general solution to, secure message transfer over the internet.
A system has the requirement of securely transporting a private message over a public network channel (Socket). Because the channel is inherently insecure (i.e. a Man-In-The-Middle can observe the data as it moves from sender to receiver), the system needs a means of making the message unintelligible to the MITM. This requirement is met by encrypting the message at the sending end into unintelligible cypher text which is sent across the channel. The receiver decrypts the cypher text back into the original message.
3. How can performance of an individual service be scaled through tasks and multi-core microprocessors?
A task (thread) can be replicated across several cores (processors) in a multiprocessor to achieve increased performance though parallel execution of several task instances concurrently.
2. Describe the two types of tasks (task categories) described by the 4+1 process?
A task can be active or passive. An active task runs actively performing some application-specific processing. An active task may run continuously or be scheduled to run periodically. A passive task is executed in response to a trigger or event. A passive task may be configured to execute when a network message arrives. Or a passive task may be configured to execute when an internal software or hardware fault occurs.
What is a "Trend" in terms of a monitoring agent's operation? How might an agent use a trend? Think of and describe three examples of system metrics a monitoring agent can examine for trends? Note: a few are mentioned in the slides but others are possible. Use your imagination.
A trend is a series of measurements taken at regular intervals over time. For example, the number of calls dropped by a cellular network base station. The agent can monitor the trend for indicators of a potential fault in the system's operation. For example, the number of dropped calls increasing over time might indicate a problem with the base station's equipment (transmitters or receivers). Grader: Some possible responses are here, but others are possible. Students: These specific answers may appear on the exam. · A rising number of timing errors or retries on some operation. · Message response time in a client-server architecture. · An increase in the amount of application memory usage. · A sensor that detects mechanical problems such as vibrations in a motor or pump.
3. Describe the purpose of "Roles" in determining a client's access-rights to a service.
A user / client's identity in the system includes their role in the system's operations. Each client is assigned one or more roles. Each role identifies a system service the client is permitted to access. If the client attempts to access a service and they lack the role required by the service, the client will be denied access to the service.
Explain how the use of an interface decreases the coupling between the client and server's implementation.
Abstracting the service's public methods into an interface allows the architect to decouple the service definition from the service's implementation. Notice in the following diagram that the client now interacts with an interface. In practice, any implementation of the service can be provided to the client without any changes to the client's design. (images are in doc)
Which of the two (Façade or Mediator) would be the best fit for a Controller role?
Because it is intended to encapsulate complex business rules, the Mediator would be the better fit to implement a controller.
4. 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 service classes behind the facade. Façade is a structural pattern and describes a method of structuring / organizing several classes to encapsulate a single workflow. A workflow is a linear set of processing steps that produce the needed result or side-effect. Mediator is a behavioral pattern that describes a means of designing complex behaviors that make use of (delegates to or mediates between) several workflows. They seem similar but the differences lies in the complexity of service implemented by the class. If the service simply passes information 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, processed, and delegated to other services (facades), it is a Mediator
1. Describe container-based authorization.
Container based authorization are mechanisms built into the application deployment container (e.g. Tomcat) that verifies a client's access-rights before permitting the client access to the protected service. The service's configuration in the container includes the roles needed to access the service. Container-based authorization is easy to configure. It requires no special code in the service implementation to utilize role-based access-rights. However container-based authorization lacks flexibility in determining whether access is granted.
2. What category does the Singleton pattern belong to?
Creational
1. What are the three GOF categories?
Creational / Structural / Behavioral
How does the Process View contribute to the Development View?
Development View: The process view defines the executable files that implement the system's services. The classes that implement the services (processes) must be reflected in the software structure (development view). The executable file is a class that starts, configures, and provides a context for the service classes to execute. In many cases several service classes are managed by a single executable class.
3. What category does the Façade pattern belong to?
Structural
1. 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.
How the development view contributes to the physical view.
The development view defines Subsystems which are groupings of services into deployable units e.g. enclosure. the subsystems are often defined by hardware boundaries, each subsystem is packed in its own enclosures such as physical package containing hardware and software components
Describe the differences between Design Patterns and Architectural Patterns.
The difference lies in the granularity of the design problem being addressed. Design patterns describe solutions to design problems that occur at the component / class level. Design patterns describe a narrow slice of the design. Architectural patterns provide advice on how the overall system functions i.e. how services are dispatched, how information flows through the system. Architectural patterns describe broad system-wide aspects of the design.
3. How does this tactic accommodate scaling of the system's throughput (Performance)?
The system's performance can be scaled up by adding additional processors to the cluster. Additional processor roughly equates to addition request processing capacity. Naturally, this strategy of adding additional processors will not scale (1x, 2x, 3x, etc) indefinitely. There are always critical sections and shared resources which will block one or more processors when the resource comes into contention e.g. a shared database server.
2. How does PPK solve the key distribution problem?
Unlike Single Key Encryption, the public key can be openly distributed across unsecure channels. For example, the owner of the key pair can email their public key to anyone they wish to securely communicate with. Certificate Authorities (CA) is an organization that securely distributes pubic keys to the public in 'signed certificates'.
What are two types of interactions between the system and the user implemented in a GUI?
User Initiated: An action taken by the user triggers an interaction with the system e.g. a mouse or keyboard event. System Initiated: An action initiated by (or detected by) the system triggers an interaction with the user. For example, a process monitoring application detects a condition that requires operator attention may signal the user using a visual and/or audible alarm.
Describe the primary difference between the active and passive redundancy tactics?
With active redundancy, there are 2+ processors which receive each of the client's requests. The client uses the first response and ignores the others. Processors that have faulted will not respond to the client's requests. With passive redundancy, there is an active processor and standby processor(s). The active processor responds to the client's requests. The passive processor(s) do not. When the active processor faults the standby processor is required to take over request processing i.e. becomes the active processor. Passive redundancy assumes a monitoring agent that detects the faulted active processor and makes the standby processor active.
Name, describe, and provide specific examples of the two methods of measuring system performance presented in the slides.
Work Performed: The amount of work the system can execute usually measured over a time period e.g. transactions (units of work) processed per minute. Latency: The amount of time the system needs to respond to an event i.e. the amount of time between the arrival of and event and the execution of a handler routine e.g. the amount of time needed by a service to return a response after receiving a request. AKA Event Response Time
Basic UML Class and Component Diagrams will also be tested
hello mother
What design pattern is suggested to implement and encapsulate application workflows between the user and the system?
The design pattern is MVC i.e. Model, View, Controller.
Identify the type of coupling described by each of the following statements. 1. The correct operation of a component depends on the accuracy or frequency of the data it is provided to it. 2. A client component cannot operate until an instance of a server is created or located. 3. The correct operation of a service component depends on the order in which information is passed from its clients. 4. The correct operation of a component depends on the allocation of resources controlled by a different component. 5. A client must be aware of the physical address of its servers.
1. Quality of Service 2. Existence Of 3. Sequence Of 4. Resource Behavior Of 5. Location Of
What are the resource demand tactics used if the combined rate of essential and nonessential event processing exceeds the system's capacity? Hint: Must all events be processed?
1. Reduce the rate of delivery of nonessential events in favor of events containing important information. 2. If event delivery cannot be controlled, ignore nonessential events (to the extent possible) to free up processing capacity for the essential events
1. What is the meaning of "Regression Testing"?
1. Regression tests are designed to uncover faults that have been introduced into the system's implementation during construction (coding). Generally, these are faults in features / interfaces / services that were once working correctly but have been broken (regressed) during recent development activities.
1. Describe two caching tactics that can improve the system's performance.
1. Tactic 1: The system can maintain information read from files or the network in memory rather than retrieve it a second time from the slow I/O channel. This is especially true of read-only data where we do not have to worry about the copy of the data maintained in memory from becoming 'stale' when the external source changes. Tactic 2: The system can retain calculated / generated information rather than re-calculate each time it is needed.
What are the three categories of Availability Tactics?
1. Tactics that allow the system to detect system faults. 2. Tactics that allow the system to recover from system faults. 3. Tactics that allow the system to prevent system faults.
1. How is the public and private keys (PPK) used to encrypt data?
1. The PPK (aka RSA) algorithm relies on a utility to generate a 'key pair' that contains a matched set of public key and private key. The public key is intended to be distributed to anyone that wishes to communicate securely with the holder of the private key i.e. the pubic key is 'public'. The private key is to be held securely by the key owner. Each key (public or private) can be used to encrypt a message / data into cypher text that can only be decrypted using the alternate key. For example, to send a secure message, the sender would use the receiver's public key to encrypt the message into cypher text that can only be decrypted with the private key. The owner of the private key is assumed to securely hold their private key(s) so only the key holder is able to read the sender's message.
Describe two methods that can be used to synchronize the state of a new or restarted processor when it is introduced to its cluster.
1. The new processor can request the state from the active processors using network messages or some other inter-process communication. 2. The system's state can be maintained on, and recovered from, a shared repository (repository shared by all processors in the cluster) such as a database or replicated cache. https://apacheignite.readme.io/docs/cache-modes
What is wrong with the following singleton implementation?
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.
2. Describe the 4 steps involved with establishing a SSL connection.
1. The steps in this process have been described in the slides. a. The client (e.g. a browser) requests a SSL connection with the server. b. The Server provides the client its signed certificate that contains the server's public key. c. The client generates a shared symmetric key, encrypts the key with the server's public key, and send the encrypted shared key back to the server. The server decrypts the symmetric key with its private key. d. With the shared key held by both client and server, the data passed over the TCP socket can be encrypted / decrypted at both ends of the connection creating a secure communication channel.
Provide a brief description of the three goals of modifiability tactics.
1. To add new services without the need to modify the implementation of existing (working) services. 2. To make changes without modification of the system's existing architecture and high-level design. 3. Minimize the cost of development, testing, and deployment of new services.
1. Name and describe the two types of testing described in the slides?
1. Unit Testing: Testing of individual classes or components in the implementation. Integration Testing: Testing of the system as an integrated, functioning whole.
2. Which of these two is used to determine whether the system meets its non-functional requirements e.g. security or performance?
2. Non-functional testing is performed against the integrated system so would be considered an integration test.
2. Why is regression testing important when the project utilizes an iterative (incremental) software development process e.g. Scrum?
2. Regression testing is especially important in an incremental development process where new features are continually being added during each iteration and each new addition may break code that was added (and working) from a previous iteration.
2. What is the problem associated with caching data?
2. The danger of caching information is that the data can become stale. For example, if we cache data read from disk (e.g. from a database), there is the danger that some other process will update the data maintained in the DBMS and our cached version will be out of date. The same is true of calculated data. If we cache a calculation it is possible that the underlying values that contributed to the calculated value can change.
3. Why do we still need Shared Key Encryption (AES) when PPK is available?
Although PPK was revolutionary in encryption / decryption keys are used, the RSA encryption / decryption algorithm is computationally very expensive and too slow to be practically used to create secure communication channels. Single key encryption algorithms are an order of magnitude faster than PPK. However PPK plays an important role in establishing a secure channel by allowing the secure exchange of the encryption / decryption key using a public key. See the slides concerning SSL for detailed explanation of how this is accomplished.
4. How can performance of an individual service be scaled through processes and processing nodes?
An executable can be replicated across several processors (i.e. a cluster) to achieve increased performance and reliability i.e. load balanced cluster.
3. What is the relationship between executables and processes?
An executable file is 'executed' or 'run' in a process.
When are extension points needed in the system's design identified?
An extension is a feature identified by the SME / requirements that will not be included in the initial version of the system currently under development, but is expected to be included in future system releases. The extension point is placed into the design to make the eventual implementation less intrusive into the system's implementation i.e. less reworking of existing services when integrating the new service(s).
What is the meaning of the term "extension point" in a software design?
An extension point is a feature of the design intended to simplify the inclusion of new features into the system i.e. to extend the design to accommodate a future need with the least impact on the design / implementation of the current release.
2. Describe application-based authorization.
Application-based authorization are role-based checks that are implemented in the service's implementation. This involves embedding access-rights checks directly in the system's implementation by the software developer. This makes application-based authorization difficult to maintain. However, application-based authorization allows the developer to implement sophisticated rules for service access that goes beyond what can be accomplished using container-based approaches. For example, access control rules can include roles and the time of day when making a decision concerning access to controlled services.
2. How is a perimeter subnet established in the enterprise?
As described in the slides, the perimeter subnet lies between two firewalls: the perimeter firewall and private firewall. The perimeter firewall separates the DMZ from the public internet and provides address translation as described above. The internal firewall separates the DMZ from the enterprise's private network. The internal firewall prevents traffic that originates in the DMZ from accessing the private subnet. Its purpose is to protect against intruders that manage to break into the DMZ from having access to the private network.
1. Describe the meaning of Authentication.
Authentication refers to the establishing the identity of a client that wishes access to a protected service. This is most often accomplished by challenging the client to submit an id & password, but can be established using PPK and other techniques.
How does the facade pattern increases encapsulation in the system's design?
Encapsulation is the principle of 'information hiding'. In general OO terms, encapsulation is accomplished by making object's state (i.e. instance variables) private and forcing clients to access and manipulate an object's state through the class's public methods. Facades enhance a system's encapsulation by hiding from the client how a service is implemented. Service clients are presented the public interface methods. Behind the public interface is the private implementation of the service made up of one and likely several classes that work together to implement the service's workflows. The implementation of the service is encapsulated (hidden, is a black box) from the service clients.
3. Which of these tactics does not require a monitoring agent to implement?
Exceptions are generally used to detect and act on faults internally to the process, and doesn't rely on an external monitoring agent.
Describe each of Kruchten's Four Views of Architecture.
Grader: Please review the four views presented in the paper mentioned in the section slides. 1. Logical View: Presents the system service classes described by the problem domain and scenarios. Describes services as classes and components. Describes the relationships between services in terms of the responsibilities each has been assigned and their dependency on other services to fulfil those responsibilities. 2. Process View: 1) Describes the assignment of services to processes / executable programs. 2) Describes the interaction between processes to implement the given scenarios; usually via UML sequence diagrams. 3. Describes the optional use of tasks (threads) to describe scheduled activities needed to implement scenarios. 3. Development View: Presents system component from the implementation components i.e. packages, libraries, and other implementation artifacts. Can also presents a work breakdown (work-tasks), scheduling dependencies between work-tasks, and assignment of work-tasks to developers. 4. Physical View: Presents the assignment of components or subsystems (processes) onto processors (servers), network communication between processor, subnets, firewalls, physical locations, and other aspects of the system's deployment.
What is an example of how extension points can be incorporated into a design i.e. an example including the design patterns used.
Grader: There may be other valid examples... For example, the use of inheritance and polymorphism can be used to add new a new feature as a subclass of an existing abstract operation or command. For example, the use of an interface to decouple a service from its definition allowing the replacement of the service's implementation with little impact on the service's clients.
What type of system resources is almost always the bounding factor in a system's performance?
I/O: Transferring data into or from the system is almost always the bounding factor in its performance. For example, disks, network connections, serial devices, and human interfaces all operate at speeds that are several orders of magnitude slower than the processor.
2. Describe the relationship between the two in terms the System's Availability.
If the fault can be masked from the users by some recovery or preventative measure the system design has employed (a recovery or preventative tactic) the fault does not become a failure.
How does the Process View contribute to the Physical View?
Physical View: The executables 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. These assignments are driven by architectural decisions that support the system's non-functional requirements for performance, scalability, and reliability.
1. What is meant by Message Authentication?
Message authentication is a means of validating that the sender of a message is who they claim to be. For example, an organization wishes to send a legal document to a second party who in turn needs to authenticate the identity of message's sender. That is, the second party needs proof that the document was in fact created and sent by the sender and not an attempt to impersonate the sender.
2. Describe the meaning of Authorization.
Once the client's identity is established (authenticated) the system assigns the client a role describing what services the client is authorized to access.
2. What is the relationship between service classes (a class providing a service to external clients) and an executable (exe file, war file, others)?
One or more services are bundled (linked) into an executable.
1. Briefly describe the three Fault Detection Tactics discussed in class.
Ping / Echo, Heartbeat, & Exceptions Ping / Echo is the two phase protocol where the agent sends a 'ping' message to the component and the component replies with a 'yes I am' echo message. Heartbeat is a single message periodically sent by the monitored equipment to the agent i.e. once every minute. The agent detects a component failure when it stops receiving the component's heartbeat. Exceptions are a method of signaling a detected fault. Exceptions are typically associated with Handlers which are executed in response to the exception and perform some behavior designed to address or mitigate the effects of the fault.
2. Which of these tactics requires a two-phase exchange of messages between the monitoring agent and the component being monitored?
Ping/Echo requires two phase exchange.
What was the reason given in class / slides for partitioning Customer Management and Customer Reporting into two processes? What were the two options for deploying the two processes to obtain this goal?
Report generation is CPU intensive and will impact the performance (throughput) of customer lookup and management service requests if all three services are hosted in the same processor. By splitting into two processes, management and reporting can be hosted on separate processors. Another option is the reporting process can be scheduled at a lower priority and so will be preempted by the service process.
What type of software reusability does design patterns represent?
Reuse of solutions and of designs. Not the reuse of specific implementation, but of the motivation and general solution to a problem described in a way to allow the solution to be applied to specific implementations.
1. What is Secure Socket Layer (SSL)? Specifically describe the intrusion that SSL prevents.
SSL is a secure TCP socket (two-way communication channel) whose contents is encrypted on the sending side and decrypted on the receiving side. This prevents a man-in-the-middle from reading the message as it moves through the public internet.
Describe how multi-core processors are employed to increase a system's event processing rate.
Scaling. If the processor provides multiple cores, it can execute multiple threads concurrently (at the same time). In this situation multiple process threads can be used to handle multiple events simultaneously. This will in theory (but seldom in practice) increasing the event processing capacity linearly with the number of processors.
1. Describe the purpose of protected subnetworks.
Servers that maintain sensitive data (e.g. a database that maintains customer credit card records) cannot be maintained in the DMZ or the enterprise's private network. These sensitive servers must be protected from intrusions that originate from internet (DMZ) and from within the enterprise's private network (an "inside job" J). To facilitate the protection of these servers, the enterprise configures a third protected subnet where the sensitive servers are placed (see the slides).
What are three GOF design patterns that can be used to implement the Resource Management Tactics described in the slides?
Singleton Pattern Factory Pattern Object Pool Pattern
What are some of the qualities what we would use to judge the usability of a Graphical User Interface (GUI)?
Some mentioned in the slide are: 1. How many actions (selections, keyboard entries, etc.) does the user make to accomplish some task. For example, how many actions are needed to enter a customer? 2. How much training does it take for an average person to become efficient with the interface? 3. Does the interface protect / prevent the user from making irreversible mistakes? For example, deleting a customer or other information without first verifying the action.
Describe the Builder's role in the Dependency Injection pattern.
The Builders role is to build the system using the information in the configuration file. The developers create a configuration file that describes the system's composition in terms of clients and servers and the associations between them. The builder reads and processes this information in three steps: 1. The builder creates the service instances and maintains references to each. 2. The builder creates the client instances. Each client is described with the type (or name) of the services it needs to fulfill its responsibilities. 3. The builder connects (injects into) the client instances the server instances as references.
How the logical view contributes to the development view.
The Deployment View partitions the components and classes defined in the Logical View into Subsystems and Packages. Subsystems are groupings of services into deployable units e.g. enclosure. Packages are the mechanism used to organize source modules into cohesive (similar functionality) units e.g. Java's Packages.
Describe the difference between the Factory Method and Virtual Factory patterns.
The Factory Method pattern builds its products by providing a class with static methods, each of which produce a different type of the same product. For example, a GUIFactory.buildButton(int type) would use the type argument to determine which type of button is being requested by the client e.g. Windows = 1, OSX = 2, etc. The VirtualFactory pattern provides a concrete subclass per product type against a virtual public class that defines the products produced by the factories. For example, a Virtual GUIFactory class defines a number of virtual methods each of which produces a different product e.g. buildButton(), buildMenu(), etc. Each family of products (Windows, OSX, etc.) is built by a separate concrete subclass of the parent virtual e.g. WindowsGuiFactory.
What is the role of each category of class suggested by this pattern?
The Model describes the data being manipulated (CRUD) by the system. Views are presentations of the state of the models i.e. GUI screens that present the entity to the user. A Controller is an 'orchestrator' class that takes responsibility for implementing an application's workflows.
Describe the three responsibilities the Monitoring Agent has in implementing availability tactics?
The Monitoring Agent is responsible for: 1. Detecting: Monitoring the components under its supervision for faults. 2. Reporting: Reporting any faults detected. 3. Acting: Executing programmed actions designed to recover from or prevent the fault from becoming a failure.
Which category / categories does the Monitoring Agent fall into?
The Monitoring Agent plays a role in all three categories: 1. The MA, monitors the equipment or software, and detects when a fault has occurred. 2. After detecting a fault, the MA may take steps to recover from the fault e.g. removing a faulted processor from the cluster and rebooting. 3. The MA may monitor the system looking for trends that indicate a fault and take step from preventing the fault from occurring e.g. The MA may monitor the equipment for vibrations that indicate a pending mechanical failure and request its repair before the equipment actually fails.
2. How is PPK used to authenticate messages?
The PPK algorithm can be used to 'sign' the document. The sender can use their private key to encrypt the document into cypher text. Only the sender's public key can decrypt the cypher text back into the original document. In this way the receiver can be assured that the sender originated the document as only the sender has access to their private key.
Describing the Voting Tactic for fault detection.
The Voting Tactic is typically used in a Process Monitoring and Control application where the processor is presented with measurement as inputs, processes these inputs, and issues commands to the system e.g. aircraft flight control systems. The Voting Tactic utilizes multiple processor to execute identical process monitoring and a "voter" component that compares the commands issued by each processor. A processor that produces an output (command) that differs from the others, that processor is considered faulted and its output is ignored.
Name and describe the tactic / pattern would you use to make necessary changes to a service's interface while maintain the old version of the service interface for existing clients.
The bridge pattern is an object that is placed between existing clients and a service whose interface has been modified to the extent that existing clients will no longer compile / work against. It. The bridge class / object maintains the old service interface for existing clients and translates each of the old interfaces into a format that can be used to invoke the new service interfaces. The bridge is a stop-gap measure that allows a new service to be deployed without needing to modify possibly many client classes. The old version of the service should be kept running until all clients (possibly in different business units) are migrate to the new interfaces.
In this example, TaxCalculation uses Customer.getZipcode() and Purchase.getPrice() to calculate the amount of taxes to pay for the Order. How can this design be improved through the elimination of coupling between classes? (image in doc)
The coupling with TaxCalculation and the classes Customer & Purchase can be eliminated by passing the values needed from these classes instead of the classes themselves. (image is in doc) ayyye I got it right, take that groupMe
1. What is meant by public and private networks?
The internet standards define ranges of IP addresses that cannot be used to address publically accessible networks. For example, Class A networks fall into the range 10.xx.xx.xx and servers that are meant to host a publically accessible service cannot be assigned an address in this range. Enterprise and other private networks use this addresses range.
2. How does this tactic protect the system from the failure in the event of a single processor fault (Availability)?
The load balancer is also a monitoring agent capable of detecting when one of the cluster's processor has failed. This could be done using ping / echo. When a failed processor is detected, the balancer can suspend assigning request to that processor until such time as the fault is repaired and the processor becomes available. This tactic works when all of the processors are able to respond to incoming request i.e. are executing the same services
2. What is the problem to be overcome when using symmetric keys?
The main problem is 'shared key distribution' i.e. providing the key to both parties wishing to exchange secret messages. Assuming one of the two parties generates the key, the key must be sent to the other party across a secure channel (to keep MITM from obtaining the key and decrypting the cypher text). This is a classic Catch 22: We need a secure channel to distribute the key and can't establish the secure channel using symmetric keys until the key is distributed.
What is the difference between resource management via the Singleton and Object Pool design patterns? (This question may require researching)
The object maintained as a singleton is shared across the entire system so it must be thread-safe or must be restricted from being accessed by more than one thread at a time. Like the singleton, the object pool is a service that provides access to a service class for a client without requiring the objects be created and initialized before each use e.g. database connections are expensive to create and destroy. The difference between the patterns is that pools can be used to manage objects are not thread safe. In order to allow multiple requests / threads to be concurrently serviced, the object pool maintains a collection of N objects and an interface that allows clients to checkout (obtain an object), utilize, and checkin (return to the pool). (image of object pool in doc)
1. What does a Process represent?
The process is an operating system construct that can be started, halted, is scheduled for execution, and monitored.
2. How is a protected subnet established in the enterprise?
The protected subnet is connected to the DMZ through a third internal firewall. The internal firewall serves to prevent access from intrusion from both the DMZ and from the enterprise's private network.
How is the Physical View effect by non-functional requirements in the context of these quality attributes: Reliability / Performance / Scaling / Security.
The slides list several non-functional aspects of the system which are defined by the physical processors used to deploy the system. These are: Reliability: The inclusion of redundant processors for failover capabilities. Performance: The inclusion of replicated processing capacity to meet the current processing requirements e.g. TPM (Transactions per Minute). Scaling: The ability to add replicated processing capacity to meet future processing requirements. Security: Partitioning database and other repositories of sensitive information on separate networks from those hosting publically accessible web servers. (firewalls)
Provide an example of two availability tactics used together to implement a fault tolerant system. Hint: Fault Detection and Failure Recovery.
The system's design may use a detection tactic to identify a faulted processor / component, and use a recovery tactic to mask the fault from the overall system. For example, the agent may utilize ping/echo or heartbeat fault detection to identify the fault and then utilize passive redundancy to recover the system from the fault.
See Slides and Paper "Architectural Blueprints - The 4+1 View Model of Software Architecture" in Supplemental Materials and Section 5 & 10 Slides.
okay
