Understanding Serverless Computing. Not Just an Architecture Style

Understanding IT architecture styles is crucial for anyone involved in the design and development of software systems. These styles provide a framework of principles, patterns, and guidelines that shape the structure, organisation, and behaviour of IT applications. However, there is often confusion between architectural styles and deployment models, with serverless computing frequently misinterpreted as an architecture style. It is quite common to include serverless as a new architecture style, along microservices or event-driven architecture. In this article I aim to clarify this misconception, emphasising that serverless is primarily a deployment model rather than an architectural style. By exploring the comprehensive role of architectural styles and the distinct nature of serverless computing, I will highlight why understanding this distinction is essential for effectively leveraging serverless in your IT solutions.

What is an IT Architecture Style?

An IT architecture style is a comprehensive set of principles, patterns, and guidelines that define the overall structure, organisation, and behaviour of an information technology system or application. It provides a high-level framework for designing, developing, and deploying IT solutions. Regardless of the specific architectural style you apply, they all share several common features.

  • Principles and Concepts. A software architecture style defines a set of principles, concepts, and practices that guide the design of software systems. These principles and concepts provide a common vocabulary and shared understanding among software architects.
  • Structural Elements. It defines the structural elements of a software system, such as components, modules, and layers, organised in a way that promotes modularity, flexibility, and scalability.
  • Patterns and Templates. Architecture styles typically provide patterns and templates that help architects make decisions about system structure and component usage.
  • Implementation Technologies. An architecture style may specify particular implementation technologies, such as programming languages, frameworks, or libraries, chosen based on their suitability for the style.
  • Quality Attributes. They consider the quality attributes of a software system, such as performance, reliability, maintainability, and security, providing guidelines to meet these attributes.
  • Trade-offs. Architecture styles often involve trade-offs between different quality attributes or design goals, such as prioritising performance over flexibility or security over ease of use.
  • Standards and Conventions. They include standards and conventions for naming, coding style, documentation, and other aspects of software design, ensuring consistency and maintainability across the system.

Serverless Computing: A Deployment Model, Not an Architecture Style

Having defined what an architectural style encompasses, let’s explore the nature of serverless computing and how it differs fundamentally from an architecture style.

  • Deployment Model. Serverless computing is primarily a deployment model. It is often associated with “Functions as a Service” (FaaS) platforms, where developers deploy individual functions to the cloud, and the cloud provider manages the scaling and underlying infrastructure. This model focuses on how the system is deployed and managed, rather than how it is designed and structured.
  • Scope of Address. While serverless computing offers benefits such as scalability, cost-effectiveness, and increased developer productivity, it doesn’t address all aspects of architecture. For instance, it does not provide solutions for data management, security, or integration with other systems.
  • Compatibility with Various Architectures. Serverless can be used with various architectural styles, such as microservices, event-driven architecture, or even hexagonal architecture (though it is a poor choice for going serverless). This flexibility indicates that serverless is not inherently tied to any specific architecture but can be used in different contexts depending on the system’s needs.
  • Vendor Lock-in. Serverless computing often relies on proprietary services and APIs from cloud providers, which can lead to vendor lock-in. This dependency can make it challenging or costly to switch providers or bring the system in-house.

The Distinction: Architecture Style vs. Deployment Model

An architectural style provides a comprehensive template for designing your entire IT system, irrespective of its size. It encompasses a broad set of principles and guidelines for system structure, component organisation, and quality attributes. Serverless computing, on the other hand, is a runtime environment to which you can deploy parts of your application. It serves as an implementation platform for applications designed using a particular architectural style.

In summary, while serverless computing offers a powerful and flexible deployment model, it does not fulfil the role of an architectural style. Instead, it complements various architectural styles by providing a scalable, cost-effective environment for running application components. Understanding this distinction is crucial for effectively leveraging serverless computing in your IT solutions.