Doorgaan naar hoofdcontent

Book review: Building Evolutionary Architectures







Key Takeaways
           Three primary aspects of evolutionary architecture: fitness functions, incremental change and appropriate coupling

  • Design for change on multiple dimensions (technical, data, security and operational)
  • Combine DevOps (Continuous Delivery) practices with fitness functions to verify the architecture     
  • Migrate to another architecture for good reasons (for example better team structure and operational isolation), not because “it’s the current trend”


Building Evolutionary Architectures is a promising title for a book. I was also triggered and wanted to read the book. This is a review of the book with my own humble opinion. First a short description of the chapters is given.
Chapter 1 - Software Architecture
A definition of evolutionary architecture is described, which states that it supports guided, incremental change across multiple dimensions. These changes are guided by so-called fitness functions, which provides an objective integrity assessment of some architectural characteristics. In this case architecture aims, the “-ilities”. The dimensions being technical, data, security and operational.
Chapter 2 - Fitness functions
There are several categories of fitness functions, examples:
Atomic vs Holistic (singular context or shared context, assessing one or more aspect(s) of architecture. Examples: unit test verifying modular coupling, security and scalability
Triggered and Continual (so the way they are executed)
Static vs Dynamic (fixed outcome expected vs shifting results)
Automated vs Manual
Domain specific
it is advised to identify these fitness functions as soon as possible.
Chapter 3 – Engineering incremental change
This chapter is mostly of getting the DevOps in place. This is of course an important aspect of doing evolutionary architecture. It goes into continuous delivery and deployment pipelines. And putting fitness functions into the pipelines to verify the architecture. It describes some deployment pipeline patterns.
Chapter 4 – Architectural coupling
Describes the fundamental aspect of architecture: how the pieces are connected and rely on each other. It begins to describe the concepts of modules (logical grouping of code), components (physical packaging of modules). Examples of components: library (with compile time dependency), service (i.e. soap/http).
Another aspect is the functional cohesion where an architectural quantum is an independently deployable component with high functional cohesion, which includes all the structural elements required for the system to function properly. For example in a monolithic architecture this is the entire application. In a microservice architecture this is a microservice and all its dependent parts.
Architectural styles are described:
* Big ball of Mud (system with highly coupled components with no modularity)
* Monoliths (unstructured and modular monoliths)
* Layered architecture
* Microkernel (consisting of core system with plugin components, i.e. Eclipse)
* Event Driven Architectures (type broker or mediator)
* Service Oriented Architectures
* Microservices
* Serverless architecture, types: BaaS (Backend as a Service) and FaaS (Function as a Service)

The book also mentions the service-based architecture style which is most similar to microservices but differs in granularity (larger context), monolithic database and integration middleware. These styles are scored against Incremental change, guided change with fitness functions and appropriate coupling. Microservices is scored as the best architecture for an evolutionary architecture.

Chapter 5 – Evolutionary data
Data is an important dimension when building evolutionary architectures. It describes some parts of database design to consider: evolving schemas, expand/contract pattern.
It is further stated that the database world is far behind the software development world (like tooling in test, refactoring, pipelines).
Transaction is another important form of coupling which architects must consider. Therefore transactional boundaries contexts must be limited,
Chapter 6 – Building evolutionary architectures
This chapter describes the techniques to build an evolutionary architecture. It has three big steps:
1) Identify dimensions affected by evolution (so the dimensions to protect)
2) Define fitness functions for each dimension
3) Use deployment pipelines to automate fitness functions
This is easier on greenfield projects than on existing architecture. Architects face the following problems:
* Highly coupled systems
* COTS (Commercial off-the-shelf) applications don’t support evolution well (most of the time)
* Decomposing a monolith is not only about breaking the classes into smaller pieces, but breaking transactional contexts is hard.
Some partitioning techniques to break up a monolith into services are: business functionality groups (Conway’s Law), transactional boundaries, deployment goals (some departments may want to deploy more often than others)
The following guidelines for building EA are discussed:
* Remove Needless Variability (example: immutable infrastructure refers to systems defined entirely programmatically)
* Make decisions reversible (examples: blue/green deployments in DevOps, feature toggles)
* Prefer evolvable over predictable (the unknown unknowns do appear in each project, there is no crystal ball)
* Build anticorruption layers (abstracting functionality within a semantic API, i.s.o. depending on a syntax of a particular API)
* Use Service Templates (technical aspects that are common, i.e. logging, monitoring)
* Build sacrificial architectures (throw away poc’s and learn from it)
* Mitigate External Change (pull external library changes and control)
* Prefer Libraries to Frameworks (libraries introduce less coupling, frameworks call your code)
* Prefer continuous delivery to snapshots
Chapter 7 – Evolutionary architecture pitfalls and antipatterns
Antipatterns are defined in this book as solutions that initially look good but turn out to be a mistake. Several are discussed:
* Vendor King (architecture build around a vendor product)
* Last 10% trap (first 90% are easy within package software, platforms and frameworks)
* Code reuse abuse (reuse costs a lot and practically no reuse, focus on usability)
* Inappropriate governance (in modern environments do not govern on a single technology stack, servers are cheaper these days)
* Reporting (example: operation through layered architecture, but reporting directly coupled to database directly. Possible solution: event streaming also for reporting database)
Chapter 8 – Putting evolutionary architecture in practice
The last chapter describes the steps required to implement a EA, because it has impact on factors not only concerning software.
There are also organizational factors. Organize domain-centric teams which are cross-functional teams, leading to different roles: business analysts, architecture, testing, operations, data.
Organize around business capabilities i.s.o. technical architecture.
Model the work around products rather than projects. Projects lead to isolation of operational aspects, whereas by thinking of software as a product, the team stays associated with their product.
Use consumer driven contracts to test that integration points between providers and consumers of services are not broken. Culture is also a relevant factor that often needs to be changed within teams. Creating a culture of experimenting (examples: bring ideas from outside, spikes, encourage explicit improvements, create innovation time, connect developers with end-users).
Also some strategies on where to start with EA are discussed. Low-hanging fruit (maybe already fairly decoupled components that implement fitness functions and incremental change). Another is to select highest value first.
The book ends with some reasons why companies should decide to build an EA. One of the reasons is that otherwise a company will likely to fail as more agile startups address the changing ecosystem better. Some other reasons are scalability, fast cycle time to get a competitive advantage and possibilities to choose better suited architectures for different parts.


