SOA vs Microservices

SOA (Service oriented architecture) and Microservices are two different architectures for web application development. Service Oriented architecture focuses on reusing services and components throughout the web application to reduce the amount of effor…


This content originally appeared on DEV Community and was authored by Priyanshi Sharma

SOA (Service oriented architecture) and Microservices are two different architectures for web application development. Service Oriented architecture focuses on reusing services and components throughout the web application to reduce the amount of effort to write code by reducing redundancy. The services are code and data integrations to build and execute a functionality; for example- syncing an email, validating a logged-in user with cookies, sending notifications. Whereas on the contrary microservices architecture focuses on high reliability and availability of the application even if redundancy in data resources and code has to be adapted. Every functionality in the web application is developed as a service that gets containerized and hosted on a separate server instance. Such an approach enhances the agility of web applications and it keeps on working even if some of the services fail.

In SOA the whole backend system application is divided into three parts i.e. controller, services and business logic. The whole backend system is hosted on a single server instance and the services in the backend system can communicate with each other directly, however to the external world (frontend and third-party apps) these services are made available via API calls. Whereas in microservices architecture these services are developed and deployed as separate applications on their own server instances. The communication between services is also done via APIs in a microservices architecture.

When to use SOA(Service Oriented Architecture)?

Service oriented architecture should be used whenever you are building a web application with the following aspirations:

  • Whose users can bear the downtime?
  • When a web application is required in comparatively less budget than highly resilient web apps.
  • When the business owner wants to save server and device maintenance cost by migrating every enterprise application on the cloud.
  • A large web application needs to be developed in a shorter time frame.
  • When Single points of failure are tolerable.
  • When Data redundancy is tolerable.

Advantages and Benefits of SOA architecture

  1. Since SOA focuses on reusing services throughout the web application so the speed of development is faster.
  2. Faster development speed consequences in less cost of web application development.
  3. The code written in SOA is easily readable and manageable.
  4. The deployment is easier in SOA because web applications are deployed only on a single server instance.
  5. The cost of servers to run web applications developed in SOA is very less.
  6. Businesses don’t need to provide support for multiple versions of an application because the rollout of new applications is done on a production server instance so it becomes available to everyone at the same time.

Disadvantages of Service Oriented Architecture

  1. The extreme reusability of data and services results in extreme dependability which often becomes a single point of failure for the whole web application.
  2. A Large server instance is required to host the web application which imposes hardware limitations such as data bus and network communication bandwidth.
  3. The deployment of such bulky web applications built over SOA takes a lot of time to deploy and stabilize the release. It’s the main reason why the deployment of such web applications is scheduled on weekends.
  4. The web application development in SOA becomes dependent on a single programming language or a framework. It often happens in the development process that an open-source functionality or a better implementation is available in another programming language but the development teams cannot consume it within their application. In such scenarios, the development teams also have to develop that functionality which consequently increases the development cost and time.

Why microservices architecture?

Microservices architecture works on the principle to decentralize everything within the web application. Microservices architecture offers high resilience and availability by adapting to the redundancy of server instances and data duplication. This redundancy and duplication reduce the cost efficiency of the web application development and deployment process. Since services are deployed as separate applications on their own server instances with backup containers ready to run in case there is a spike in service call requests, the failure threshold gets pushed up. The high availability of hardware resources enables applications to offer high resilience. The workload on applications being distributed over independent services enables high availability because the web application will not fail even if some of the services stop working. The cross-region replication protects the data from hazards and offers low latency.

When to use microservices architecture?

Microservices architecture should be used whenever you are building a web application with the following aspirations:

  • When zero downtime is desirable.
  • When web application development and deployment cost is less of a concern than high resilience and availability.
  • When single points of failure aren’t tolerable.
  • When you have ample time to develop a web application.

Benefits of Microservices Architecture

  1. Microservices architecture offers high availability, reliability, resilience and low latency(when application requests are redirected to the closest deployment server).
  2. Applications are agile, nimble and easy to scale up.
  3. The web applications become programming language and framework independent as each and every service can be developed independently.
  4. The deployment process is smoother as it is done service by service so there is usually no web application downtime.
  5. The selection of server instances and cloud hosting plans is correlated to the use case and usage frequency of service hence, the dependability on a large server instance is eliminated.

Disadvantages of microservices architecture

  1. The development process is extremely time-consuming and tedious due to the complex structure and deployment is also of the same nature because new feature deployments have to be done service by service.
  2. Additional infrastructure to observe, monitor and secure the service deployments is required.
  3. The development and deployment are comparatively very high than the web applications developed over SOA.
  4. You have to hire developers with a comparatively bigger skillset.

Source: Decipher


This content originally appeared on DEV Community and was authored by Priyanshi Sharma


Print Share Comment Cite Upload Translate Updates
APA

Priyanshi Sharma | Sciencx (2021-04-15T08:20:36+00:00) SOA vs Microservices. Retrieved from https://www.scien.cx/2021/04/15/soa-vs-microservices/

MLA
" » SOA vs Microservices." Priyanshi Sharma | Sciencx - Thursday April 15, 2021, https://www.scien.cx/2021/04/15/soa-vs-microservices/
HARVARD
Priyanshi Sharma | Sciencx Thursday April 15, 2021 » SOA vs Microservices., viewed ,<https://www.scien.cx/2021/04/15/soa-vs-microservices/>
VANCOUVER
Priyanshi Sharma | Sciencx - » SOA vs Microservices. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/04/15/soa-vs-microservices/
CHICAGO
" » SOA vs Microservices." Priyanshi Sharma | Sciencx - Accessed . https://www.scien.cx/2021/04/15/soa-vs-microservices/
IEEE
" » SOA vs Microservices." Priyanshi Sharma | Sciencx [Online]. Available: https://www.scien.cx/2021/04/15/soa-vs-microservices/. [Accessed: ]
rf:citation
» SOA vs Microservices | Priyanshi Sharma | Sciencx | https://www.scien.cx/2021/04/15/soa-vs-microservices/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.