SlideShare ist ein Scribd-Unternehmen logo
1 von 36
SOFTWARE ARCHITECTURE PATTERNS
INGEGNERIA DEL SOFTWARE
Università degli Studi di Padova
Dipartimento di Matematica
Corso di Laurea in Informatica, A.A. 2015 – 2016
rcardin@math.unipd.it
Ingegneria del software mod. B
SUMMARY
 Introduction
 Layered architecture
 Event-driven architecture
 Microservices architecture
2Riccardo Cardin
Ingegneria del software mod. B
INTRODUCTION
 Applications lacking a formal architecture are
generally coupled, brittle, difficult to change
 Modules result in a collection of unorganized
 Big ball of mud antipattern
 Deployment and maintenance problems
 Does the architecture scale? How does application response
to changes? What are the deployment characteristics?
 Architecture patterns
 Helps to manage these aspects, knowing the
characteristics, strengths and weakness
3Riccardo Cardin
Ingegneria del software mod. B
LAYERED ARCHITECTURE
 Most common architecture pattern
 N-tier architecture pattern
 Standard de facto for most JEE applications
 Widely known by most architects and developers
 Reflects the organizational structure found in most IT
companies
 Components are organized into horizontal layers
 Each layer performs a single and specific role
 The most common implementation consists of four layers
 Presentation, business, persistence and database
4Riccardo Cardin
Ingegneria del software mod. B
LAYERED ARCHITECTURE
5Riccardo Cardin
Ingegneria del software mod. B
SEPARATION OF CONCERNS
 Every layer forms an abstraction over a
particular business request
 Components within a specific layer deal only with
logic that pertains to that layer
 i.e. Presentation layer does not need to know how to get
customer data
 Component classification makes easy to build
effective roles and responsibility models
 Limited component scopes make easy to develop,
test and govern , maintain such applications
 Well defined component interfaces
6Riccardo Cardin
Ingegneria del software mod. B
KEY CONCEPTS
 Layers should be closed (layer isolation)
 A request move from one layer to the layer right
below it
 Changes made in one layer generally don’t impact or
effect components in other layers.
 Layers can be open, too
 Imagine a service layer below the business layer that
offers commong services.
 The business layer should go through the service layer to
access the persistence layer.
 Making the service layer open resolve the problem
 Open layers should be very well documented
7Riccardo Cardin
Ingegneria del software mod. B
KEY CONCEPTS
8Riccardo Cardin
Ingegneria del software mod. B
EXAMPLE
9Riccardo Cardin
Example
Consider a request from a business user to retrieve customer
information for a particular individual
Accepts the requests, routes
them to business layer and
display information
Aggregates all the information
needed by the business request
Executes SQL statements to
retrieve the corresponding data
and passes it back up
Store information in a persistent
form
Ingegneria del software mod. B
CONSIDERATIONS
 A good starting point for most application
 It’s a solid general purpose pattern
 Architecture sinkhole anti-pattern
 Requests flow through multiple layers as simple pass-
through
 80-20 proportion of good paths wrt sinkhole path
 Open some layer (but be aware!)
 Tends to lend itself toward monolithic
applications
 It could be an issue in terms of deployment, robustness and
