You are on page 1of 29

Service Oriented Architecture

• Based on  Services
• A service –
- is a well defined and self contained
functionality
- (newer version of - a Component)

• SOA contains – multiple autonomous services


• Services can be provided by –
- different vendors
&

• Different services may use –


- different technologies for its internal implementation

• An application
- can discover the required services
- Services can communicate with each other
- and can exchange information using standard
protocols
• The Service Description is associated with each
service.

• Service Description specifies –


- Name and address or location of the service.

• a service can be used by multiple clients

• A client has to register for the service that it want


to access.
Design Principles for Services
1. Abstraction
2. Loose coupling
3. Reusability
4. Service contract
5. Autonomy
6. Discoverability
7. Statelessness
1. Abstraction
• Implementation details of the service are
hidden

• Only interface is offered to access the service

• Interface specifies –
- what input a service requires
- to generate the desired output
2. Loose coupling
• The services should be independent of each
other (i.e. self contained)

• Ideally,
- Service should not communicate with
other services, while serving the request
3. Reusability
• Services should be designed such that

• They can be reused among different clients


4. Service Contract
• Well defined service interface &
• Quality parameters of the service –
- response time
- service availability etc

• must be known to the service consumer


5. Autonomy
• Service
- should run without help of other services
- should be self contained
- should be loose coupled
6. Discoverability
• Service must implement and support
- External mechanism
- By which service can be discovered
7. Statelessness
• Service should not depend on
- Client’s state or
- should not be aware of client activities

• For the service –


- all consumers should be similar
- and should be remain in same state.
SA Pattern for SOA :
Broker Patterns
• A Broker (or Object Broker)
- is an intermediary between client &
server
- Hides all complexities related to service,
from the client

• Pattern of getting the service is called –


- Broker Pattern
- Object Request Broker (ORB) Pattern
Sub Patterns
1. Service Registration Pattern

2. Broker Forwarding Pattern

3. Broker Handle Pattern

4. Service Directory Pattern or Yellow Brokering


1. Service Registration Pattern
1. Service has to register itself with the broker
- With the following information –
- Service  name, description, location

2. Broker registers the service


- in Service Registry and
- replies with an acknowledgement.
2. Broker Forwarding Pattern
1. Client
- determines – the service required
- sends the request message to the broker
- using agreed protocol, in the required format
2. Broker
- analyses the requested service,
- locates the service and
- forwards the request to service provider
3. Service provider
- interpret the request and
- sends a response message to broker
4. Broker
- forwards the response message to client
3. Broker Handle Pattern
1. Client
- determines – the service required
- sends the request message to the broker
- using agreed protocol, in the required format
2. Broker –
- locates a service and
- Returns a service handle to the client
3. Client
- makes direct request for the service to the
provider, using handle
4. Service provider
- interpret the request and
- sends a response message directly to the client
4. Service Discovery Pattern
1. Client – Sends the request for the type of the service.

2. Broker – provides the list of all the services of the same


type

3. Client – selects a service


4. Broker – locates the service
- sends handle for the requested service
5. Client – Generates the request by using the handle
6. Service provider –
- interprets the client request and responds
directly to the client
SOA Implementation : Technology Support
1. Web Service Protocols
2. Web Services
3. Registration Services
4. Brokering & Discovery Services
1. Web Service Protocols
• Web service protocol
- provides standard
- for communication between client & servers

• WWW (W3C)
- developed a lightweight protocol
- Simple Object Access Protocol (SOAP)
- based on XML and HTTP messages

• SOAP contains –
1. Envelop – describes the message
2. Encoding Rules – for the sender, receiver and data type
description
3. Convention – to represent response message and RPC
Why SOAP?
Other distributed technologies failed on the Internet
1. Unix RPC –
- requires binary-compatible Unix implementations at
each endpoint

2. CORBA – requires compatible ORBs


3. RMI – requires Java at each endpoint
4. DCOM – requires Windows at each endpoint

• SOAP is the platform-neutral choice


- Simply an XML wire format
- Places no restrictions on the endpoint
implementation technology choices
2. Web Services
• Provides a standard and convenient way
- for application to application communication
- over the internet

• Provides an API
- to have communication between different
software
- (hosted on internet as services)

• A service can be composed of


- several applications
- coordinating with each other
3. Registration Services

• Services
- are registered (or published) here
- and provided to the clients through
the brokers
- (like CORBA, DCOM, Web Service Brokers)

• WSDL (Web Services Description Language)


- A standard meta language used to describe
the services offered.
4. Brokering & Discovery Services

• Client - discovers the required services using

• UDDI - (Universal Description, Discovery & Integration)


• A mechanism to register and locate WS based application.
• contains –
- Web XML documents
• Using - XML schema –
- client finds the required service over the
internet

You might also like