SOEN6461: Software Design Methodologies
Manel Abdellatif Service-Oriented Architecture And Legacy-To-SOA Migration
1
SOEN6461: Software Design Methodologies Manel Abdellatif - - PowerPoint PPT Presentation
SOEN6461: Software Design Methodologies Manel Abdellatif Service-Oriented Architecture And Legacy-To-SOA Migration 1 What is a Service-oriented architecture ? Each role appropriates SOA differently: A set of services that the company wants
Manel Abdellatif Service-Oriented Architecture And Legacy-To-SOA Migration
1
2
Each role appropriates SOA differently:
A set of services that the company wants to expose to their customers and partners, or other parts of the organization A programming model with its standards, paradigms, tools and associated technologies An architectural style based on a vendor, a consumer and a service description. It supports the properties of modularity, encapsulation, decoupling, reuse and composability Middleware offering functionality in terms of integration, orchestration, monitoring and service management Director Business Analyst Architects Developers Integrators
3
q A service-oriented architecture (SOA) is a style of software design where services are provided through a communication protocol over a network. q Principles of service-oriented architecture –Independent of vendors –Products –Technologies. q A service is a discrete unit of functionality that can be accessed remotely and updated independently.
4
* *
Object-Oriented
*
services services
services Components
Ø Growing levels of abstraction
Assembler Procedural Language
01011 10100 11000 01011
SOA is an evolution of platforms
architectures while adding some new principles
v Modularity (set of features that make sense)
v Black box (interface / implementation separation) v Location independent v Neutrality to transport protocols
to consumers
5
Service Properties
6
Standardized contracts Service Abstraction Service Reusability Service Autonomy Service Statelessness Service Discoverability Service Composability Loose Coupling
Example of tight coupling: Loan Management
7
LoanAgent
calculateRisk
Loan Account
createLoan checkCredit
LoanApproval SMSGateway
sendConfirmation
Entity
Ø LoanAgent is related to LoanApproval and Loan Ø LoanApproval is related to Account Ø Loan is related to SMSGateway
Example of loose coupling: Loan Management
8
LoanProcess CreateLoan CheckAccount Balance Calculate LoanRisk Notify ViaSMS
Services
Ø What is LoanProcess ? Ø A business process ! It orchestrates the services => low coupling
Types of coupling in SOA
9
* *
E x :
Different types of coupling in a SOA It depends on the architectural level
Types of coupling in SOA
10
* *
h i g h c
p l i n g L
e c
p l i n g t e c h n i c a l l e v e l
a t l
i c a l l e v e l ( S C A ) L
c
p l i n g l
i c a l l e v e l
Different types of coupling in a SOA It depends on the architectural level
E x :
12
Be careful not to confuse SOA with Web Service!
13
14
Transport protocol
SOAP
W3C
Simple Object Access Protocol Spec for Repository/Registry
UDDI
Microsoft, IBM, HP
Universal Description Discovery and Integration
WSDL
W3C
Web Services Description Language Contract Specification
BPEL
Oasis
Business Process Execution Language
Main components of Web Services
Describes the business process
15
16
dissertation of Roy Fielding, one of the principal authors of the HTTP specification versions 1.0 and 1.1.
are identified by global IDs— typically using URIs.
PUT/ DELETE) to manipulate the resource or collection of resources.
17
HTTP Method Resource Location
Resource Representation
18
19
e-store : layer
Presentation Layer CartController AccountController Business Logic Layer Account Cart Inventory Item OrderInsert OrderRead Product Profile Category Check
Create Account Default Error Help Item Details Items My Account Edit Account Order Billing Order Process Order Shipping SignOut Shopping Cart Search SignIn Data Access Layer IAccount IInventory IItem IOrder IProduct IProfile
e-store : Domains
Data Access Layer IAccount IInventory IItem IOrder IProduct IProfile Presentation Layer Business Logic Layer Account Cart Inventory Item OrderInsert OrderRead Product Profile Category Check
Create Account Default Error Help Item Details Items My Account Edit Account Order Billing Order Process Order Shipping SignOut Shopping Cart Search SignIn
Catalog Inventory Shopping Customer Billing
1.0 1.1 1.2 1.0 2.0 3.5 10.0 11.2 11.5 5.1 5.2 5.3 1.0 6.0 7.0
e-store : Domains
Data Access Layer Presentation Layer Business Logic Layer
Catalog Inventory Shopping Customer Billing
e-store : Services
Presentation Layer Business Logic Layer Data Access Layer Service Layer
Show Catalog Make Inventory Shop Manage Customer Bill
process that involves web services will be executed in XML format.
Notation
26
27
flow PartnerLink PartnerLink PartnerLink
loan.bpel
28
flow PartnerLink PartnerLink PartnerLink
<PartnerLink> references to the services participating in the process flow <invoke> a credit rating service synchronously <faultHandlers> catch and manage exceptions when customer has a bad credit history <flow> initiates asynchronous loan processors in parallel of execution <receive> asynchronous callbacks from longrunning loan processors
loan.bpel
33
services)
34
35
with but that are vital to our organization. Legacy software was written years ago using outdated techniques, yet it continues to do useful work. » Bennett (1995)
three decades. They constitute a large number of existing systems. » Rahgozar&Oroumchian (2002)
and COBOL based software. » Geetha (2012)
36
37
Maintenance tasks become central activities in many businesses Legacy software systems are still essential in many businesses 70% of today’s transactional operations are still managed by legacy systems Legacy systems cannot simply be removed / replaced as they execute complex business logic
Legacy Apps Are Critical But Challenging To Maintain
38
technology in the market
legacy systems
Legacy systems modernization remains essential to ease their maintenance and make them more flexible without loosing their business values
Motivations For Legacy-To-SOA Migration
40
Reducing maintenance costs, improving the flexibility and interoperability of legacy systems are the main motivations to migrate legacy systems to SOA.
82% 64% 64% 42% 38% 38% 38% 24%
0% 10% 20% 30% 40% 50% 60% 70% 80% 90%
M a i n t e n a n c e I n t e r
e r a b i l i t y F l e x i b i l i t y R e l i a b i l i t y P e r f
m a n c e A v a i l a b i l i t y T e s t a b i l i t y O t h e r
We asked 45 professionals about the main reasons of Legacy-To-SOA migration
Types of the Migrated Systems
(a) Age of the migrated systems (b) Size of the migrated systems (c) Programming Languages of migrated systems
41
Practitioners migrate different types of old legacy systems implemented mainly in Cobol and Java.
53% 49% 33% 29% 18% 18% 13% 13% 11% 4% 4% 4% 2% 2% 2% 0% 10% 20% 30% 40% 50% 60% C O B O L J a v a C I C S J a v a s c r i p t C C # C + + A s s e m b l e r P L / 1 R P G F
t r a n O R A C L E f
m s P H P P a s c a l S P L
and exploitation of information about a system in order to improve its quality and use.
exploitation of information about a system in order to redesign all or part of an existing system.
the legacy system)
reengineering compared to the gain in maintenance costs of the system)
may be higher than the actual replacement of the system with a new service-oriented system.
system
cohesion, reusability, etc.
modernization process
expectations concerning their capability, quality of service, and efficiency of use.
52
What are the used inputs for SI in industry?
76% 58% 71% 16% 49% 53% 9% 27% 7% 9% 69% 44% 0% 10% 20% 30% 40% 50% 60% 70% 80% S
r c e C
e D a t a b a s e B u s i n e s s P r
e s s E x e c u t i
t r a c e s U s e r I n t e r f a c e s U s e C a s e A c t i v i t y d i a g r a m s D a t a F l
d i a g r a m s S t a t e M a c h i n e s d i a g r a m s O n t
y H u m a n E x p e r t i s e D
u m e n t a t i
The legacy system is considered a black box. Only the public interfaces of the system are studied No modification is made on the system (example code packaging or "wrapping")
The legacy system is exposed Changes can be made to the code (eg grouping classes / features)
Service Identification Techniques
Wrapping
59
functionalities without touching the core of the legacy system.
Sneed, Harry M., Chris Verhoef, and Stephan H. Sneed. "Reusing existing object-oriented code as web services in a SOA." Maintenance and Evolution of Service- Oriented and Cloud-Based Systems (MESOCA), 2013 IEEE 7th International Symposium on the. IEEE, 2013.
Service Identification Techniques In Industry
22% 60% 20% 13% 47% 7% 4% 13% 9% 0% 10% 20% 30% 40% 50% 60% 70%
Class clustering Functionality clustering Formal concept analysis Heuristics−based Wrapping Genetic algorithms Machine learning Feature location None of the above
Functionality clustering and wrapping are the most used techniques of service identification in industry
Service identification directions
Service identification directions
by performing domain analysis and requirement characterization of the targeted SOA system to define concretely what are the supported services.
services.
an IT-perspective.
software artifacts to identify higher level ones.
higher abstraction artifact
applying a top-down process and from the source code by applying a bottom-up process to identify the corresponding software architecture.
Service identification directions
Top-Down (starting by the use of domain-specifc conceptual models like business concept and process models to identify services, which are then specified and mapped onto a software landscape) Bottom-Up (starting by analysing the existing software landscape and modularising it) Mixed (starting by the use of both domain-specific conceptual models and the analyses of the software source code to identify services) No idea
Targeted Quality Metrics
44% 24% 47% 29% 20% 62% 29% 40% 42% 11%
0% 10% 20% 30% 40% 50% 60% 70% L
e C
p l i n g H i g h C
e s i
G r a n u l a r i t y C
p
a b i l i t y S e l f − d e s c r i p t i v e n e s s S e r v i c e R e u s e N u m b e r O f s e r v i c e s C
t A d a p t a t i
E f f
t N
e
t h e a b
e
Only few service quality criteria are desired by practitioners in the SI process: reusability, granularity, and loose coupling
80% 44% 40% 16% 7%
0% 10% 20% 30% 40% 50% 60% 70% 80% 90%
Source code analysis Runtime Analysis Textual Analysis Historical Analysis None of the above
76
Practitioners mostly relied on static analyses of the source code of their legacy systems for service identification.
Analyses Types for Service Identification
process is not the primary focus of practitioners
engineering techniques to document and extract the business logic of legacy systems
fully automate the SI process
6% 50% 44%
Fully automatic Semi-automatic Manual
77
Automation Of Service Identification
capabilities/functions provided by the Enterprise, Application and Entity services
different apps
application.
enable the decomposition of a complex business process
Ø They are also called information or data services depending on the taxonomy. Ø They provide access to and management of the persistent data of the business. Ø They generally support actions on data (create, read, update and delete) Ø They may have side-effects (i.e.,they modify shared data).
Ø They may be seen as services that do not support directly the business
processes of the company.
Ø They generally embody some cross-cutting capabilities required by domain-
specific services.
Ø Logging and security services are examples of such services.
Ø These services represent the facilities that are required
for deploying and running an SOA application.
Ø Examples : integration services which include services for
routing, protocol conversion, message processing and transformation.
Ø Typically supported by an Enterprise Service Bus (ESB). Ø Compared to utility services, infrastructure services have
a broader scope of reuse.
73% 49% 56% 73% 38% 38%
0% 10% 20% 30% 40% 50% 60% 70% 80%
Business Entreprise Entity Application Utility Infrastructure
Service identification is a business driven process that prioritize the identification of domain-specific services rather than technical services.
Recommandations for Service Identification
82
Service identification should be a business- value driven process A deep understanding of the domain and a great familiarity with the legacy systems are necessary The input must be source code and production data The output must be high-value, coarse- grained services The process must follow a proven methodology
Ø The specification of the services identified in terms of the interfaces offered to their consumers and the interfaces required for external services Ø Service design best practices and target SOA variant
to consider moreover: Ø Restructuring the existing application to invoke the identified and specified services through their interfaces. Ø Architectural refactoring of the system
services: (1) modernize/modify/adjust the business process (2) Add new services; (3) Service composition and orchestration
(1) (2)
Conclusion
complex
the identified services
available legacy artifacts
Thank you!