SOAv 1
SOAv 1
SOAv 1
Objectives
At the end of this presentation, you will be able to understand :
Understand SOA and its concepts
Learn SOA services and their life cycle
Understand Enterprise Service Bus
Learn Business Process Management
Understand SOA architecture and Message Exchange Patterns.
Where SOA Comes into Picture in IT
Hybrid services
SOA is very much useful to fill the gap between Business community and IT Infrastructure
Mark seeks Help
John helps Mark…..
John helps Mark
Introduction to SOA
SOA helps to meet the needs of business processes of large distributed
systems.
SOA is based on 3 Concepts
A service will have functionality/work to be done which eases the work of the user/client.
This provided service could be as simple as getting some information from the user and
fetching the required data from the db or it could be as complicated as an entire business
process for an organization.
Enterprise service bus which enables interoperability between systems for services. It makes it
easier to have the services running in multiple systems with different platforms and technologies.
Loose Coupling: when there is tight coupling between systems then the dependency is very high. If
it is loosely coupled then the dependency is low.
It is like writing a method and call this method in all the places. In the method specify the
external dependency.
If there is change in external dependency then only the method has to be modified.
Loose coupling will help in minimizing the risk of modifications and failures.
SOA-Policies and processes
Introducing a new process for the organization is not a simple task. It has to
be done by different teams in the organization.
After defining the policy, there is a need to have the roles and processes
defined.
Take an example of new policy for credit card authorization. It involves various
departments including Marketing, HR, Credit card authorization, Customer
support etc.
SOA Services
The noun ’'service’’ is defined in dictionaries as "The performance of work (a function) by
one for another” by OASIS SOA reference model.
SOA focusses on business functionality. These processes are performed with different steps
on different systems. A service should represent the real world business functionality.
A business person should be able to understand the functionality provided by the service.
Technically, a service takes the required input, processes it and returns the required
information.
SOA is a software architecture that starts with interface definition and builds the entire
application as interfaces so that the client can call the interface.
SOA Services - additional Attributes
Self-contained: They are self governed, independent, autonomous.
Abstraction: Services abstracts the implementation from the client. The issues of abstraction
is, several calls has to be made. Hence, it is better to send the required data at once instead
of sending it multiple times.
Visibility of service: You need to know that a service exits or it can be spread via “word of
mouth”.
Stateless: Services will not maintain the state. Whatever the user asks for, it is served. At
times, for reference purposes it is stored in the database.
Idempotent: You call a service and there is some response from the service. You do not
know whether the response is right or wrong. You call the same service again to verify. This
is called as Idempotent.
SOA Services- Additional Attributes
Reusable: Service is written once and can be used many times.
Composable: A service can call another service as business process is broken into small
functionalities.
SLA: A service can have Service Level Agreements like time to perform the given task,
reliability etc.
Pre and post conditions: Pre and post condition will help to know resolve me lssue(s) of the
customer. Pre condition means customer would have come up with some issues and post
condition is resolving the issue of the customer.
Interoperability: Will be able to communicate between different systems.
If the flight booking systems goes down for an hour there is a loss of 1
million dollar an hour.
Like first name and last name as name in one system and just name in one
system. This has to be binded by a wrapper.
Enterprise Service Bus(ESB)
An enterprise service bus (ESB) is a software architecture model used for
designing and implementing communication between mutually interacting
software applications in a service-oriented architecture (SOA).
The concept has been developed from bus architecture from the computer
hardware. The motivation was to develop a standard, structured and general
purpose component which is of loosely coupled that are expected to run
independently.
In SOA, composing new services using the existing services is called Orchestration.
Like in an orchestra, many music instruments can be combined to generate the required
music. These services are also called as orchestrated services.
For example: If the customer address needs to be updated in many databases like
CRM,RDBMS (MySQL) etc., then composed services can be used.
Services - Process Services
Unlike basic and composed services, process service maintains the state of the
user. One of the example of process service is shopping cart service.
A workflow describes how certain result can be achieved. It looks into the
detailed level of producing the results like steps or activities which needs to
be performed.
BPM and Workflow
BPM and SOA
Business process management is very huge.
It deals with analyzing the business (Including needs and opportunities),
implementing business strategies, monitoring and optimizing business
processes, establishing corresponding tools and culture and aligning business
with IT.
BPM in relation with SOA.
Lowest level of activities of a business process are services. From the business
perspective, it is really not an issue whether the service is basic or composed.
What matters is whether the service is doing the required work / task or not.
Example of BPM with Services
Business Process- High Level or Solution Design
Business Process with Service View
SOA Based Architecture Models
They are:
In the Composed section, all the composed services are defined.
In the Basic section, all the basic data services are defined.
In the back end section, all the back end databases are listed defining the type
of business data to be stored.
Mixed Architecture Models
If some technical details has to be included as part of providing domain / logical view of SOA
then mixed model can be used.
In the figure (in the next slide) you can see both the technical and logical View aspect.
Although technical information is there in the view, it also demonstrates the overall picture of
SOA architecture model.
Logical view is not contradicting with mixed view and vice versa. They are just different views of
the same landscape.
Mixed Architecture Model
Technical Architecture Model
In the technical architecture model, more technical details are provided in the
view.
MEPs define the sequence of messages being called. It will specify the order,
direction of those messages.
Basic MEP-Request/Response(Two way)
Restful - Client
Base URL is obtained for the service.
Methods of RESTful services are invoked by using the path and the media
type.
Apart from writing the client, service can be tested with the URL type.
For example:
http://localhost:8080/jax_rest2/rest/Hello?name=berhanu
Here, service is running under 8080 port. Name of the application is
jax_rest2, /rest/Hello is the Path and name=berhanu is passed as
parameter to this service.
Basic MEP-Request/Response(Two way)
MEP-Fault Messages
When there is error in the given input or when there is an error after processing, the service
provider can specify the faulty message rather than generic message which helps the
consumer to fix
Service-Life Cycle
Implementing Services: It has usual software development Life cycle as:
Then the old version of service should be marked as deprecated and should be
informed to the customers.
In the next release deprecated services can be removed when all the
customers are migrated to the new version of the service.
In large companies, this process takes time as many customers would be using
the old services and they will not be willing to move to the new version of the
services.
SOA Performance
There are different places where performance comes into play in the context of
services and SOA architecture.
If the performance becomes critical then it is usually time to execute the
service is high.
Care must be taken while designing the components of SOA (Business and
Technical) which should take as less time as possible.
Assignment
Assume that you are creating and developing a service for Credit Card
customers.