What is SERVICE-ORIENTED Architecture (SOA)

SOA is a “service” oriented architectural design, which is a way or idea of architectural design, not the technical implementation of a specific middleware or protocol. Before SOA was born in the late 1990s, sharing data or functionality between systems required complex point-to-point development integration, where developers had to connect point-to-point for each new project. OpenGroup published a white Paper on SOA in 2007, which was subsequently developed into THE SOA Source Book, including SOA standards, SOA White Paper, etc. The latest version of the Source Book is the 7th edition (up to 2020-06). The definition of “service” is:

  • Reusable business activities that specify results, such as weather data queries, shopping cart creation, and so on;
  • Independence (loosely coupled), where a service is self-contained;
  • Composition: A service can be composed of multiple other services.
  • Black boxes, where consumers do not need to pay attention to the internal details of the service;

SOA opens up services over networks (TCP/IP), is an important foundation for cloud computing, and a number of facts and results demonstrate the benefits of SOA:

  • There is no restriction of development language in servitization, and services are accessed through common protocols.
  • Function reuse, after the program components servitization, can also be used for the needs of other scenarios;
  • Business agility, SOA system provides a series of business semantic services, can quickly combine and integrate these services, responding to changing needs;
  • Reuse the existing system, can directly use the existing program components or modules for servitization;
  • Facilitating communication between business and technology, SOA defines services in terms of business semantics, which makes it easier and more direct for business people to communicate with developers.

Relationship between SOA and SOAP

SOAP (Simple Object Access Protoclol) is a communication protocol between systems. It is implemented based on HTTP+XML. Common implementation frameworks include Xfire, Axis2, and CXF. Therefore, SOAP, REST, and so on can be used as protocol implementations of SOA architecture.

SOA Service layering

A software system designed using SOA is composed of a series of services. The service layering diagram of SOA is as follows:

Service governance

After servitization, one service will be called by multiple callers, and one caller will call many services, thus forming a complex network call link. Based on these requirements, service governance frameworks such as Dubbo and Spring Clound were born.

Service governance mainly solves the following problems:

  • Connectivity: registration and discovery of services
  • Robustness: Services continue to be available after some service providers or registries go down.
  • Scalability: service providers can dynamically add deployment instances;

What is microservices Architecture

Microservices Architecture (MSA) is also an architectural approach that builds systems through atomic and independent services. It is usually not used on an enterprise scale, but is used to build a single application or system to improve agility, scalability, and resilience. The main characteristics of microservices are independence. They can be independently developed and compiled (without interface dependence of other services), can be independently deployed (without deployment order dependence), can be independently run (without startup order dependence), and can be independently extended (adding or reducing deployment instances).

Scale Cube for Microservices

The Scale Cube is a model that defines microservice extensibility and consists of three axes:

  • X-axis: Horizontal scaling of service instances to ensure reliability and performance
  • Y-axis: refinement and separation of functions to achieve expansion, single service responsibility, independent function;
  • Z-axis: data partition, data independence, reliability assurance;

Size of microservices

One well-known theory of microservice size is Amazon’s two-pizza team (the entire team can feed on two pizzas), which means a team of about 12 people.

reference

  • The IBM Cloud definition of SOA
  • SOA vs microservices
  • Scale Cube
  • Micro service
  • Microservices – Java, the Unix Way
  • What is Service-Oriented Architecture (SOA)?