Digital transformation increasingly depends on API-driven strategies. APIs are the digital connectors that act as glue between autonomous digital assets. Connecting humans, things, applications, and data is a fundamental requirement to become a digitally-drive organisation.
Layered and segmented architecture are two API-centric architecture patterns.
Layers typically describe the same responsibility of a group of components in terms of similar capabilities. The number of layers can differ, but most approaches recognise at least three layers: presentation, logic, and data. Data flows between layers. often in a sequential manner.
As microservices became popular it led to the introduction of microservices into existing architectures. As enterprises and teams were struggling to integrate this well a microservice layer came to surface, as shown in the image below.
The paper identifies the following limitations with this paradigm.
Primarily the business logic and integration logic focused on service composition (orchestration and choreography) moved to microservices. The centralised nature of the runtime, dependency with multiple application architecture layers, and hypervisor-based and bare-metal infrastructure did not support the flexibility and depth required for MSA. Container-based infrastructures were there at that time, such as Linux Containers (LXC) and Warden, but they were not mature enough to run production systems.
As enterprises moved to adopt agile methodologies and self-organising teams, shifting full ownership to end-to-end teams, it also introduced ownership of runtimes by breaking up those runtimes into smaller partitions. Hence, segments. This allowed for more freedom in application development by providing isolation on runtime level.
Thee segmentation approaches can be categorised:
In a segmented architecture the usage of API is similar to the layered architecture. It is recommended to use APIs to communicate between segments. APIs glue the segments as wel as the components inside each segment.