Home > REST Constraints > Layered System

Layered System

A REST-based solution can be comprised of multiple architectural layers, and no one layer can "see past" the next. Layers can be added, removed, modified, or reordered in response to how the solution needs to evolve.

The Layered System constraint builds on Client-Server to add middleware components (which can exist as services or service agents) to an architecture. Specifically, Layered System requires that this middleware be inserted transparently so that interaction between a given service and consumer is consistent, regardless of whether the consumer is communicating with a service residing in a middleware layer or a service that represents the ultimate receiver of a message. Similarly, a service does not need to be aware of whether its consumer is further communicating with other services, or whether the consumer itself is also acting as a service for other consumer programs.

This form of information hiding simplifies distributed architecture and allows individual architectural layers to be deployed and evolved independently of specific services and consumers.