Architectural patterns
Layered Pattern
defines layers and a unidirectional allowed-to-use relation among the layers, have to be at least two layers
REST connector (SOA)
relies on the basic request/reply operations of the HTTP protocol
ESB - Enterprise Service Bus (SOA)
routes messages between service consumers and service providers. In addition, an ESB can convert messages from one protocol or technology to another, perform various data transformations (e.g., format, content, splitting, merging), perform security checks, and manage transactions
Asynchronous messaging connector (SOA)
uses a messaging system to offer point-to-polnt or publish-subscribe asynchronous message exchanges
SOAP - Simple Object Access Protocol connector (SOA)
uses the SOAP protocol for synchronous communication between web services, typically over HTTP
Pipe-and-Filter Pattern
Data is transformed from a system's external inputs to its external outputs through a series of transformations performed by its filters connected by pipes
Broker pattern weaknesses
- Brokers add a layer of indirection and hence latency, between clients and servers, and that layer may be a communication bottleneck. - The broker can be a single point of ·failure. - A broker adds up-front complexity. - A broker may be a targe1 for security attacks. - A broker may be difficult to test
Map-Reduce Pattern weaknesses
- If you do not have large data sets, the overhead of map-reduce is not justified. - If you cannot divide your data set into stmiJar sized subsets, the advantages of parallelism are lost. - Operations that require multiple reduces are complex to orchestrate.
Peer-to-Peer Pattern weaknesses
- Managing security, data consistency, data/service availability, backup, and recovery are all more complex. - Small peer-to-peer systems may not be able to consistently achieve quality goars such as performance and avaHabilfty.
Service-Oriented Architecture Pattern weaknesses
- SOA-based systems are typically complex to build. - You don't control the evolution of independent services. -There is a performance overhead associated- with the middleware, and services may be performance bottlenecks, and typically do not provide performance guarantees.
Client-Server Pattern weaknesses
- Server can be a performance bottleneck. - Server can be a single point of failure. - Decisions about where to locate functionality (in the client or In the server) are often complex and costly to change after a system has been built.
Task Control
- Tasks communicates by sending messages to central server. - Server redirects messages to tasks that have registered to handle them. - The sender does not need to know the receiver. - Exceptions: Override current executing task. - Wiretapping: Messages can be intercepted (safety check). - Monitors: Read information and execute action if the data fulfil a certain criterion
Layered pattern weaknesses
- The addition of layers adds up-front cost and complexity to a system. - Layers contribute a performance penalty.
Model-View-Controller Pattern weaknesses
- The complexity may not be worth it for simple user interfaces. - The model, view, and controller abstractions may not be good fits for some user interface toolkits.
Pipe-and-Filter Pattern weaknesses
- The pipe-and-filter pattern is typically not a good choice for an interactive system. - Having large numbers of independent filters can add substantial amounts of computational overhead. - Pipe-and-fitter systems may not be appropriate for long-running computations.
Shared-Data Pattern weaknesses
- The shared-data store may be a performance bottleneck. - The shared-data store may be a sfngle point of failure. - Producers and consumers of data may be tightly coupled.
Publish-Subscribe Pattern weaknesses
- Typically increases latency and has a negative effect on scalability and predictability of message delivery time. - Less control over ordering of messages, and delivery of messages is not guaranteed,
Architectural pattern is, has and describes:
- is a package of design decisions that is found repeatedly in practice - has known properties that permit reuse, and - describes a class of architectures.
Peer-to-Peer Pattern
Computation is achieved by cooperating peers that request service from and provide services to one another across a network. Uses request/reply connector to connect to the peer network search for other peerst and invoke services from other peers. In some cases, the need for a reply is done away with.
Client-Server Pattern
Clients initiate interactions with servers, invoking services as needed from those servers and waiting for the results of those requests
Shared-Data Pattern
Communication between data accessors is mediated by a shared-data store. Control may be initiated by the data acc·essors or the data store. Data is made persistent by the data store.
Publish-Subscribe Pattern
Components publish and subscribe to events. When an event is announced by a component. the connector infrastructure dispatches the event to all registered subscribers.
Service-Oriented Architecture Pattern
Computation is achieved by a set of cooperating components that provide and/or consume services over a network. The computation is often described using a workflow language
Model-View-Controller Pattern
The MVC pattern breaks system functionality into three components: a model(application logic), a view(user interface), and a controller that mediates between the model and the view
Broker pattern
The broker pattern defines a runtime component, called a broker, that mediates the communication between a number of cllents and servers
Multi-tier Pattern
The execution structures of many systems are organized as a set of log.ical groupings of components. Each grouping is termed a tier. The grouping of components into tiers may be based on a variety of criteria, such as the type of component, sharing the same execution environment, or having the same runtime purpose.
Map-Reduce Pattern
The map-reduce pattern provides a framework for analyzing a large distributed set of data that will execute in parallet, on a set of processors. This parallelization allows for low latency and high availability. The map performs the extract and transform portions of the analysis and the reduce performs the loading of the results. For ex.: Google, facebook, eBay and Yahoo
Task Tree
The pattern uses hierarchical task trees: -Parent task initiate child tasks. -Can define temporal dependencies between pairs of tasks. -Task trees can be dynamically reconfigured at run-time: Add task, Remove task, Abort task, Etc.. -Traverse the tree from left to right, from top to bottom.
Blackboard
fits well for homogenous modules working together to solve a problem. For ex.: speech recognition. Consists of three components: - blackboard: a structured global memory containing objects from the solution space - knowledge sources: specialized modules with their own representation - control component: selects, configures and executes modules.