0% found this document useful (0 votes)
65 views33 pages

Chap 13 PDF

The document discusses three patterns: Client-Server, Service Oriented Architecture (SOA), and Map-Reduce. The Client-Server pattern describes a model where clients request services from servers. SOA describes a collection of distributed components that provide and consume services. The Map-Reduce pattern provides a framework for parallel processing and analysis of large datasets. It uses a map function to extract and transform data, and a reduce function to combine the results.

Uploaded by

Naima Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
65 views33 pages

Chap 13 PDF

The document discusses three patterns: Client-Server, Service Oriented Architecture (SOA), and Map-Reduce. The Client-Server pattern describes a model where clients request services from servers. SOA describes a collection of distributed components that provide and consume services. The Map-Reduce pattern provides a framework for parallel processing and analysis of large datasets. It uses a map function to extract and transform data, and a reduce function to combine the results.

Uploaded by

Naima Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Software Design and

Architecture
Chapter 13: Patterns and Tactics
-Client-Server Pattern
-Service Oriented Architecture
-Map-Reduce Pattern
Client-Server Pattern

• 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.
Client-Server Pattern

• Problem: By managing a set of shared resources and services, we can promote


modifiability and reuse, by factoring out common services and having to modify
these in a single location, or a small number of locations. We want to improve
scalability and availability by centralizing the control of these resources and
services, while distributing the resources themselves across multiple physical
servers.
Client-Server Pattern

• Solution: 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.

--The Clients initiate interactions with servers, invoking services as needed from
those servers and waiting for the results of those requests.
Client-Server Example
Client-Server Example
Client-Server Solution

• Elements:
– Client, a component that invokes services of a server component. Clients have
ports that describe the services they require.
– Server: a component that provides services to clients. Servers have ports that
describe the services they provide.
Client-Server Solution

• 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.
▰Usage
▰Online applications such as email, document sharing and banking
Service Oriented Architecture
What Is Service-Oriented Architecture?

▰Service-Oriented Architecture (SOA) is a style of software design where services


are provided to the other components by application components, through a
communication protocol over a network. Its principles are independent of vendors
and other technologies. In service oriented architecture, a number of services
communicate with each other, in one of two ways: through passing data or
through two or more services coordinating an activity.
Service Oriented Architecture

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.
Service Oriented Architecture

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.
Service Oriented Architecture
Service Oriented Architecture Solution

– Components:
• Service providers, which provide one or more services through
published interfaces.
• Service consumers, which invoke services directly or through an
intermediary.
• Service providers may also be service consumers.
Guiding Principles of SOA:

▰Standardized service contract: Specified through one or more service description documents.
▰Loose coupling: Services are designed as self-contained components, maintain relationships that minimize
dependencies on other services.
▰Abstraction: A service is completely defined by service contracts and description documents. They hide their
logic, which is encapsulated within their implementation.
▰Reusability: Designed as components, services can be reused more effectively, thus reducing development
time and the associated costs.
▰Autonomy: Services have control over the logic they encapsulate and, from a service consumer point of view,
there is no need to know about their implementation.
▰Discoverability: Services are defined by description documents that constitute supplemental metadata
through which they can be effectively discovered. Service discovery provides an effective means for utilizing
third-party resources.
▰Composability: Using services as building blocks, sophisticated and complex operations can be implemented.
Service orchestration and choreography provide a solid support for composing services and achieving business
goals.
Why Service-Oriented Architecture Is Important
Advantages of SOA:

▰Service reusability: In SOA, applications are made from existing services. Thus,
services can be reused to make many applications.
▰Easy maintenance: As services are independent of each other they can be
updated and modified easily without affecting other services.
▰Platform independant: SOA allows making a complex application by combining
services picked from different sources, independent of the platform.
▰Availability: SOA facilities are easily available to anyone on request.
▰Reliability: SOA applications are more reliable because it is easy to debug small
services rather than huge codes
▰Scalability: Services can run on different servers within an environment, this
increases scalability
Disadvantages of SOA:

▰High overhead: A validation of input parameters of services is done whenever


services interact this decreases performance as it increases load and response
time.
▰High investment: A huge initial investment is required for SOA.
▰Complex service management: When services interact they exchange
messages to tasks. the number of messages may go in millions. It becomes a
cumbersome task to handle a large number of messages.
Practical applications of SOA:

▰SOA infrastructure is used by many armies and air force to deploy situational
awareness systems.
▰SOA is used to improve the healthcare delivery.
▰Nowadays many apps are games and they use inbuilt functions to run. For
example, an app might need GPS so it uses inbuilt GPS functions of the device.
This is SOA in mobile solutions.
Service Oriented Architecture Solution

Weaknesses:

– SOA-based systems are typically complex to build.

– There is a performance overhead associated with the middleware, and services


may be performance bottlenecks, and typically do not provide performance
guarantees.
Map-Reduce Pattern
Map-Reduce Pattern

Context: Businesses have a pressing need to quickly analyze enormous volumes of


data they generate or access, at petabyte scale.

Problem: For many applications with ultra-large data sets, sorting 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.
Map-Reduce Pattern
Map-Reduce Pattern

• Overview: The map-reduce pattern provides a framework for analyzing a large


distributed set of data that will execute in parallel, 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.
Map-Reduce Pattern

• Solution: The map-reduce pattern requires three 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.
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 similar sized subsets, the advantages of
parallelism are lost.
Map-Reduce Pattern

• Elements:
– Map is a function with multiple instances deployed across multiple
processors that performs the extract and transformation portions of
the analysis.
– Reduce is a function that may be deployed as a single instance or as
multiple instances across processors to perform the load portion of
extract-transform-load.
– The infrastructure is the framework responsible for deploying map and
reduce instances, shepherding the data between them, and detecting
and recovering from failure.

You might also like