Tim Teulings Blog www.anderenen.de

Agile Architecture Requirements

This article tries to identify some additional requirements on an technical software architecture and also hints at existing requirements that possibly have to get newly weighted in the context of a project that is driven by DevOps an Agile approaches.

Definition of Technical Architecture

Before looking at the details, lets be more precise regarding the definition of “technical software architecture”.

I use the term technical software architecture to explicitly differentiate between technical and business architecture. Having some DDD background I would for example (besides other potential things) assign the actual business model based on the business requirements to the business part of the software architecture. This business part of# course is important, but not the focus in this article, we concentrate on the actual technical solution.

The technical architecture is a description of concepts that make sure that functional requirements can get implemented while limiting non-functional requirements are fulfilled.

Besides instructions how to build the software, the technical architecture also includes solutions for building, deploying and operating the software.

An actual technical architecture (in the context of this article) consists of multiple aspects:

(there are of course many other things to keep in mind to describe an actual architecture, see Arc42)

Sources for requirements

Sources for requirements are in principle the requirements of the customer.

Besides the customer explicitly stating concrete technical requirements like “you have to use Java as a programming language” or architectural requirements like “use microservices”, functional requirements are most of the time business requirements stating more or less concrete business use cases. Non-functional requirements on the other hands define constraints that result into architectural requirements, too. Description of business requirements together with the non-functional requirements will result in further requirements for the architecture in the context of modularisation, intra/inter-process-communication, performance, scalability and other attributes of the software.

DevOps Requirements

How has DevOps influence on the architecture of a software? Let’s see. From “The DevOps Handbook” by Gene Kim, John Willis, Patrick Debols, Jez Humble:

The First Way requires that fast and smooth flow of work from Development to Operations, to delivery value to customers quickly. We optimize for this goal global instead of local paths, such as Development feature completion rates, test find/fix rations, or Ops availability measures.

[…]

By speeding up the flow through the technology value stream, we reduce the lead time required to fulfill internal and external customer requests, further increasing our work while making us more agile and able to out-experiment the competition.

[…]

Out goal is to decrease the amount of time required for changes to be deployed into production and to increase the reliability and quality of these services.

Agile Requirements

Similar from the Agile Manifest some quotes that should give hints regarding architecture requirements in an agile environment.

[…]

Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.

[…]

Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.

[…]

Continuous attention to technical excellence and good design enhances agility.

[…]

Simplicity–the art of maximizing the amount of work not done–is essential.

[…]

Resulting Requirements on Technical Architecture

From (especially) above quotes we see that the ultimate goal of both approaches — DevOps and Agile — is to create business value. The primary goal is not to create the best possible software architecture. A technical architecture is just a necessary evil to create (and keep) new excellent business value as fast as possible.

It also look like it is not only very important to deliver new additive business value fast but also be able to quickly change the existing software to adapt to new needs.

Minimizing the effort and maximizing the quality under the given constraints are continuous processes that act not only on the software development but on the complete software delivery process, too.

From this we have identified the following requirements and constraints for the technical architecture of a concrete project in the context of Agile and DevOps driven software development.

Not surprisingly these criteria are good criteria for a software architecture in general, too, it is just that DevOps and Agile further enforce them and even require them, claiming that else development in this context not work without them.

Resulting Properties of the Architecture

From above requirements we deduce the following concrete properties of the necessary technical architecture.

Modular, layered and with high locality — and not monolithic

To be able to change the software itself but also the architecture in small iterations, the architecture should make use of small building blocks that are easily changeable or even exchangeable.

The architecture should consist of a small number of rather small framework components instead of one big monolithic framework. Each of this components should have as little as possible dependencies to each other, so that a change of implementation does not require adaptions of the other components.

Building blocks should be ordered and composed in some layered structure to further reduce the impact of changes.

Modular design of the Solution

To be able to apply architecture changes within one iteration, it is required that not only the architecture and frameworks has a modular structure but the actual software must have a modular structure, too. Modularity must ensure, that we can change parts of the architecture for a part of the software and still have a continuously working solution ready to deploy at any time. It must be possible to do even bigger migrations in small iterative steps.

Note that microservices are an approach to enforce this requirement.

Tight, strict Interfaces between Components

In consequence modularity and locality of the architecture and also business functionality require small, and strict interfaces between components. Contracts must be precise to be able to modify or even exchange one side of an interface.

Separation of business and infrastructure code

The goal to reach as small iteration times as possible while still generating business value suggests that the framework, infrastructure and integration code should as much as possible be separated from the actual business and domain code. It should be possible to apply changes to the technical architecture without touching business functionality and vice versa.

Interfaces between business logic and infrastructure should not expose actual technology but should reflect the necessary semantic of the interface (e.g. messaging as a pattern instead an actual messaging solution).

Note that the Onion-Architecture offers a solution for this requirement.

Size of framework

The architecture implementation should be as small as possible. “More” architecture does not automatically create business value and is not lean. The architecture has enough “size”, if it allows to comply to functional and non-functional requirements and thus generation of business value as fast as possible. A smaller framework is simpler and faster to change.

If two frameworks supply the same quality, changeability and implementation performance, choose one — and the smaller one.

Control and master

