Unit Ii
Unit Ii
Advantages of SOA
Service reusability: In SOA, applications are made from existing services.
Thus, services can be reused to make many applications.
Easy maintenance: As services are independent of each other they can be
updated and modified easily without affecting other services.
Platform independent: SOA allows making a complex application by
combining services picked from different sources, independent of the
platform.
Availability: SOA facilities are easily available to anyone on request.
Reliability: SOA applications are more reliable because it is easy to debug
small services rather than huge codes
Each service in SOA includes description documents that specify the functionality
of the service and the related terms and conditions. Any client system can run a
service, regardless of the underlying platform or programming language. For
instance, business processes can use services written in both C# and Python. Since
there are no direct interactions, changes in one service do not affect other
components using the service.
Loose coupling
Clients or service users in SOA need not know the service's code logic or
implementation details. To them, services should appear like a black box. Clients
get the required information about what the service does and how to use it through
service contracts and other service description documents.
Granularity
Services in SOA should have an appropriate size and scope, ideally packing one
discrete
business function per service. Developers can then use multiple services to create
a composite service for performing complex operations.
Reusability
Service
Services are the basic building blocks of SOA. They can be private—available only
to internal users of an organization—or public—accessible over the internet to all.
Individually, each service has three main features.
Service implementation
The service implementation is the code that builds the logic for performing the
specific service function, such as user authentication or bill calculation.
Service contract
The service contract defines the nature of the service and its associated terms and
conditions, such as the prerequisites for using the service, service cost, and quality
of service provided.
Service interface
In SOA, other services or systems communicate with a service through its service
interface. The interface defines how you can invoke the service to perform
activities or exchange data. It reduces dependencies between services and the
service requester. For example, even users with little or no understanding of the
underlying code logic can use a service through its interface.
Service provider
The service provider creates, maintains, and provides one or more services that
others can use. Organizations can create their own services or purchase them from
third-party service vendors.
Service consumer
The service consumer requests the service provider to run a specific service. It can
be an entire system, application, or other service. The service contract specifies
the rules that the service provider and consumer must follow when interacting
with each other. Service providers and consumers can belong to different
departments, organizations, and even industries.
Service registry
Increasing interdependencies
Service-oriented architecture (SOA) systems can become more complex over time
and develop several interdependencies between services. They can be hard to
modify or debug if several services are calling each other in a loop. Shared
resources, such as centralized databases, can also slow down the system.
For SOA implementations with an ESB, the ESB creates a single point of failure. It
is a centralized service, which goes against the idea of decentralization that SOA
advocates. Clients and services cannot communicate with each other at all if the
ESB goes down.
REpresentational State Transfer (REST)
REST is a software architectural style that defines the set of rules to be used for
creating web services. Web services which follow the REST architectural style
are known as RESTful web services. It allows requesting systems to access and
manipulate web resources by using a uniform and predefined set of rules.
Interaction in REST based systems happen through Internet’s Hypertext Transfer
Protocol (HTTP).