Big architectures when to use Flashcards
What context/problem does the layered pattern solve? And what is the solution?
Context
*Complex systems
*Developers need to develop, evolve and maintain modules (portions) of the system independently
*Need a clear and well documented separation of concerns
Problem
*The software needs to be segmented
*little interaction among the parts, supporting portability, modifiability and reuse.
Solution
*the layered pattern divides the software into layers (units)
*each layer is a grouping of modules that offers a cohesive set of services
*The usage must be unidirectional (no upwards usages)
*layers completely partition a set of software, and each partition is exposed through a public interface.
What context does the MVC solve? And what is the solution?
Context
*User interface software
*Users often wish to look at data from different perspectives e.g. bar graph och pie chart
*The representations should reflect the current state of the data
Problem
*How can user interface functionality be kept separate from application functionality and still be responsive to user input or changes in data?
*How can different views be maintained when underlying data changes.
Solution
Separate application functionality into 3 different kinds of components
Model
*Contains application data
View
*Contains interface to interact with the user
*Some minor underlying data can be here
Controller
*Mediates between the model and view and manages notifications of state changes
*Transfer data between model and view components
What context does the Client-server solve? And what is the solution?
Context
*There are shared resources and services that large numbers of distributed clients wish to access, and for which we wish to control
access or quality of service
Problem
*By managing a set of shared resources and services we can promote modifiability and reuse , by factoring out common services
*We want to improve scalability and availability by centralizing the control of resources and services while distributing the
resources across multiple physical servers
Solutions
*Clients interact by requesting services of servers, which provide a set of services. Some components may act as both clients and
servers. There may be one central server or multiple distributed ones
What context does the Peer-to-Peer solve? And what is the solution?
Context
*Distributed computational entities - each equally important in terms of initiating an interaction and each of which provides its own
resources. Need to cooperate and collaborate to provide a service to a distributed community of users
Problem
*How can a set of “equal” distributed computational entities be connected to each other via a common protocol so that they can
organize and share their services with high availability and scalability.
Solution
*In P2P pattern, components directly interact as peers. All peers are “equal” meaning that no peer/group
of peers can be critical for the health of the system. Communication is typically a request/reply
interaction.
*Can see it as each client is a server as well. Meaning that there is no actual server. More like everyone is both a client and a server.
What context does the Service oriented architecture solve? And what is the solution?
Context
*A number of services are offered and described by service providers and consumed by service consumers. Service consumers
need to be able to understand and use these services without any detailed knowledge of their implementation.
Problem
*How can we support interoperability of distributed components running on different platforms and written in different
implementation languages, provided by different organizations, and distributed across the internet?
Solution
*The service-oriented architecture (SOA) pattern describes a collection of distributed components that provide and/or consume
services
What context does the Publish-Subscribe pattern solve? And what is the solution?
Context
*There are a number of independent producers and consumers of data that must interact.
*Their precise number and nature are not predetermined or fixed, nor is the data that they share.
Problem
*How can we create integration mechanisms that support the ability to transmit messages among the producers and consumers
so that they are unaware of each other’s identity, or potentially even their existence?
Solution
*In the publish-subscribe pattern, components interact via announced messages, or events
What context does the Shared-Data Pattern solve? And what is the solution?
Context
*Various computational components need to share and manipulate large amounts of data. This data does not belong solely to any
one of those components.
Problem
*How can systems store and manipulate persistent data that is accessed by multiple independent components?
Solution
*In the shared-data pattern, interaction is dominated by the exchange of persistent data between multiple data accessors and at
least one data-shared store. Exchange may be initiated by the accessors or the data store. The connector type is data reading and
writing.
What context does the Map-Reduce pattern solve? And what is the solution?
Context
*Businesses have a pressing need to quickly analyse enormous volumes of data they generate or access, at petabyte scale
Problem
*For many applications with ultra-large data sets, storing the data and then analyzing the grouped data is sufficient. The problem the map-reduce pattern solves is to efficiently perform a distributed and parallel sort of a large data set and provide a simple means for the programmer to specify the analysis to be done.
Solution: THE MAP-REDUCE PATTERN REQUIRES 3 PARTS
*A specialized infrastructure takes care of allocating software to the hardware nodes in a massively parallel computing environment and handles sorting the data as needed
*A programmer specified component called the map which filters the data to retrieve those items to be combined.
*A programmer specified component called reduce which combines the results of the map.
What context does the Multi-TIer pattern solve? And what is the solution?
Context
*In a distributed deployment, there is often a need to distribute a system’s infrastructure into distinct subsets
Problem
*How can we split the system into a number of computationally independent execution structures - groups of software and
hardware - connected by some communication media?
Solution
*The execution structures of many systems are organized as a set of logical groupings of components. Each grouping is termed a tier.
What context does the Broker pattern solve? And what is the solution?
Context
*Systems constructed from a collection of services distributed across multiple servers
*Complex to implement: you need to worry about how the systems will interoperate, how they connect and exchange information
as well as availability of the component servies
Problem
*How do we structure distributed software making it easy to dynamically change the bindings between users and providers?
Solution
*Separate users of services (clients) from providers of services (servers) by inserting an intermediary, called a broker. When a client needs a service, it queries a broker via a service interface. The broker then forwards the client’s services request to a server, which processes the request.
What context does the Pipe And Filter pattern solve? And what is the solution?
Context
*Systems required to transform streams of discrete data items, from input to output
*Many types of transformations occur repeatedly: it is desirable to create these as independent, reusable parts.
Problem
*Systems need to be divided into reusable, loosely coupled components with simple, generic interaction mechanisms.
*In this way they can be flexibly combined with each other, easily reused and execute in parallel (independent components)
Solution
*Is characterized by successive transformation of streams of data
*Data arrives at a filter’s input port(s), is transformed, and then is passed via its output port(s) through a pipe to the next filter.
*A single filter can consume data from, or produce data to, one or more ports.