Friday, 11 November 2022

Service Oriented Architecture in NodeJS


Serviceoriented architecture is a way to Building a backend applications by consisting multiple independent services. A service can be any business logic that completes an action and provides a specified result to the end point user.

Each service in SOA is a complete business function in itself.

For an Example

Let’s discuss about a grocery store.

The owner add the product details in the inventory. Then owner search to find data about a unique product. And the backend application database query should be inside the service section by leveraging data access layer. Then it securely fetch data and give the response to the owner.

Layers in Service oriented Architecture

  1. Router layer
  2. Service layer
  3. Data access layer

How SOA Works

        Here first when API call, in node app first it face router section where all the authentication and validation occur through the middleware function. Then control moves towards controller section which work is collect the incoming data related to APIrequest. Here all the business logic to access data are combined inside a service.

So the controller invokes that service and service leverage data access layer to connect with database and calculation. Then services return the data to the controller. After that controller give the response to the end point user.

        The most important benefit in SOA is as all the services are independent and small chunks so whenever we want to change our programing language it should be very fast and easy in development process.


Read more on Service Oriented Architecture in NodeJS

No comments:

Post a Comment