Monday, July 28, 2014

SOA to a Layman Or What is Service? What is Service Orientation? What is Sevice Oriented Architecture? What is SOA?

What is a Service?
Service means the performance of any duties or work for another. Service is provided by a service provider and consumed by the service consumer. Simple! 

Think about it. We all use and provide services almost everyday in our day today life.  Following are some examples of well-known services:
 


Service Provider: Government 

Services Provided: Education Services, Infrastructure Services, Police and Fire 

Services, Postal Services, and other regulatory services 
Service Provider: Financial Companies 
Services Provided: Accounting Services, Banking Services, Tax Services, and auditing services 

Service Provider:
 Utility Companies 
Services Provided:
 Electricity Services, Gas Services, Communication Services, Water Services, and Waste Management services 

Service Provider:
 Individuals 
Services Provided: Employee Services (various roles), Medical Services, Law and Attorney Services 


One of the formal definition of services in a business sense is "Service is any act or 

performance that one party can offer to another that is essentially in tangible and does not 

result in the ownership of anything."


What is service oriented?
Any approach simple or composite based on services and/or service-mix is service oriented. So is it anything new? No, Actually we already live in a service oriented world and Service oriented approach is so very common in our surroundings. It exists universally and is the most fundamental functional aspect of human life in our society. Service providers and consumers range from an individual person to giant multinational corporations. Most companies provide services that are outcome of services provided to them by individual employees and may be other companies. Service oriented societies and cultures demonstrate some common characteristics such as standard currencies, governance, service composition, and service orchestration. 

Before we talk about Service Oriented approach for software architecture, let's see how some of the principles apply in real life example. Let's go through my example:


My Example of Service: Flight Service
I used to live in Denver and fly for work to customer locations frequently, the obvious real life example I was able to think of was of an airline and the service (flight) it provides. Let's take an example of a service I have used often, flight between Denver and San Francisco. 

Thinking from service perspective, the airline I use is the Service Provider of the flight between Denver and San Francisco. Since I choose to pay for the flight and use the service, which makes me the service consumer.
 

In this example some of the things to note as they relate to SOA are the following:
 


Service Abstraction
The airline uses multiple services, goods, and equipments to provide this service to the customers. The service in itself is very complex technically and is composed of several other services. But from my perspective there is a well defined but simple interface to consume this service. All I need to care about is making the payment for ticket and be on time at the correct Airport and gate :) 

I don't have to worry about paying the Airport for the services such as security, gate fees, air traffic control, and the airline in-flight services. I also don't worry about how the airline manages their employees, equipment, goods, and other services that they consume to provide me with this service.
 

This demonstrates the concept of abstraction. Services abstract the logic and implementation.
 


Service Loose Coupling
Abstraction promotes loose coupling of services. As services are modular, logic contained in them is independent of each other. Awareness of the service is enough for the services to interact and thus they are loosely coupled. They can change within their own boundaries without causing any change required to the consumer. 

In my example, most of the individual services are loosely coupled and communicate using standard interfaces. The airline relies on the services provided by Airport for security and ATC, it does not actually know or have to interact with specific persons providing these services. Airport can very well replace the security and ATC personals and still provide the same service without any awareness required on the service consumers side. Loose coupling is one of the most important concepts of SOA.
 


Service Contract
Service should be defined and be agreed upon by the provider and consumer. My airline in this example agrees to provide me a seat in economy class, provide me with the standard in-flight service, and fly me from Denver airport's particular gate to the SFO airport. I agree to this service by buying the ticket using standard currency (USD in this case). I also agree to be physically present at the airport at the defined time, look up for the gate information, go through the security and walk to the defined gate. Besides the basic known things, there is a formal contract between me and airline (service provider and the consumer). Some of the standards components of service definition in our example are Airports, Flight Numbers, Currency, and Security. 


Service Discovery
The airline that provide me this service is listed on my corporate travel web site as well as other standard and known interfaces and thus can be discovered by me or any other customer. The service should be discoverable. 


Service Composition
The airline service is composed of several other services internally. To provide the service (flying between Denver and San Francisco) to me and other customers, the airline uses various services from multiple service providers. Following are the main category of services that are used by our airline to provide the flying service 


·         Airport Services
·         Employee Services
·         Food Catering Services
·         Entertainment Services 
Following diagram represents the Service that is composed of several other services. Thus 

the end service that I use is a composite service. 









Like the diagram depicts, one service can be composed of multiple service components 

internally. There is a layer of abstraction and thus the consumer of the service does not need 

to know the details. SOA is based on the principle of Service Composition. 


Service Orchestration
In a music world, the person orchestrating a music orchestra symphony decides what music instrument is to be played and when it plays what is the note that it should play. In our example, the flight service has to be perfectly orchestrated to provide the desired level of customer satisfaction. Our airline has to use internal and external services in an ordered and defined way as a process flow. Every service component like drinks, video, audio, announcements are well planned and orchestrated. The airline decides the process flow, execution, and timing of services that we noticed in the diagram above for service composition. Every process in the service has to be executed in a perfect order and style. 

This is Service Orchestration and is a very important component of SOA.
 

Important Characteristics of Service Orientation
Based on my understanding I came up with the following main characteristics or Service Orientation 

·         Service Discover-ability
·         Service Interactions and Amalgamation supported by Open Standards
·         Service Composition
·         Service Abstraction
·         Service Loose Coupling
·         And also importantly Service Real World Effects


What is Service Oriented Architecture?
If we are already living in a world that works based on service oriented approach, what is so different about applying it to software architecture? What is the entire buzz about? 

SOA is a simple and common sense approach adopted from the way things work in our surroundings to the more complex, tightly coupled, and rigid world of software.
 

SOA as it relates to software paradigm is an agile architecture approach that is based on service-oriented principles of composition, abstraction, loose coupling, discover-ability, and amalgamation. SOA inherently empowers scalability, evolution of services, interoperability, reusability, and modularity.
 


Why is SOA Needed?
Simplicity is desired for the traditional and complex IT world. Better and common sense approaches should be enabled. SOA is needed for the following main reasons: 

·         To provide seamless agility to business
·         To improve business process visibility
·         To simplify the current rigid and complex state of IT
·         To enhance efficiency and provide cost-effectiveness
·         To enable reusability factor
·         To provide better quality of service
How is one company's SOA different than the other?

SOA as such is not a product that can be bought, rather is an approach towards building modular software using service-oriented principles. There are tools that can be used to realize the service-oriented approach efficiently. Many companies provide tools for assisting enterprise software implementation based on services and service-oriented architecture approach. In case of Oracle, the components for SOA are bundled as SOA Suite which is a complete set of service infrastructure components for building, deploying, and managing SOAs.

No comments:

Post a Comment