distribution and integration technologies › ~apm › tdin › docs › 01dist.pdf · distributed...
TRANSCRIPT
Distributed Architecture
Distribution and Integration
Technologies
Distributed Architectures
Patterns and Styles
APM@FEUP 1
Distributed Architecture
Distributed applications infrastructure
intranet
ISP
desktop computer:
backbone
satellite link
wireless
server:
network link: • inside an organization (intranet)
• with external clients
• between organizations
Mobile
wireless link:
laptops:
tablets:
smartphones:
APM@FEUP 2
Distributed Architecture
Ubiquitous computing / spontaneous network
Internet
gateway
Mobile
service
Music service
serviceDiscovery
Alarm
Camera
Guestsdevices
LaptopTV/PC
Internet
gateway service
Music service
serviceDiscovery
Alarm
Camera
Guestsdevices
LaptopTV/PC
Hotel / Shopping
wireless network
APM@FEUP 3
Distributed Architecture
Characteristics / challenges
❖ Heterogeneity▪ Use: many OSs, hardware, programming languages, frameworks, …
❖ Extensibility▪ Easy integration of new services, components, nodes, …
❖ Security▪ Protection: confidentiality, integrity, authentication, availability, …
❖ Scalability▪ Architecture: allow more users with more resources without degrading
❖ Fault tolerance and treatment▪ Response to communication, node, service faults and failures …,
❖ Concurrency▪ Several simultaneous clients and users
❖ Transparency▪ To the user and to the programmer
APM@FEUP 4
Distributed Architecture
Enterprise applications
Sales Marketing Client
Services
ITHuman
ResourcesProduction
Account
Management
Product
Distribution
Stock
Management
CRM
ERP
Departments
Front-office
Back-office
APM@FEUP 5
Distributed Architecture
Application logic architecture
Interface
Data
Business
Logic
Client tier Middle tier Data tier
APM@FEUP 6
Distributed Architecture
Tiered architecture
Pre
sen
tati
on
User
Inte
rface
Bu
sin
ess
Lo
gic
Data
Acce
ss
Data
Man
ag
em
en
t
an
d S
tora
ge
Presentation – Interface design and data visualization/input
LogicInterface Data
UI – Interaction and data transport to the business logic layer
Business – Data validation, manipulation, processing and security
Access – Data encapsulation and transformation to storage models/formats.
Extraction and storage actions.
Storage – DBMS’s and access drivers
APM@FEUP 7
Distributed Architecture
An enterprise application (detail)P
rese
nta
tio
n
La
ye
r
Se
rvic
es
La
ye
rB
us
ines
s
La
ye
r
Da
ta
La
ye
r
Service Interfaces Message Formats
UI Components
Presentation
Logic Components
Application Façade
Business
Workflows
Business
Entities
Business
Components
Data Access
Components
Data
Utilities
Cro
ss
Cu
ttin
g
Secu
rity
Co
mm
un
ica
tio
n
External
Applications
External
Services
Service
Agents
Data
Presentation
Entities
APM@FEUP 8
Distributed Architecture
Workflows / BPM
Services and Activities orchestration to form a business process
Business Workflow
Service Agent
Service Interface
Service Interface
Component
APM@FEUP 9
Distributed Architecture
Distributed architecture styles (1)
❖ Client / Server
▪ One half of the application (Client) emits requests to the other
half (Server)
▪ Client and Server execute in different processes in the same or
different machines
▪ Server can be client of other Servers
▪ Clients can obtain answers concurrently
▪ This style exists practically in every distributed application
APM@FEUP
Workstation Server
10
Distributed Architecture
❖ Component based architecture
▪ The application is decomposed in functional and reusable
portions exposing a known and defined interface
▪ The components can generally be installed in different
processes and can be remotely invoked using RPC
Distributed architecture styles (2)
Comp A
Comp B
Comp C
Comp D
Client
Process 1
Process 2
Process 3
APM@FEUP 11
Distributed Architecture
Components
Interface 1:
method 1
method 2
Interface 2:
method 3
method 4
Remote class 1
Interface 3:
method 5
method 6
Interface 4:
method 7
method 8
Remote class 2
Installation unit:
component (executable code file)
A middleware provides a functionality set
allowing the easy creation of new instances
of the remote classes and the invocation
of their methods (implementing transparent
RPC and other common services)
properties (general OO):
encapsulation
inheritance
polymorphism
component composition:
contention
aggregation
other properties:
binary specification
language independence
localization independence
APM@FEUP 12
Distributed Architecture
❖ Domain Driven
▪ Models the application following the business process and the
intervenient entities. The main application objects represent the
entities, with their state and behavior in the business process
(business entities or business objects)
Distributed architecture styles (3)
Business objects
APM@FEUP 13
Distributed Architecture
Business objects
State
Behavior
Interface Entities from the application logical model
Entity class
code
Entity class
code
Serialization
P1 P2 Creation
Initialization
Use of a
remote entity Transport channel
Remote entity
APM@FEUP 14
Distributed Architecture
❖ Layered Multi-Tiered Architecture
▪ The layered architecture divides the application functionality in
stacked groups that can communicate between them. A layer
becomes a tier if it can be installed in a separate machine.
Distributed architecture styles (4)
Browser
Web Server Application Server Database Server
DatabasePresentation
Business
Logic
Web Server
Presentation
Application Server
Business
Logic
Database Server
Database
Replication
Web Server
Presentation
Application Server
Business
Logic
APM@FEUP 15
Distributed Architecture
❖Message bus
▪ Applications are built in a way that can consume and expose
functionalities through message sending and receiving. They
must know only the message format and meaning and not the
specific details of the senders and receivers.
Distributed architecture styles (5)
Application A Application B
Application C
APM@FEUP 16
Distributed Architecture
❖ Service Oriented Architecture (SOA)
▪ The applications are built in a way to expose and consume
functionalities presented as services, using well defined
contracts (interfaces) and messages
Distributed architecture styles (6)
Service A
Service B Service D
Service EService C
Application
APM@FEUP 17
Distributed Architecture
Integration ways
Presentation
Interface
Presentation
Interface
Presentation
Interface
Logic
Logic
Logic
Logic
Data
Access
Logic
ApplicationsDBs
Messages
or
Services
Messages
or
Services
Data
Access
Data
Access
APM@FEUP 18
Distributed Architecture
Distribution models and ways
❖ Shared memory
▪ SMP systems, global variables, multithreading --- OpenMP
❖ Distributed shared memory
▪ Difficult to implement
▪ But simple programming
❖Mobile code
▪ Mobile agents, where code and data can move from node to node
❖Message passing
▪ Needs a communication channel
▪ Explicit sending and receiving
❖ Remote invocation – RPC
▪ Function invocation, similar to local calls
▪ Data is moved as parameters and results
▪ OO paradigm easy to achieve
APM@FEUP 19
Distributed Architecture
Remote invocation mechanism
Client Remote function
var = func_a( ... )
“proxy” of
func_a( ... )
“dispatcher” of
func_a( ... )
func_a( )
.
.
.
.
.
.
.
.
.
.
communication channel
marshalling
APM@FEUP 20
Distributed Architecture
Distributed platform architecture
Hardware
Operating System
communications
Middleware
Applications
External data representation
Protocols for calls and responses
Names and location
High level abstractions: RMI, events, ...
Middleware: - Implements a distributed programming model above processes,
communication channels and message passing;
- Isolates the hardware and the operating system, allowing
interoperability between different platforms;
- Supplies a high level of programming transparency, ‘emulating’
a local programming model;
APM@FEUP 21
APM@FEUP Distributed Architecture
Middleware function
Communication Network
Operating
System
Operating
System
Operating
System
Middleware Middleware Middleware
Application Application Application
specific API
standard API
22