Unit I SOA Introduction
Unit I SOA Introduction
SOA introduction:
Complexity is a fact of life in information technology (IT). Dealing with the complexity while
building new applications, replacing existing applications, and keeping up with all the
maintenance and enhancement requests represents a major challenge.
If all applications were to use a common programming interface and interoperability protocol,
however, the job of IT would be much simpler, complexity would be reduced, and existing
functionality could be more easily reused. After a common programming interface is
in place, through which any application can be accessed, existing IT infrastructure can be more
easily replaced and modernized.
This is the promise that service-oriented development brings to the IT world, and when deployed
using a service-oriented architecture (SOA), services also become the foundation for more easily
creating a variety of new strategic solutions, including:
An SOA facilitates the composition of services across disparate pieces of software, whether old
or new; departmental, enterprise-wide, or inter-enterprise; mainframe, mid-tier, PC, or mobile
device, to streamline IT processes and eliminate barriers to IT environment improvements.
The Web Services Description Language (WSDL) has become a standard programming interface
to access any application, and SOAP has become a standard interoperability protocol to connect
any application to any other. These two standards are a great beginning, and they are followed by
many additional Web services specifications that define security, reliability, transactions,
orchestration, and metadata management to meet additional requirements for enterprise features
and qualities of service. Altogether, the Web services standards the best platform on which to
build an SOA—the next-generation IT infrastructure.
SOA Evolution:
Pros: This model is very easy to maintain as everything we need to store in single place i.e.
server
Cons: The major drawback is scalability. More users enter into the system and develop some
functionality and then add this functionality to the application. It is difficult to store these
application logics in single place.
In 1980’s lot of users uses PCs to access information. A lot of work that main frame was doing
could now off loaded to the PCs. So, PC’s can do business logic, presentation logic and
validation and Mainframe can maintain data and portion of business logic. So, here the main
frame could act as the data server. This model called Client/Server model. The server here is the
Main Frame and the client is the PC.
Pros: The major pros here are scalability is improved. The PCs now can do more tasks, so it’s
easier to add more users and more business logic.
Cons: The most important problem here is the maintenance. Actually it’s the biggest problem in
this level; let’s say we have 5000 users who are running some applications, when it comes the
time to update the application, whether we do bug fix, handling more functionality inside the
application, we've to go to the 5000 PCs and update their application on all of these different
PCs. It’s really hassle to do such process frequently. Another problem we had that all PCs had
different configurations, if you work in a large organization, you might have users running
windows 95, windows 98, windows 98 SE, windows 2000, windows 2000 SP1, windows XP,
windows XP SP1, windows XP SP2, .. etc. Getting all of those PCs to work with whether the
application you are working in could be a real challenge.
In the late of 1990’s and early 2000’s we have 3-tier architecture. We have the main Server that
holds the data base and the most important business logic, and then we have an Application
Server in the middle and the client (usually PCs running a browser). We have a great scale of
scalability as we can add more application servers at this level, we might cluster some of them or
we can have a load balancer to handle all different PCs that going to access information from
server.
Pros: Maintenance which is the biggest problem in Client/Server architecture. Instead of going
to the whole bunch of PCs and updating the application, we just update it in one side, we update
the Application Server. So, when we want to roll out some functionality or bug fix, we just roll
out to the Application Server, the PCs access the application server and get the new application,
the Application Server interacts with the Data Server and do the appropriate business logic. As a
result scalability and maintenance are the most important pros of this model
Cons: The model had high level of complexity. We’re looking to a true distributed system here
and it’s hard to figure out in a lot of cases in these large applications where does the code live.
So, if we have some validation code, does it live in PCs? Is the validation going on the
application server? Is the validation going on the data base level of the server or in the business
logic? Although we have really true scalability and eliminated a lot of the maintenance issues,
but this getting real complex in terms of how we construct our application or in other word how
we are going to architect all of these systems together.
Service Oriented Architecture (SOA):
We've seen how complexity of the distributed applications of the 3-tier model was. We’re going
to isolate each one of those individual pieces in the 3-tier architecture as the below diagram:
Now, we’ve a really complex application like ERP we’ve stuff like Oracle E-Business suites R12
and SAP. These applications have: Account Receivable (AR), Account Payable (AP), General
Ledger (GL), Purchase Order (PO), Inventory Management (IM), Credit Check, .. etc. What if
we can isolate these pieces and called them Web Service. The Web Service is like a black box
that can be accessed to provide a specific functionality within the system. So, here we have a
Web Service for AR, AP, GL, PO, IM and credit check.
Let’s say that we’re going to develop a Web Service for credit check. Credit check actually does
what it sounds like, may put some vendors information in it, how much money we want to give
them credit for and doing some analysis of how they paid their bills, .. etc. We’ve now another
level of flexibility, a flexibility to isolate and understand the functionality of each single Web
Service. We can use this web service across all of our different applications inside
our organization. We can also re-use the code of the Web Service over and over.
Several industry trends are converging to drive fundamental IT changes around the concepts and
implementation of service orientation. The key technologies in this convergence are:
1) Business Process Management
2) Service-oriented Architecture
3) XML
4) Webservices
Extensible Markup Language (XML): A common, independent data format across the
enterprise and beyond that provides:
Standard data types and structures, independent of any programming language,
development environment, or software system.
Pervasive technology for defining business documents and exchanging business
information, including standard vocabularies for many industries.
Ubiquitous software for handling operations on XML, including parsers, queries, and
transformations
Webservices: Services are software components with well-defined interfaces that are
implementation-independent.
Services are self-contained (perform predetermined tasks) and loosely coupled (for
independence)
Services can be dynamically discovered
Composite services can be built from aggregates of other services
Technology
Client Server Architecture makes use of 4GL programming languages and for performance
reasons make use of 3GL programming languages. They also use vendor based RDBMS
packages. In case of SOA XML data representation architecture along with SOAP message
framework. It makes use of HTML, CSS, and HTTP etc.
Security
In case of the client server the security is centralized at the server side. But security can also be
realized on the client side.SOA heavily depends on WS-security framework for security.
Administration
In client server architecture the maintenance cost are high and administration problems are also
involved.
SOA is also not that immune to client-side maintenance challenges.
The differences between SOA and Distributed Internet Architecture lie in the principles used to
determine the three primary design considerations.
The significant difference is in how services exchange information. In distributed Internet
architecture the components provide method that once invoked, send and receive parameter data.
Web Services communicate exchanging the SOAP messages.
Application Processing
Components are responsible for the majority of the application processing.
Distributed Internet Architecture promotes use of proprietary communication protocols like
DCOM and CORBA for remote data exchange.
SOA relies on message-based communication. This involves the serialization, transmission and
deserialization of SOAP messages containing XML documents. Processing also involves
conversion of relation data into an XML-compliant structure, the validation of the XML
document prior and subsequent to transmission, and the parsing of the document and extraction
of the data by the recipient
Technology:
Distributed computing consists of components, server side scripts and web technologies like
HTML and HTTP.SOA consists of distributed objects using Xml and web services.
Security
In order to ensure the safe transportation of information and the recognition of user credentials,
while preserving the original security context, traditional distributed internet architectures
incorporate security approaches such as delegation and impersonation.
SOAs heavily rely on the extensions and concepts established by the WS-Security framework.
Administration
Maintaining component-based applications involves keeping track of individual component
instances, tracing local and remote communication problems, monitoring server resource
demands and the standard database administration tasks.
SOAs typically require additional runtime administration involving exception handling with
messaging frameworks. The other maintenance tasks include resource management.
Web Services:
A web service is a software module which is designed to perform a certain set of tasks. Ex:
retrieving an online bank statement.
Web services provide a common platform that allows multiple applications built on various
programming languages to have the ability to communicate with each other
The web services can be searched for over the network and can also be invoked
accordingly.
When invoked the web service would be able to provide functionality to the client which
invokes that web service.
The main component of a web service is the data which is transferred between the client and the
server, and that is XML. XML (Extensible markup language) is a counterpart to HTML and easy
to understand the intermediate language that is understood by many programming languages. So
when applications talk to each other, they actually talk in XML. This provides a common
platform for application developed in various programming languages to talk to each other. Web
services use something known as SOAP (Simple Object Access Protocol) for sending the XML
data between applications.
But let's look at some other advantages of why it is important to use web services.
1. Exposing Business Functionality on the network - A web service is a unit of managed
code that provides some sort of functionality to client applications or end users. This
functionality can be invoked over the HTTP protocol which means that it can also be
invoked over the internet. Nowadays all applications are on the internet which makes
the purpose of Web services more useful. That means the web service can be anywhere
on the internet and provide the necessary functionality as required.
4. Reduction in cost of communication - Web services use SOAP over HTTP protocol, so
you can use your existing low-cost internet for implementing web services.
1. They are XML-Based - Web Services uses XML to represent the data at the
representation and data transportation layers. Using XML eliminates any networking,
operating system, or platform sort of dependency since XML is the common language
understood by all.
2. Loosely Coupled – Loosely coupled means that the client and the web service are not
bound to each other, which means that even if the web service changes over time, it
should not change the way the client calls the web service. Adopting a loosely coupled
architecture tends to make software systems more manageable and allows simpler
integration between different systems.
4. Ability to support Remote Procedure Calls (RPCs) - Web services enable clients to
invoke procedures, functions, and methods on remote objects using an XML-based
protocol. Remote procedures expose input and output parameters that a web service
must support.
5. Supports Document Exchange - One of the key benefits of XML is its generic way of
representing not only data but also complex documents. These documents can be as
simple as representing a current address, or they can be as complex as representing an
entire book.
In order for a web service to be fully functional, there are certain components that need to be in
place. These components need to be present irrespective of whatever development language is
used for programming the web service. These components are SOAP, WSDL and UIID.
Each SOAP document needs to have a root element known as the <Envelope> element. The
root element is the first element in an XML document.
The "envelope" is in turn divided into 2 parts. The first is the header, and the next is the body.
The header contains the routing data which is basically the information which tells the XML
document to which client it needs to be sent to.
The body will contain the actual message.
The client invoking the web service should know where the web service actually resides.
Secondly, the client application needs to know what the web service actually does, so that it
can invoke the right web service. This is done with the help of the WSDL, known as the Web
services description language. The WSDL file is again an XML-based file which basically
tells the client application what the web service does. By using the WSDL document, the
client application would be able to understand where the web service is located and how it can
be utilized.
The important aspects to note about the above WSDL declaration are as follows;
<message> - This element is basically used to describe the data that gets exchanged between the
Each message, in turn, will have a <part> element which is used to describe the parameter
used by the input and output message.
</message>
</message>
<portType> - Ports are used in WSDL to define one complete operation which is offered by the
web service. In the previous example, together the input and output message form is known as
one complete operation.
WSDL provides an element called <portType> which is used to define the operations provided
by the Web service.
<operation name=”grade_calculation”>
<input message=”studentrequest”/>
<output message=”studentresponse”/>
</operation>
</portType>
UDDI is a standard for describing, publishing, and discovering the web services that are
provided by a particular service provider. It provides a specification which helps in
hosting the information on web services.
UDDI provides a repository on which WSDL files can be hosted. So the client
application will have complete access to the UDDI, which acts as a database containing
all the WSDL files.
Just as a telephone directory has the name, address and telephone number of a particular
person, the same way the UDDI registry will have the relevant information for the web
service. So that a client application knows, where it can be found.