reliability
10Riccardo Cardin
Ingegneria del software mod. B
PATTERN ANALYSIS
11Riccardo Cardin
Characteristic Rating Description
Overall agility
Small changes can be properly isolated,
big one are more difficult due to the
monolithic nature of the pattern
Ease of
deployment
Difficult for larger applications, due to
monolithic deployments (that have to be
properly scheduled
Testability
Very easy to mock or stub layers not
affected by the testing process
Performance
Most of requests have to go through
multiple layers
Scalability
The overall granularity is too bread, making
it expensive to scale
Ease of
development
A well know pattern. In many cases It has a
direct connection with company’s structure
Ingegneria del software mod. B
EVENT-DRIVEN ARCHITECTURE
 Popular asynchronous architeture pattern
 It produces high scalable applications
 Very adaptable: from small to very large applications
 Single purpose, highly decoupled event processing
modules
 Process asynchronously events
 Mediator topology
 A central mediator is used to orchestrate events
throug multiple steps
 Broker topology
12Riccardo Cardin
Ingegneria del software mod. B
MEDIATOR TOPOLOGY
 Multiple steps orchestration
 Events have multiple ordered steps to execute
 Four main types of architecture components
 Event queues
 It is common to have anywhere from a dozen to hundreds
 Message queue, web service point, ...
 Event mediator
 Event channels
 Event processors
 Two types of main events
 Initial event / processing event
13Riccardo Cardin
Ingegneria del software mod. B
MEDIATOR TOPOLOGY
14Riccardo Cardin
Ingegneria del software mod. B
MEDIATOR TOPOLOGY
 Event mediator
 Orchestrates the steps contained in the initial event
 For each step it sends a specific processing event to an event
channel
 Does not perform any business logic
 It knows only the step required to process the initial event
 Implementation through open source hubs
 Spring Integration, Apache Camel, Mule ESB
 More sophisticated, using Business Process Execution
Language (BPEL) engines or Business Process Managers
(BPM)
 BPMN allows to include human tasks
15Riccardo Cardin
Ingegneria del software mod. B
MEDIATOR TOPOLOGY
 Event channel
 Asynchronous communication channel
 Message queues
 Message topic
 An event can be processed by multiple specialized event
processors
 Event processor
 Contains business logic to process any event
 Self conteined, independent, highly decoupled
components
 Fine-grained / Coarse-grained
16Riccardo Cardin
Ingegneria del software mod. B
EXAMPLE
17Riccardo Cardin
Example
Suppose you are insured through a insurance company and you
decide to move.
The initial event is a
relocation event. Steps
are contained inside the
Event mediator.
For each event sends a
processing event
(change, address, recalc
quote) to each event
channel, and waits for the
response.
Ingegneria del software mod. B
BROKER TOPOLOGY
 There is no central mediator
 The message flow is distributed across the event
processors components
 Chain-like fashion, lightweight message broker
 Useful when the processing flow is very simple
 Two main types of component
 Broker: contains all event channels (queues, topics or both)
 Event-processor
 Contains the business logic
 Responsible for publishing a new event
 The event indicates the action is just performed. Some can
be created only for future development
18Riccardo Cardin
Ingegneria del software mod. B
BROKER TOPOLOGY
19Riccardo Cardin
Ingegneria del software mod. B
EXAMPLE
20Riccardo Cardin
Example
Suppose you are insured through a insurance company and you
decide to move.
Customer process
component receives the
event directly. Then, it
sends out and event
change address.
Two processors are
interested in this event.
Both elaborate it, and so
on...
The event chain
continues until no more
events are published.
Ingegneria del software mod. B
CONSIDERATIONS
 Event-driven is complex to implement
 Completly asynchronous and distributed
 Remote process availability, lack of responsiveness,
reconnection logic
 Lack of atomic transactions
 Which event can be run independently? Which granularity?
 Strict need of contracts for event-processors
 Standard data format (XML, JSON, Java Object, ...)
 Contract versioning poilicy
21Riccardo Cardin
Ingegneria del software mod. B
PATTERN ANALYSIS
22Riccardo Cardin
Characteristic Rating Description
Overall agility
Changes are generally isolated and can be
made quickly with small impacts
Ease of
deployment
Ease to deploy due to the decoupled
nature of event-processor components.
Broker topology is easier to deploy
Testability
It requires some specialized testing client
to generate events
Performance
In general, the pattern achieves high
performance through its asynchronous
capabilities
Scalability
Scaling separately event-processors,
allowing for fine-grained scalability
Ease of
development
Asynchronous programming, requires hard
contracts, advanced error handling
conditions
Ingegneria del software mod. B
MICROSERVICES ARCHITECTURE
 A still evolving pattern
 A viable alternative to monolithic and service-
oriented architecutures
 Separately deployed unit
 Easier deployment, increased scalability, high degree of
decoupling
 Service components
 From a single module to a large application’s portion
 Choose the right level of service component granularity is
one of the biggest challenges
 Distributed: remote access protocol
 JMS, AMQP, REST, SOAP, RMI, ...
23Riccardo Cardin
Ingegneria del software mod. B
MICROSERVICES ARCHITECTURE
24Riccardo Cardin
Ingegneria del software mod. B
EVOLUTIONARTY PATHS
 Evolved from issues associated with other
architectures
 From monolithic: open to continous delivery
 Avoid the «monthly deployment» cycles due to tightly
coupling between components
 Every service component is independent developed, tested
and deployed
 From SOA: simplification of the service notion
 SOA is a powerful pattern, that promises to align business
goals with IT capabilities
 Expensive, ubiquitous, difficult to understand / implement
 Eliminates orchestration needs, simplyfing connectivity
25Riccardo Cardin
Ingegneria del software mod. B
API REST-BASED TOPOLOGY
 Useful for websites that expose small services
 Service components are very fine-grained
 Specific business function, independet from the rest
 Only one or two modules
 Microservice
 These services are accessed through and API
 REST-based interface
 Separately deployed web-based API layer
 Google, Amazon, Yahoo cloud-based RESTful web services
26Riccardo Cardin
Ingegneria del software mod. B
API REST-BASED TOPOLOGY
27Riccardo Cardin
Ingegneria del software mod. B
REST-BASED TOPOLOGY
 Accessed directly by fat / web based clients
 User interface is deployed separately
 REST-based interface
 No middle API layer required
 Larger and coarse-grained
 Represent a small portion of the overall business
application
 Common for small to medium-sized business applications
28Riccardo Cardin
Ingegneria del software mod. B
REST-BASED TOPOLOGY
29Riccardo Cardin
Ingegneria del software mod. B
CENTRALIZED MESSAGE TOPOLOGY
 Lightweight centralized message broker
 No trasformation, orchestration or complex routing
 Not to confuse with Service-oriented application
 No REST-based access required
 Found in larger business applications
 Sophisticated control over the transport layer
 Advanced queuing mechanisms, asynchronous
messaging, monitoring, error handling, ...
 Broker clustering and federation
 Avoid the architectural single point of failure and bottleneck
30Riccardo Cardin
Ingegneria del software mod. B
CENTRALIZED MESSAGE TOPOLOGY
31Riccardo Cardin
Ingegneria del software mod. B
SERVICES GRANULARITY
 The main challenge is to defined the right
granularity of service components
 Coarse-grained services
 Not easy to deploy, scale, test and are not loose couples
 Too fine-grained services
 Require orchestration, turning into SOA application
 Require inter-service communication to process a single
request
 Use database communication
 Avoid service-to-service communication
32Riccardo Cardin
Ingegneria del software mod. B
SERVICE GRANULARITY
 Violation of the DRY principle
 Replicate some functionalities to keep independency
across services
 No share of business logic
 Is it the right pattern for your architecture?
 NO, if you still cannot avoid service-component
orchestration
 No definition of transactional unit of work
 Due to the distributed nature of the pattern
 Using transaction framework adds too much complexity
33Riccardo Cardin
Ingegneria del software mod. B
CONSIDERATIONS
 Robustness, better scalability, continous delivery
 Small application component, separately deployed
 Solve many problems of monolithic and SOA architectures
 Real-time production deployments
 Only changed service components can be deployed
 Redirection to an error / waiting page
 Continous availability (hotdeploy)
 Distributed architeture problems
 Contract creation and maintanance, remote system
availability, remote access authentication, ...
34Riccardo Cardin
Ingegneria del software mod. B
PATTERN ANALYSIS
35Riccardo Cardin
Characteristic Rating Description
Overall agility
Changes are generally isolated. Fast and
easy deployment. Loose cooupling
Ease of
deployment
Ease to deploy due to the decoupled
nature of service components. Hotdeploy
and continous delivery
Testability
Due to isolation of business functions,
testing can be scoped. Small chance of
regression
Performance
Due to distributed nature of the pattern,
performance are not generally high
Scalability
Each service component can be separately
scaled (fine tuning)
Ease of
development
Small and isolated business scope. Less
coordination needed among developers or
development teams
Ingegneria del software mod. B
RIFERIMENTI
 Software Architecture Patterns, Mark Richards, 2015, O’Reilly
http://www.oreilly.com/programming/free/software-architecture-
patterns.csp
36Riccardo Cardin

Weitere ähnliche Inhalte

Was ist angesagt?

Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean ArchitectureRoc Boronat
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the DomainVictor Rentea
 
Clean architecture
Clean architectureClean architecture
Clean architectureLieven Doclo
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkHùng Nguyễn Huy
 
Clean architecture on android
Clean architecture on androidClean architecture on android
Clean architecture on androidBenjamin Cheng
 
Design Patterns Illustrated
Design Patterns IllustratedDesign Patterns Illustrated
Design Patterns IllustratedHerman Peeren
 
Microservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | EdurekaMicroservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | EdurekaEdureka!
 
MVVM in iOS presentation
MVVM in iOS presentationMVVM in iOS presentation
MVVM in iOS presentationG ABHISEK
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET CoreMarco Parenzan
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample applicationAntoine Rey
 
Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion PrincipleShahriar Hyder
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Scrum Breakfast Vietnam
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in AngularKnoldus Inc.
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6aminmesbahi
 
Spring core module
Spring core moduleSpring core module
Spring core moduleRaj Tomar
 

Was ist angesagt? (20)

Introducing Clean Architecture
Introducing Clean ArchitectureIntroducing Clean Architecture
Introducing Clean Architecture
 
Clean architecture - Protecting the Domain
Clean architecture - Protecting the DomainClean architecture - Protecting the Domain
Clean architecture - Protecting the Domain
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Clean architecture on android
Clean architecture on androidClean architecture on android
Clean architecture on android
 
Design Patterns Illustrated
Design Patterns IllustratedDesign Patterns Illustrated
Design Patterns Illustrated
 
Microservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | EdurekaMicroservices with Spring Boot Tutorial | Edureka
Microservices with Spring Boot Tutorial | Edureka
 
MVVM in iOS presentation
MVVM in iOS presentationMVVM in iOS presentation
MVVM in iOS presentation
 
Introduction to .NET Core
Introduction to .NET CoreIntroduction to .NET Core
Introduction to .NET Core
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Spring Framework Petclinic sample application
Spring Framework Petclinic sample applicationSpring Framework Petclinic sample application
Spring Framework Petclinic sample application
 
Dependency Inversion Principle
Dependency Inversion PrincipleDependency Inversion Principle
Dependency Inversion Principle
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
 
Java Spring
Java SpringJava Spring
Java Spring
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
 
.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6.NET Core, ASP.NET Core Course, Session 6
.NET Core, ASP.NET Core Course, Session 6
 
Spring core module
Spring core moduleSpring core module
Spring core module
 

Andere mochten auch

Scala - the good, the bad and the very ugly
Scala - the good, the bad and the very uglyScala - the good, the bad and the very ugly
Scala - the good, the bad and the very uglyBozhidar Bozhanov
 
Design Pattern Strutturali
Design Pattern StrutturaliDesign Pattern Strutturali
Design Pattern StrutturaliRiccardo Cardin
 
Java- Concurrent programming - Synchronization (part 1)
Java- Concurrent programming - Synchronization (part 1)Java- Concurrent programming - Synchronization (part 1)
Java- Concurrent programming - Synchronization (part 1)Riccardo Cardin
 
Java- Concurrent programming - Synchronization (part 2)
Java- Concurrent programming - Synchronization (part 2)Java- Concurrent programming - Synchronization (part 2)
Java- Concurrent programming - Synchronization (part 2)Riccardo Cardin
 
Java - Processing input and output
Java - Processing input and outputJava - Processing input and output
Java - Processing input and outputRiccardo Cardin
 
Java Graphics Programming
Java Graphics ProgrammingJava Graphics Programming
Java Graphics ProgrammingRiccardo Cardin
 
A (too) Short Introduction to Scala
A (too) Short Introduction to ScalaA (too) Short Introduction to Scala
A (too) Short Introduction to ScalaRiccardo Cardin
 
Design pattern architetturali Model View Controller, MVP e MVVM
Design pattern architetturali   Model View Controller, MVP e MVVMDesign pattern architetturali   Model View Controller, MVP e MVVM
Design pattern architetturali Model View Controller, MVP e MVVMRiccardo Cardin
 
Java - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsJava - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsRiccardo Cardin
 
Java Exception Handling, Assertions and Logging
Java Exception Handling, Assertions and LoggingJava Exception Handling, Assertions and Logging
Java Exception Handling, Assertions and LoggingRiccardo Cardin
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections frameworkRiccardo Cardin
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programmingRiccardo Cardin
 
Java - Remote method invocation
Java - Remote method invocationJava - Remote method invocation
Java - Remote method invocationRiccardo Cardin
 
Design Pattern Architetturali - Dependency Injection
Design Pattern Architetturali - Dependency InjectionDesign Pattern Architetturali - Dependency Injection
Design Pattern Architetturali - Dependency InjectionRiccardo Cardin
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178Kai Sasaki
 
Java - Concurrent programming - Thread's basics
Java - Concurrent programming - Thread's basicsJava - Concurrent programming - Thread's basics
Java - Concurrent programming - Thread's basicsRiccardo Cardin
 
Errori comuni nei documenti di Analisi dei Requisiti
Errori comuni nei documenti di Analisi dei RequisitiErrori comuni nei documenti di Analisi dei Requisiti
Errori comuni nei documenti di Analisi dei RequisitiRiccardo Cardin
 
Introduzione ai Design Pattern
Introduzione ai Design PatternIntroduzione ai Design Pattern
Introduzione ai Design PatternRiccardo Cardin
 

Andere mochten auch (20)

Scala - the good, the bad and the very ugly
Scala - the good, the bad and the very uglyScala - the good, the bad and the very ugly
Scala - the good, the bad and the very ugly
 
Design Pattern Strutturali
Design Pattern StrutturaliDesign Pattern Strutturali
Design Pattern Strutturali
 
Java- Concurrent programming - Synchronization (part 1)
Java- Concurrent programming - Synchronization (part 1)Java- Concurrent programming - Synchronization (part 1)
Java- Concurrent programming - Synchronization (part 1)
 
Java- Concurrent programming - Synchronization (part 2)
Java- Concurrent programming - Synchronization (part 2)Java- Concurrent programming - Synchronization (part 2)
Java- Concurrent programming - Synchronization (part 2)
 
Java - Processing input and output
Java - Processing input and outputJava - Processing input and output
Java - Processing input and output
 
Java Graphics Programming
Java Graphics ProgrammingJava Graphics Programming
Java Graphics Programming
 
A (too) Short Introduction to Scala
A (too) Short Introduction to ScalaA (too) Short Introduction to Scala
A (too) Short Introduction to Scala
 
Design pattern architetturali Model View Controller, MVP e MVVM
Design pattern architetturali   Model View Controller, MVP e MVVMDesign pattern architetturali   Model View Controller, MVP e MVVM
Design pattern architetturali Model View Controller, MVP e MVVM
 
Java - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced conceptsJava - Concurrent programming - Thread's advanced concepts
Java - Concurrent programming - Thread's advanced concepts
 
Java Exception Handling, Assertions and Logging
Java Exception Handling, Assertions and LoggingJava Exception Handling, Assertions and Logging
Java Exception Handling, Assertions and Logging
 
Java - Collections framework
Java - Collections frameworkJava - Collections framework
Java - Collections framework
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programming
 
Java - Remote method invocation
Java - Remote method invocationJava - Remote method invocation
Java - Remote method invocation
 
Java - Sockets
Java - SocketsJava - Sockets
Java - Sockets
 
Design Pattern Architetturali - Dependency Injection
Design Pattern Architetturali - Dependency InjectionDesign Pattern Architetturali - Dependency Injection
Design Pattern Architetturali - Dependency Injection
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178
 
Java - Concurrent programming - Thread's basics
Java - Concurrent programming - Thread's basicsJava - Concurrent programming - Thread's basics
Java - Concurrent programming - Thread's basics
 
Diagrammi di Sequenza
Diagrammi di SequenzaDiagrammi di Sequenza
Diagrammi di Sequenza
 
Errori comuni nei documenti di Analisi dei Requisiti
Errori comuni nei documenti di Analisi dei RequisitiErrori comuni nei documenti di Analisi dei Requisiti
Errori comuni nei documenti di Analisi dei Requisiti
 
Introduzione ai Design Pattern
Introduzione ai Design PatternIntroduzione ai Design Pattern
Introduzione ai Design Pattern
 

Ähnlich wie Software architecture patterns

External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microserviceRohit Kelapure
 
Horizontal Scaling for Millions of Customers!
Horizontal Scaling for Millions of Customers! Horizontal Scaling for Millions of Customers!
Horizontal Scaling for Millions of Customers! elangovans
 
DevConf.US 2022 - Exploring Open Source Edge Success at Scale
DevConf.US 2022 - Exploring Open Source Edge Success at ScaleDevConf.US 2022 - Exploring Open Source Edge Success at Scale
DevConf.US 2022 - Exploring Open Source Edge Success at ScaleEric D. Schabell
 
PureApplication: Devops and Urbancode
PureApplication: Devops and UrbancodePureApplication: Devops and Urbancode
PureApplication: Devops and UrbancodeJohn Hawkins
 
Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...
Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...
Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...NetworkCollaborators
 
Usha_BuildandRelease_Resume
Usha_BuildandRelease_ResumeUsha_BuildandRelease_Resume
Usha_BuildandRelease_ResumeUsha Nagubandi
 
Leveraging IoT as part of your digital transformation
Leveraging IoT as part of your digital transformationLeveraging IoT as part of your digital transformation
Leveraging IoT as part of your digital transformationJohn Archer
 
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...ghodgkinson
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...drnugent
 
MDA Vs Web Ratio for Non It
MDA Vs Web Ratio for Non ItMDA Vs Web Ratio for Non It
MDA Vs Web Ratio for Non Itanicolay
 
Contino Webinar - Migrating your Trading Workloads to the Cloud
Contino Webinar -  Migrating your Trading Workloads to the CloudContino Webinar -  Migrating your Trading Workloads to the Cloud
Contino Webinar - Migrating your Trading Workloads to the CloudBen Saunders
 
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...Sabino Labarile
 
Do more clouds = better scalability, availability, flexibility
Do more clouds = better scalability, availability, flexibility Do more clouds = better scalability, availability, flexibility
Do more clouds = better scalability, availability, flexibility NuoDB
 
William Impey CV
William Impey CVWilliam Impey CV
William Impey CVWill Impey
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Apigee | Google Cloud
 
The Essentials Of Project Management
The Essentials Of Project ManagementThe Essentials Of Project Management
The Essentials Of Project ManagementLaura Arrigo
 
Enterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesEnterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesCrishantha Nanayakkara
 
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
Building a reliable and scalable IoT platform with MongoDB and HiveMQBuilding a reliable and scalable IoT platform with MongoDB and HiveMQ
Building a reliable and scalable IoT platform with MongoDB and HiveMQDominik Obermaier
 
New Delhi Cloud Summit 05 26-11
New Delhi Cloud Summit 05 26-11New Delhi Cloud Summit 05 26-11
New Delhi Cloud Summit 05 26-11Dileep Bhandarkar
 

Ähnlich wie Software architecture patterns (20)

External should that be a microservice
External should that be a microserviceExternal should that be a microservice
External should that be a microservice
 
Horizontal Scaling for Millions of Customers!
Horizontal Scaling for Millions of Customers! Horizontal Scaling for Millions of Customers!
Horizontal Scaling for Millions of Customers!
 
DevConf.US 2022 - Exploring Open Source Edge Success at Scale
DevConf.US 2022 - Exploring Open Source Edge Success at ScaleDevConf.US 2022 - Exploring Open Source Edge Success at Scale
DevConf.US 2022 - Exploring Open Source Edge Success at Scale
 
PureApplication: Devops and Urbancode
PureApplication: Devops and UrbancodePureApplication: Devops and Urbancode
PureApplication: Devops and Urbancode
 
Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...
Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...
Cisco Connect 2018 Thailand - Enabling the next gen data center transformatio...
 
Mashing Up Manufacturing
Mashing Up ManufacturingMashing Up Manufacturing
Mashing Up Manufacturing
 
Usha_BuildandRelease_Resume
Usha_BuildandRelease_ResumeUsha_BuildandRelease_Resume
Usha_BuildandRelease_Resume
 
Leveraging IoT as part of your digital transformation
Leveraging IoT as part of your digital transformationLeveraging IoT as part of your digital transformation
Leveraging IoT as part of your digital transformation
 
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
 
Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...Buzzwords: Microservices, containers and serverless - real life applications ...
Buzzwords: Microservices, containers and serverless - real life applications ...
 
MDA Vs Web Ratio for Non It
MDA Vs Web Ratio for Non ItMDA Vs Web Ratio for Non It
MDA Vs Web Ratio for Non It
 
Contino Webinar - Migrating your Trading Workloads to the Cloud
Contino Webinar -  Migrating your Trading Workloads to the CloudContino Webinar -  Migrating your Trading Workloads to the Cloud
Contino Webinar - Migrating your Trading Workloads to the Cloud
 
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
 
Do more clouds = better scalability, availability, flexibility
Do more clouds = better scalability, availability, flexibility Do more clouds = better scalability, availability, flexibility
Do more clouds = better scalability, availability, flexibility
 
William Impey CV
William Impey CVWilliam Impey CV
William Impey CV
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
The Essentials Of Project Management
The Essentials Of Project ManagementThe Essentials Of Project Management
The Essentials Of Project Management
 
Enterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices ArchitecturesEnterprise Integration in Cloud Native Microservices Architectures
Enterprise Integration in Cloud Native Microservices Architectures
 
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
Building a reliable and scalable IoT platform with MongoDB and HiveMQBuilding a reliable and scalable IoT platform with MongoDB and HiveMQ
Building a reliable and scalable IoT platform with MongoDB and HiveMQ
 
New Delhi Cloud Summit 05 26-11
New Delhi Cloud Summit 05 26-11New Delhi Cloud Summit 05 26-11
New Delhi Cloud Summit 05 26-11
 

Mehr von Riccardo Cardin

SOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented DesignSOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented DesignRiccardo Cardin
 
Design Pattern Comportamentali
Design Pattern ComportamentaliDesign Pattern Comportamentali
Design Pattern ComportamentaliRiccardo Cardin
 
Design Pattern Creazionali
Design Pattern CreazionaliDesign Pattern Creazionali
Design Pattern CreazionaliRiccardo Cardin
 
Mvc e di spring e angular js
Mvc e di   spring e angular jsMvc e di   spring e angular js
Mvc e di spring e angular jsRiccardo Cardin
 
Reactive programming principles
Reactive programming principlesReactive programming principles
Reactive programming principlesRiccardo Cardin
 

Mehr von Riccardo Cardin (9)

SOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented DesignSOLID - Principles of Object Oriented Design
SOLID - Principles of Object Oriented Design
 
Design Pattern Comportamentali
Design Pattern ComportamentaliDesign Pattern Comportamentali
Design Pattern Comportamentali
 
Design Pattern Creazionali
Design Pattern CreazionaliDesign Pattern Creazionali
Design Pattern Creazionali
 
Diagrammi di Attività
Diagrammi di AttivitàDiagrammi di Attività
Diagrammi di Attività
 
Diagrammi delle Classi
Diagrammi delle ClassiDiagrammi delle Classi
Diagrammi delle Classi
 
Diagrammi Use Case
Diagrammi Use CaseDiagrammi Use Case
Diagrammi Use Case
 
Introduzione a UML
Introduzione a UMLIntroduzione a UML
Introduzione a UML
 
Mvc e di spring e angular js
Mvc e di   spring e angular jsMvc e di   spring e angular js
Mvc e di spring e angular js
 
Reactive programming principles
Reactive programming principlesReactive programming principles
Reactive programming principles
 

Kürzlich hochgeladen

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptesrabilgic2
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfYashikaSharma391629
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 

Kürzlich hochgeladen (20)

Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Lecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).pptLecture # 8 software design and architecture (SDA).ppt
Lecture # 8 software design and architecture (SDA).ppt
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdfInnovate and Collaborate- Harnessing the Power of Open Source Software.pdf
Innovate and Collaborate- Harnessing the Power of Open Source Software.pdf
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 

