1 month ago

Service Oriented Architecture.

Tariq Hashim - Software Developer @uniparticle.
Web Development
Backend

Service-oriented architecture (SOA) is a new architectural pattern that is based on new design principles which support loosely coupled systems instead of tightly coupled systems that are used in object-oriented architecture.

Programming frameworks were initially planned as stone monument applications that were difficult to oversee. The development of customer worker engineering and the detachment of UI, business rationale, and information base extemporized on the previous methodology with their seclusion. The SOA made it a stride further by providing a common network protocol regardless of the software language that was used to build this service.

SOA Composition:

The SOA is based on three important roles - service provider, service broker, and application builder.

The software provider is the software engineer who builds services for technical or business objectives. The service broker is the place in which service providers publish their own services and stores them in a registry that saves all the service published information including service provider, service functionality, and service contract so that service consumers can consume them.
The application builder is the software engineer who searches for services to be utilized to build the whole application together through searching the service brokers for the desired services and reading the provided documents to decide whether these services will be suitable for the application.

Services created can be built either in SOAP (Simple Object Access Protocol) or Rest (Representational State Transfer) and their interface used for communication is based on WSDL (Web Services Description Language).

Before we discuss more about the SOA principles, let's discuss what are service properties:

  • Services are self-contained in which the logic implemented in a server is independent of other services logic. This property provides loose coupling between many services which makes modifications in the technology used in service very smoothly without affecting other processes that run by other services.
  • Services are a black box for its consumers as the consumer just uses the proxy provided by the service provider without even knowing the logic or the code inside that service which protects and saves the work done by the service provider from not being used for unethical purposes.
  • A service can use other services to achieve the business goal needed for the application.

SOA features:

1- Standard service contract:

Services have a standard contract format in which all services follow the same format which makes it easy for application builders to search and use provided services.
2- Loosely coupling:

The interface point between the service and the service consumer doesn’t change no matter what changes are made inside the service itself by the service provider.
3- Abstraction:

The service will remain to work properly if the technology used inside the service was changed.
For example, if the service was built in NET and changed to Django, Laravel, or Node js frameworks, the service functionality won’t be affected at all.

4- Reusability:

Service reusability is one of the important features in SOA, Developers should take into consideration while developing a service to implement their functionalities to be generic so that it can be used in multiple systems and platforms.
5- Autonomy:

Services should have full control over the inside logic implemented and less reliant on the external system design.
6- Statelessness:

Service should be stateless meaning that it doesn't need to store the previous state.
7- Discoverability:

Services should be published in a common service registry so that when application builders search for a service through service brokers, they can find it easily.