SOEN6461: Software Design Methodologies
Manel Abdellatif Introduction Service-Oriented Architecture And Legacy-To-SOA Migration
1
SOEN6461: Software Design Methodologies Manel Abdellatif - - PowerPoint PPT Presentation
SOEN6461: Software Design Methodologies Manel Abdellatif Introduction 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
Manel Abdellatif Introduction 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
q A service-oriented architecture (SOA) is a style
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 acted upon and updated independently.
3
4
* *
Object-Oriented
*
services services
services Components
Ø Growing levels of abstraction
Assembler Procedural Language
01011 10100 11000 01011
5
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
consumers
6
standard, implementation-neutral language.
7
Example of tight coupling: Loan Management
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
8
Example of loose coupling: Loan Management
LoanProcess CreateLoan CheckAccount Balance Calculate LoanRisk Notify ViaSMS
Services
Ø What is LoanProcess ? Ø A business process ! It orchestrates the services => low coupling
9
Types of coupling in SOA
* *
E x :
Different types of coupling in a SOA It depends on the architectural level
10
Types of coupling in SOA
* *
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!
Services?
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
introduced and defined in 2000 by the doctoral dissertation of Roy Fielding, one of the principal authors of the HTTP specification versions 1.0 and 1.1.
which are identified by global IDs— typically using URIs.
PUT/ DELETE) to manipulate the resource or collection of resources.
17
HTTP Method Resource Location Resource Representatio n
18
19
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
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
Data Access Layer Presentation Layer Business Logic Layer
Catalog Inventory Shopping Customer Billing
Presentation Layer Business Logic Layer Data Access Layer Service Layer
Show Catalog Make Inventory Shop Manage Customer Bill
24
to manage its business processes in an automated way (modeling, simulation, execution and audit)
needs.
processes, business rules and activities
inputs and outputs
Indicators capture process performance
service orchestration
as a service Activities :
process that
associated with roles
25
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 <switch> to the lowest loan offer
loan.bpel
29
30
Avoids the mess of Traditional point-to-point integration!!
31
the bus.
service providers.
communication between different applications
32
33
34
35
quickly adapt to market needs
reduced
Today's best solutions are tomorrow's legacy systems
36
to cope 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)
last three decades. They constitute a large number of existing
mainframes and COBOL based software. » Geetha (2012)
37
and replacement
38
Why do we migrate legacy systems to SOA?
40
We asked 37 professionals about the main reasons of legacy-to-SOA migration
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.
▪ It is the most challenging phase
and important for software reuse. ▪The identified services must meet a range of expectations concerning their capability, quality of service, and efficiency of use. ▪Avoid development from scratch ▪ Minimize the migration cost
Input Output
Service Identification Algorithm
Condition1 ConditioniQuality metrics Guide the algorithm Fitness function
[Defines the automation degree]51
artefacts they use to identify services
What are the used inputs for SI in industry?
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
56
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.
FCA based techniques
5 7
▪Use of ontologies ▪Ontology is by definition a structured set of terms and concepts representing the meaning of an information field, whether through the metadata of a namespace, or elements of a knowledge domain ▪Only tow works proposed an ontology service identification based approach :
▪ M. Djeloul, “Locating services in legacy software: information retrieval techniques, ontology and fca based approach,” WSEAS Transactions on Computers, vol. 11, no. 1, pp. 19 – 26, 2012/01/ ▪ ¨F. Chen, Z. Zhang, J. Li, J. Kang, and H. Yang, “Service identification via ontology mapping,” in 2009 33rd Annual IEEE International Computer Software and Applications Conference, vol. 1. IEEE, 2009, pp. 486– 491.
▪Challenge of ontology based identification = well defining the proper
▪These endeavors are complex, not mature enough and require a lot of human expertise K
Clustering
58
▪ Clustering algorithms are generally used for service identification by matching candidate sets of legacy system features (or classes in the case of object
depending on a fitness function
Revues
Author defined heuristics based techniques
5 9
▪Heuristic based Algorithms: A formal approach to problem solving based on heuristic rules ▪Approaches based on clustering algorithms, service quality metrics (coupling, cohesion,
▪The challenge = Well defining the heuristics to efficiently identify reusable services
Fitness function generation
Revues
Author defined heuristics based techniques
6
▪Heuristic based with agglomerative clustering technique based on quality metrics is applied in order to get the migrated web services architecture based on maximizing the fitness function. ▪Only a small case study was considered ▪Human expertise needed ▪Subjective final choice of cutting point level
Revues
Genetic Algorithms based example
6 1
▪ Considering both static and dynamic relationships between classes
Research, vol. 1, no. 1, p. 1, 2004.
Genetic Algorithms based example
6 2
Research, vol. 1, no. 1, p. 1, 2004.
▪ 5 possibles solutions ▪What is the best solution ??? High cohesion + low coupling
by performing domain analysisand 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.
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
Theseare the services that are generally consumed by the end-users; for in- stance a service that enables an on-line booking. To implement businessprocesses, these services compose the capabilities/functions providedby the Enterprise, Application and Entity services
They implement generic business functionsthat are generally reused across different app
specific to an application. They may be created to support reuse within the application scope or to 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.
Suggested best practices for Service Identification based on the survey results
A- Service identification as a business value driven process
(2) watch legacy transactions with the business process to establish what transactions have to work together (high cohesion). (3) identify the services to support the business process. B- Good comprehension of and expertise in legacy software systems
C- Focus on source code
D- Define the idenification direction based on the availbale artifacts
79
Ø The specification of the services identified in terms of the interfaces offered to their consumers and the interfaces required for external services Ø Consider 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) Sevice Composition and orchestration
(1) (2)
Microservice
(not directly anyway) with other services;
There is no standard for microservice :(
SOA Microservice architecture
Built on the idea of “share-as-much-as-possible” architecture approach Built on the idea of “share-as-little-as-possible” architecture approach Uses enterprise service bus (ESB) for communication Uses less elaborate and simple messaging system Supports multiple message protocols Uses lightweight protocols such as HTTP/REST & AMQP Use of containers (Dockers, Linux Containers) less popular Containers work very well in MSA Maximizes application service reusability More focused on decoupling Uses traditional relational databases more often Uses modern, non-relational databases DevOps / Continuous Delivery is becoming popular, but not yet mainstream Strong focus on DevOps / Continuous Delivery Coarse-grained / fine grained services Only fine grained services
reliably and efficiently
decryption as required, validation, etc.
availability or other reasons
complex
the services identified
available legacy artifacts
Conclusion
Thank you!