Software architecture patterns

  • 1. SOFTWARE ARCHITECTURE PATTERNS INGEGNERIA DEL SOFTWARE Università degli Studi di Padova Dipartimento di Matematica Corso di Laurea in Informatica, A.A. 2015 – 2016 rcardin@math.unipd.it
  • 2. Ingegneria del software mod. B SUMMARY  Introduction  Layered architecture  Event-driven architecture  Microservices architecture 2Riccardo Cardin
  • 3. Ingegneria del software mod. B INTRODUCTION  Applications lacking a formal architecture are generally coupled, brittle, difficult to change  Modules result in a collection of unorganized  Big ball of mud antipattern  Deployment and maintenance problems  Does the architecture scale? How does application response to changes? What are the deployment characteristics?  Architecture patterns  Helps to manage these aspects, knowing the characteristics, strengths and weakness 3Riccardo Cardin
  • 4. Ingegneria del software mod. B LAYERED ARCHITECTURE  Most common architecture pattern  N-tier architecture pattern  Standard de facto for most JEE applications  Widely known by most architects and developers  Reflects the organizational structure found in most IT companies  Components are organized into horizontal layers  Each layer performs a single and specific role  The most common implementation consists of four layers  Presentation, business, persistence and database 4Riccardo Cardin
  • 5. Ingegneria del software mod. B LAYERED ARCHITECTURE 5Riccardo Cardin
  • 6. Ingegneria del software mod. B SEPARATION OF CONCERNS  Every layer forms an abstraction over a particular business request  Components within a specific layer deal only with logic that pertains to that layer  i.e. Presentation layer does not need to know how to get customer data  Component classification makes easy to build effective roles and responsibility models  Limited component scopes make easy to develop, test and govern , maintain such applications  Well defined component interfaces 6Riccardo Cardin
  • 7. Ingegneria del software mod. B KEY CONCEPTS  Layers should be closed (layer isolation)  A request move from one layer to the layer right below it  Changes made in one layer generally don’t impact or effect components in other layers.  Layers can be open, too  Imagine a service layer below the business layer that offers commong services.  The business layer should go through the service layer to access the persistence layer.  Making the service layer open resolve the problem  Open layers should be very well documented 7Riccardo Cardin
  • 8. Ingegneria del software mod. B KEY CONCEPTS 8Riccardo Cardin
  • 9. Ingegneria del software mod. B EXAMPLE 9Riccardo Cardin Example Consider a request from a business user to retrieve customer information for a particular individual Accepts the requests, routes them to business layer and display information Aggregates all the information needed by the business request Executes SQL statements to retrieve the corresponding data and passes it back up Store information in a persistent form
  • 10. Ingegneria del software mod. B CONSIDERATIONS  A good starting point for most application  It’s a solid general purpose pattern  Architecture sinkhole anti-pattern  Requests flow through multiple layers as simple pass- through  80-20 proportion of good paths wrt sinkhole path  Open some layer (but be aware!)  Tends to lend itself toward monolithic applications  It could be an issue in terms of deployment, robustness and reliability 10Riccardo Cardin
  • 11. Ingegneria del software mod. B PATTERN ANALYSIS 11Riccardo Cardin Characteristic Rating Description Overall agility Small changes can be properly isolated, big one are more difficult due to the monolithic nature of the pattern Ease of deployment Difficult for larger applications, due to monolithic deployments (that have to be properly scheduled Testability Very easy to mock or stub layers not affected by the testing process Performance Most of requests have to go through multiple layers Scalability The overall granularity is too bread, making it expensive to scale Ease of development A well know pattern. In many cases It has a direct connection with company’s structure
  • 12. Ingegneria del software mod. B EVENT-DRIVEN ARCHITECTURE  Popular asynchronous architeture pattern  It produces high scalable applications  Very adaptable: from small to very large applications  Single purpose, highly decoupled event processing modules  Process asynchronously events  Mediator topology  A central mediator is used to orchestrate events throug multiple steps  Broker topology 12Riccardo Cardin
  • 13. Ingegneria del software mod. B MEDIATOR TOPOLOGY  Multiple steps orchestration  Events have multiple ordered steps to execute  Four main types of architecture components  Event queues  It is common to have anywhere from a dozen to hundreds  Message queue, web service point, ...  Event mediator  Event channels  Event processors  Two types of main events  Initial event / processing event 13Riccardo Cardin
  • 14. Ingegneria del software mod. B MEDIATOR TOPOLOGY 14Riccardo Cardin
  • 15. Ingegneria del software mod. B MEDIATOR TOPOLOGY  Event mediator  Orchestrates the steps contained in the initial event  For each step it sends a specific processing event to an event channel  Does not perform any business logic  It knows only the step required to process the initial event  Implementation through open source hubs  Spring Integration, Apache Camel, Mule ESB  More sophisticated, using Business Process Execution Language (BPEL) engines or Business Process Managers (BPM)  BPMN allows to include human tasks 15Riccardo Cardin
  • 16. Ingegneria del software mod. B MEDIATOR TOPOLOGY  Event channel  Asynchronous communication channel  Message queues  Message topic  An event can be processed by multiple specialized event processors  Event processor  Contains business logic to process any event  Self conteined, independent, highly decoupled components  Fine-grained / Coarse-grained 16Riccardo Cardin
  • 17. Ingegneria del software mod. B EXAMPLE 17Riccardo Cardin Example Suppose you are insured through a insurance company and you decide to move. The initial event is a relocation event. Steps are contained inside the Event mediator. For each event sends a processing event (change, address, recalc quote) to each event channel, and waits for the response.
  • 18. Ingegneria del software mod. B BROKER TOPOLOGY  There is no central mediator  The message flow is distributed across the event processors components  Chain-like fashion, lightweight message broker  Useful when the processing flow is very simple  Two main types of component  Broker: contains all event channels (queues, topics or both)  Event-processor  Contains the business logic  Responsible for publishing a new event  The event indicates the action is just performed. Some can be created only for future development 18Riccardo Cardin
  • 19. Ingegneria del software mod. B BROKER TOPOLOGY 19Riccardo Cardin
  • 20. Ingegneria del software mod. B EXAMPLE 20Riccardo Cardin Example Suppose you are insured through a insurance company and you decide to move. Customer process component receives the event directly. Then, it sends out and event change address. Two processors are interested in this event. Both elaborate it, and so on... The event chain continues until no more events are published.
  • 21. Ingegneria del software mod. B CONSIDERATIONS  Event-driven is complex to implement  Completly asynchronous and distributed  Remote process availability, lack of responsiveness, reconnection logic  Lack of atomic transactions  Which event can be run independently? Which granularity?  Strict need of contracts for event-processors  Standard data format (XML, JSON, Java Object, ...)  Contract versioning poilicy 21Riccardo Cardin
  • 22. Ingegneria del software mod. B PATTERN ANALYSIS 22Riccardo Cardin Characteristic Rating Description Overall agility Changes are generally isolated and can be made quickly with small impacts Ease of deployment Ease to deploy due to the decoupled nature of event-processor components. Broker topology is easier to deploy Testability It requires some specialized testing client to generate events Performance In general, the pattern achieves high performance through its asynchronous capabilities Scalability Scaling separately event-processors, allowing for fine-grained scalability Ease of development Asynchronous programming, requires hard contracts, advanced error handling conditions
  • 23. Ingegneria del software mod. B MICROSERVICES ARCHITECTURE  A still evolving pattern  A viable alternative to monolithic and service- oriented architecutures  Separately deployed unit  Easier deployment, increased scalability, high degree of decoupling  Service components  From a single module to a large application’s portion  Choose the right level of service component granularity is one of the biggest challenges  Distributed: remote access protocol  JMS, AMQP, REST, SOAP, RMI, ... 23Riccardo Cardin
  • 24. Ingegneria del software mod. B MICROSERVICES ARCHITECTURE 24Riccardo Cardin
  • 25. Ingegneria del software mod. B EVOLUTIONARTY PATHS  Evolved from issues associated with other architectures  From monolithic: open to continous delivery  Avoid the «monthly deployment» cycles due to tightly coupling between components  Every service component is independent developed, tested and deployed  From SOA: simplification of the service notion  SOA is a powerful pattern, that promises to align business goals with IT capabilities  Expensive, ubiquitous, difficult to understand / implement  Eliminates orchestration needs, simplyfing connectivity 25Riccardo Cardin
  • 26. Ingegneria del software mod. B API REST-BASED TOPOLOGY  Useful for websites that expose small services  Service components are very fine-grained  Specific business function, independet from the rest  Only one or two modules  Microservice  These services are accessed through and API  REST-based interface  Separately deployed web-based API layer  Google, Amazon, Yahoo cloud-based RESTful web services 26Riccardo Cardin
  • 27. Ingegneria del software mod. B API REST-BASED TOPOLOGY 27Riccardo Cardin
  • 28. Ingegneria del software mod. B REST-BASED TOPOLOGY  Accessed directly by fat / web based clients  User interface is deployed separately  REST-based interface  No middle API layer required  Larger and coarse-grained  Represent a small portion of the overall business application  Common for small to medium-sized business applications 28Riccardo Cardin
  • 29. Ingegneria del software mod. B REST-BASED TOPOLOGY 29Riccardo Cardin
  • 30. Ingegneria del software mod. B CENTRALIZED MESSAGE TOPOLOGY  Lightweight centralized message broker  No trasformation, orchestration or complex routing  Not to confuse with Service-oriented application  No REST-based access required  Found in larger business applications  Sophisticated control over the transport layer  Advanced queuing mechanisms, asynchronous messaging, monitoring, error handling, ...  Broker clustering and federation  Avoid the architectural single point of failure and bottleneck 30Riccardo Cardin
  • 31. Ingegneria del software mod. B CENTRALIZED MESSAGE TOPOLOGY 31Riccardo Cardin
  • 32. Ingegneria del software mod. B SERVICES GRANULARITY  The main challenge is to defined the right granularity of service components  Coarse-grained services  Not easy to deploy, scale, test and are not loose couples  Too fine-grained services  Require orchestration, turning into SOA application  Require inter-service communication to process a single request  Use database communication  Avoid service-to-service communication 32Riccardo Cardin
  • 33. Ingegneria del software mod. B SERVICE GRANULARITY  Violation of the DRY principle  Replicate some functionalities to keep independency across services  No share of business logic  Is it the right pattern for your architecture?  NO, if you still cannot avoid service-component orchestration  No definition of transactional unit of work  Due to the distributed nature of the pattern  Using transaction framework adds too much complexity 33Riccardo Cardin
  • 34. Ingegneria del software mod. B CONSIDERATIONS  Robustness, better scalability, continous delivery  Small application component, separately deployed  Solve many problems of monolithic and SOA architectures  Real-time production deployments  Only changed service components can be deployed  Redirection to an error / waiting page  Continous availability (hotdeploy)  Distributed architeture problems  Contract creation and maintanance, remote system availability, remote access authentication, ... 34Riccardo Cardin
  • 35. Ingegneria del software mod. B PATTERN ANALYSIS 35Riccardo Cardin Characteristic Rating Description Overall agility Changes are generally isolated. Fast and easy deployment. Loose cooupling Ease of deployment Ease to deploy due to the decoupled nature of service components. Hotdeploy and continous delivery Testability Due to isolation of business functions, testing can be scoped. Small chance of regression Performance Due to distributed nature of the pattern, performance are not generally high Scalability Each service component can be separately scaled (fine tuning) Ease of development Small and isolated business scope. Less coordination needed among developers or development teams
  • 36. Ingegneria del software mod. B RIFERIMENTI  Software Architecture Patterns, Mark Richards, 2015, O’Reilly http://www.oreilly.com/programming/free/software-architecture- patterns.csp 36Riccardo Cardin