Lecture 18 Architecture Patterns
Lecture 18 Architecture Patterns
SAiP Chapter 13
Team 1 – Broker
Team 2 – Event Driven
Team 3 – Publish-Subscribe
Team 4 – Pipe-and-Filter
Team 5 – Map-Reduce
Team 6 – Microservices
<<uses>>
Change notification
State query
Receives model data Encapsulates application
Requests model data functions and data
Presents view Invocations
Events
J. Scott Hawker/R. Kuehl p. 21 © Len Bass, Paul Clements, Rick Kazman,
RIT
distributed under Creative Commons Attribution License
Software Engineering
MVC Solution - 1
Overview: The MVC pattern breaks system
functionality into three components: a model, a view,
and a controller that mediates between the model
and the view.
Elements:
The model is a representation of the application data
or state, and it contains (or provides an interface to)
application logic.
The view is a user interface component that either
produces a representation of the model for the user
or allows for some form of user input, or both.
The controller manages the interaction between the
model and the view, translating user actions into
changes to the model or changes to the view.
Connectors:
SOAP connector, which uses the SOAP
protocol for synchronous communication
between web services, typically over HTTP.
REST connector, which relies on the
basic request/reply operations of the HTTP
protocol.
Asynchronous messaging connector,
which uses a messaging system to offer
point-to-point or publish-subscribe
asynchronous message exchanges.
http://martinfowler.com/articles/microservices.html
http://www.enterpriseintegrationpatterns.com/patterns/messaging/PublishSubscribeChannel.html
Relations:
Deploy on is the relation between an instance of a map or
reduce function and the processor onto which it is installed.
Instantiate, monitor, and control is the relation between the
infrastructure and the instances of map and reduce.
Constraints:
The data to be analyzed must exist as a set of files.
Map functions are stateless and do not communicate with each
other.
The only communication between map reduce instances is the
data emitted from the map instances as <key, value> pairs.
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 similar sized subsets, the
advantages of parallelism are lost.
Operations that require multiple reduces are complex to
orchestrate.
J. Scott Hawker/R. Kuehl p. 66 © Len Bass, Paul Clements, Rick Kazman,
RIT
distributed under Creative Commons Attribution License
Software Engineering
Multi-Tier Pattern
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 communications
media?
Solution: The execution structures of many
systems are organized as a set of logical
groupings of components. Each grouping is
termed a tier.