Conclusion
The book is a good read, however it does not describe new concepts (at least for me). Do not expect deep technical solutions. It does a good job of describing high level concepts. For me the concept of a fitness function was new, at least the name. The idea behind the concept (automatic testing) is not new of course, but it introduces a new level on architecture level. I also like amount of patterns and the advices the book describes.
In the end it gave me some good new insights and tools regarding evolutionary architectures. Reading about architecture is the easy part, doing it still remains a pretty complex job after all, but a job I like.


Reacties

Populaire posts van deze blog

OSB 10gR3 and SWA and MTOM

This blog is about using soap with attachments and the use of MTOM within the OSB (10gR3). A service is created that accepts a soap with attachment (DocumentService) and translates it to a service that accepts a binary element. MTOM is used for performance reasons for the second. Some notes: * For the use of attachments you need RPC-style document instead of the usual document-style. This due to the fact that the document-style limits a message to a single . * A service can not have both SWA and MTOM within OSB. First a WSDL is setup for the DocumentService: The $attachments variable holds the attachments and the body holds the attachment data. Also other data is stored within the attachment element (see h

Microservices mindmap

"The tree" - See also   my photo page When you are fairly new within the Microservices land, there are a lot of terms fired at you. So also for my own understanding i have made a mindmap. I think it has a good status now, so that i can share it with you. As always feedback is very welcome ! You can download the mindmap here .

Book review: Data Management at Scale (Piethein Strengholt)

 This blog is a review of the book "Data Management at Scale (See also at bol.com ) Data Management is a hot topic nowadays and this book does a fantastic job at adding value to this topic. It is a must read and one of the few technical books I finished reading in a weekend. The book gives a fantastic overview on how to implement a Data Mesh data architecture. The Data Mesh concept is explained by Martin Fowler here . The book is a good mix between conceptual and implementation architecture level. It gives a lot of examples of how this architecture at scale can work, for both small and big companies. It is practical and I used it to implement it at one of my customers. The book describes an architecture in which the focus is on the DIAL (Data- and Integration Access Layer).  On a high level the book covers the following topics: The key principles for data management at scale - Domain-Driven Design  - Domain Data Stores - Meta data management Ready Data Store The concept of servin