To be able to introduce change you must be in control of the actual solution. This means, that you must be able to modify or even replace parts of your architecture. For this you must have freedom or in other words control over your architecture.

And further on: You must not only be allowed to change, modify or optimize but must also be actually be able to do so, meaning that you must be a real master of the technology you use.

Implementation patterns

To reduce the development time, your architecture should offer clearly defined implementation patterns. Also functional requirements should be mapped as often as possible onto these given implementation patterns. Implementation patterns should require as little as possible code. Patterns and frameworks allow to apply optimization at central points with minimum effort.

The sum of all patterns should allow the implementation of known requirements.

The patterns should allow fast initial implementation of business code. However they should also allow to optimize and specialize with minimum effort — if required by (changing) business value.

Note that for explorative development and testing of new functionality being able to quickly offer an initial implementation (rapid prototyping) is a essential feature.

In the worst case it should always be possible to exchange a general implementation pattern with a custom solution without side effects if special requirements exist.

Implementation patterns should automatically lead to high quality and should support automatic testing as good as possible.

The number of implementation patterns should be as small as possible and should lead to an “as small a possible” architecture. Overlapping patterns or redundant implementations should be avoided as they do not create new value.

Expect existing patterns to be dropped and new to be created if requirements change over time.

Monitoring

The architecture should allow to measure and get feedback. Measure and feedback is required to make sure that the actual software does indeed fullfil it requirements (requirements match), it is required to make sure is running within its parameters (implementation match), but in a more abstract view it is also required to learn and improve the architecture itself (architecture match) and its fitness regarding it requirements and finally it is also required to measure and improve the business value (adapt requirements to business needs).

Self-serviceable

All building blocks should make use of automation where possible and where human interaction is not required. To keep developer concentrated on working on new creative and innovative concepts with the aim to maximize business value, all simple, mechanical tasks should delegated to automatism.

Handle Architecture Change

The urge to optimize (“Kaizen”) and the permanently process of adoption towards shifting needs require a continuous adjustment of the technical architecture. Note however that the change itself does not create business value in it self, but only if the changes are applied to the existing solution and do create new business value or optimize processes, actual value is created. Even worse, research and development reduce the time to create new business value if without success.

On the other hand, “The DevOps Handbook” claims, that the invest into non-user visible architecture improvements, improvements regarding non-functional requirements, process optimizations and reducing technical debt should at least be 20% of the cycle time. Improvements in complex situation may come only by doing experiments often.

Thus architecture research and development have to be strongly judged regarding actual need, the resulting risks, costs and value creation. Research and development always creates knowledge but only creates actual business value if the result is successful. Research and development should only be triggered if there is a business need or a potential for valuable optimization or a new risk to get handled.

A minimum process should be defined and possibly a WIP-limit needs to be implemented for this.

Research and development work…

Potential Conflicts

Above goals hold some potential conflicts between them. Not all goals can get maximized at the same time. They is judging required and some relative weighting to be done between them.

Weighting “Make” vs. “Buy”

As changeability is an important requirement, maintaining and especially changing your own framework consumes (much) time and does not create business value in itself (but only by actual application of the new functionality to create new business value).

If you thus have the option to buy and spend on top some more time (once) into making an external component exchangeable (with a newly bought component some time later) or have the option to create, maintain and continuously change your own framework, it may be wiser to give more weight to the first option.

Weighting Changeability vs. Perfection

Architecture (and especially architects) has the tendency to try to reach perfection. Reaching perfection takes time. Also reaching further perfection takes more time the more you are close to “absolute” perfection.

On the other hand, change might come every time. The more time you spend in making your architecture perfect the higher the chance that the invest you take might never realize, since a requirement enforces a change in the architecture that results in better business value but less perfection again. And even if it realizes, the invest still might not have been worth it, since change will come soon afterwards.

So it might make sense to weight changeability higher than perfection. Make your architecture good enough, but not better. Make sure that your invest will pay off. Changeability will pay off, perfection possibly not.

Required Forerun

Architectural changes need a higher forerun than simple functional extensions of the system. The forerun is required for conceptional work, research, actual development and for the resulting migration to the new solution. Changes higher up in the architecture stack are likely cheaper and can be applied faster, changes lower in the architecture stack (like moving from a relational database to a NoSQL database) likely need more time.

On the other hand, agile processes require quick reaction to changing requirements which will collide with the forerun required to change architecture. You cannot change your architecture every time (everyday) a requirement changes, this result in a uneven, non-aligned architecture with multiple unfinished approaches and finally chaos.

To avoid this, try to not just plan your architecture but also have a plan for changing your architecture later on. Design your architecture to be changeable and even better extendable. Be prepared not for a certain change (that may never happen) but be prepared for change in general.

Master

Everything you use you should master. Try to avoid to use libraries, frameworks, infrastructure and patterns that you do not master and likely will not master anytime soon. If you do not master your tools, you will not master your requirements.

Not that this may bring you into conflict with “buy before make”. If a “buy solution” does not fit and thus you are not able or cannot effort to master it, making you own, better fitting solution you are also able to “master” may be way out — but still a possible burden.

Obvious Architecture Solutions

Above requirements result in a number of – at first glance – obvious solutions:

Table of contents