What is Service oriented architecture (SOA)
An architecture in which one client gets different services from third-party without reinventing it is known as SOA. For example, a person wants to build a website. A website needs a payment gateway, products shipment service, and web hosting. So that person will integrate any payment gateway like PayPal, and use any 3rd party shipment services and gets hosting from some company. Now that person don’t need to make his own payment gateway or he doesn’t need to make his own web hosting company to make the website. The idea is to use already build products and expand your business without reinventing everything.
If we need any type of service then we can contact the service provider and that service providers give us that service on the monthly or yearly basis.
Advantages of Service oriented architecture
Maintenance is easy:
Editing and updating any service is easy. You don’t need to update your system. Service is maintained by a 3rd party and any change in that service will not affect your system. In most cases old API work as it is working before.
Same directory structure:
Services have the same directory structure so that consumers can access the service data from the same directory every time. If any service has changed its location then also directory remains same. This is very helpful for consumers.
Prevent reinventing the wheel:
The company can use pre-build service and don’t have to rebuild the same functionality from scratch. This will also increase the productivity of the company. Now the company can only focus on its own website or software without worrying about external component integration.
Scalable:
If any service getting many users then it can be easily scalable by attaching more servers. This will make service available all time to the users.
Reliable:
Services are usually small size as compared to the full-fledged application. So it is easier to debug and test the independent services.
Quality of code improved:
As services run independent of our system and they have their own style of code so our code is prevented from redundancy. Also, our code becomes error free.
Independent of other services:
Services are independent of each other. So services can be used by multiple applications at the same time.
Platform independence:
Services communicate with other applications through common language which means it is independent of the platform on which application is running. Services can provide API in different languages e.g. PHP, JavaScript etc.
Disadvantages of Service oriented architecture
Extra overload:
In SOA, all inputs are validated before it is sent to the service. If you are using multiple services then it will overload your system with extra computation.
High cost:
SOA is costly in terms of human resource, development, and technology.
High bandwidth server:
As some web service sends and receives messages and information frequently so it easily reaches a million requests per day. So it involves a high-speed server with a lot of data bandwidth to run a web service.
Examples of Service-oriented architecture
Some examples of SOA are below:-
- A website using payment service like PayPal integration
- An e-commerce website using TCS service (or any other service) for physical shipment of products
- Any hotel getting food prepared through any outer service provider
- Any big organization get extra services from providers to run their business is included in SOA