"While we must acknowledge emergence in design and system development, a little planning can avoid much waste." James Coplien, Lean Architecture. Show
It isn't my aim here to be comprehensive and embrace all sources. For your interest, I have looked at "Open Agile Architecture" and at SAFe. One blogger has reported counting that SAFe has 31 artifacts, 17 events (meetings), 16 roles, 10 principles, 7 competencies, 4 configurations, 3 levels, and 1,000s of pages of needed documentation. My aim here is less ambitious. It is to speak to the right-hand side of the graphic above, and expose the ambiguity of "agile architecture", since
are three very different things. An agile architecture development processes is perfectly reasonable, provided the architects who document “intentional architectures” understand the wider enterprise context in which the system of interest sits, and understand the various trade-offs outlined later in this chapter. On the other hand, frameworks and standards for agile architecture can be overblown. This chapter exposes how the term may mislead people, and thus demystifies the concept for architects and their managers. The need for architectural oversightAt one extreme, enterprise architects constrain all decisions made by solution architects. At the other extreme, solution architects are free to fight their own battles (which may lead disintegration of systems). Naturally, the optimal path lies between the extremes. The same applies to the relationship between software architects and solution architects. The graphic above features feedback loops between architects at different levels. The higher feedback loop between enterprise and solution architecture is not explored here. This chapter focuses on the lower feedback loop between solution and software architecture. The graphic is not intended to imply the demand for work on software systems is entirely top-down, strategic, road map-driven. The more decentralized and agile the business, the more the demand is localized. Wherever the demand comes from, there is a need for architecture-level work and documentation. To repeat from the beginning of this book: “With or without a business strategy, there will always be a need for architects with a long-term and cross-organizational perspective to have oversight of IT-related projects and product developments (with a view to making the business more efficient and effective as whole) and to identify and mitigate technical risks - including the risks of letting a thousand flowers bloom under the direction of software developers wanting to extend their CV." Some basic conceptsAn architect works to ensure the coherence and essential qualities of systems to be built, first by designing them at a high or abstract level, then by governing the work of system builders. An architecture includes the essential inputs and outputs, structures and behaviors, of one or more human and/or computer activity systems, and essential dependencies between them, along with essential technology choices. In system theory terms, the architecture is an abstract system, and the built system is a concrete system, instantiated by some human and/or computer actors. In agile architecture terms, an agile architecture approach relates an intentional architecture (in a high-level design document) to an emergent design (abstracted from working code, reflecting the structures and behaviors of a run-time system). Of course, there should be a feedback loop. An architect's intentional architecture constrains a builders' emerging design. Conversely, the emerging design can prompt revisions to the intentional architecture. If a development team is empowered to make decisions, then gaps between what was intended and what emerges are likely. When an architecturally-significant design feature emerges in working code, it should be explained to the architect directly, or at the next governance review. Agile development may mean the governance feedback loop is shorter and more effective, but it doesn't make the intentional architecture any more agile. It doesn’t change the solution architect's role beyond more frequent engagement with the emerging design. What is documented?The agile manifesto promotes four values.
Note that the manifesto does not say there is no plan, no process or no documentation. As Adele Goldberg used to say of code: “If it ain't documented; it don't exist". The graphic above suggests that the intentional architecture is recorded by a solution architect. It is as comprehensive as it needs to be for its audience, which is usually well short of detailed software architecture. This high-level documentation might be maintained by the development team, under the governance of a solution architect who has the wider enterprise picture in mind. The working code is the most detailed documentation of a system. The framework called SAFe includes the concept of the “The Architectural Runway“ consisting of “the existing code, components, and technical infrastructure needed to implement near-term features without excessive redesign and delay”. It seems the runway contains just enough (rather than too little or too much) implemented code and technology to deploy and run the next few increments. The emergent design may be thought of as a mental model of the evolving system/solution, reverse-engineered from latest working code. To help developers, software architects may document some of it, but in an agile world, it may not be maintained. So, what does agile architecture mean?The term agile means adaptable, readily changed or maintained in the light of changing needs or conditions. The term agile architecture is ambiguous, since the thing we craft to be readily changeable or maintainable may be:
The next three sections discuss these three different ideas separately. 1) Agile intentional architectureThe intentional architecture is in a high-level design document, written with a view to ensuring the coherence and the essential qualities of a system. It stops far short of defining the whole of a system to be built. It is an abstraction from a system that is envisaged. The architect determines the boundary of the system (large or small), defines its external interface(s), and chooses the granularity of parts or subsystems to be documented at an abstract level, with some required features or qualities in mind. If agile architecture means you high-level design documentation can readily be changed and maintained, then how to make it so? Do less of it, generalize, or encapsulate?
Architects focus on defining interfaces, which should be more stable than whatever is behind them. TOGAF goes so far as to position business and application service contracts in the requirement specification rather than the architecture definition document. But of course, every interface is potentially subject to change requests arising from emergent design. Most systems decomposed into layers and modules. Every layer (notably, application and database) and every component in the application (from the whole application to the smallest object) can be encapsulated behind an interface. Which interfaces are solution architects expected to specify? Certainly the interface of the whole system of interest. How far a solution architect should be engaged in the division of what is considered to be a single application into layers and components is an open question. Does a solution architect need to understand anything behind the interface(s) of an application? Usually, yes. The architect should
In a typical enterprise application, the business data is processed at every level from user interface to database. Some up-front effort to scope and structure persistent data can help to minimize the time and cost of refactoring later, which makes a contribution to agility. Call me old-fashioned, but where they are appropriate, I like to see a list of use cases/epics and a well-drawn data model. 2) Agile emergent design / run-time systemsIf agile architecture means the run-time system can readily be changed, then how to make it so? Make it more general, more flexible, or chop it up into smaller relatively independent parts?
Wrt to that last: for several decades now, software engineers have been encouraged to decompose large systems into smaller ones, and decouple them, making it easier to change and maintain the individual subsystems. However, to paraphrase Craig Larman: decoupling components now for a future that is not in sight is not time well spent. See the discussion of microservices below. Again, the choice is up to you. You have to consider the down sides of decomposing, distributing and decoupling systems. To begin with, it generally means:
And it can create the 4Ds.
The important thing is to think about these things before you commit to system decomposition and decoupling of the subsystems. 3) Making an "agile transformation"The term "agile architecture" is sometimes conflated with the idea some call an "agile transformation". That term is also ambiguous. A transformation that proceeds in an agile, incremental and reversible way is one thing. A "transformation to an agile business" is a completely different thing. Ironically, transforming the entire structures and operations of a business to be more agile implies big up front design and planning. Note also that agility for the sake of being agile is is potentially damaging to efficiency and effectiveness, since design for flexibility tends to makes a system more complex and slower in operation.
Where the need is for BCM then, typically, architects work in partnership with business change specialists - be they in the same or a different team. In short, EA and BCM must and do collaborate when needed, as would certainly be the case in a "transformation to an agile business". Principles for the architects of software projectsReturning to the world of agile software development, the agile manifesto has 12 principles for a team that delivers working code. How to recast those principles for architects who deliver documentation and guidance to such a team? Here’s a suggestion you can adapt as you see fit.
Also, don't be a agilist zealot. Be sensitive to the real-world political, social and technical obstacles to agile development (not listed here). Where the obstacles cannot be overcome, then adapt the agile principles to the circumstances of the project and the nature of the solution to be delivered. Remarks on practice and architectural optionsThe practices above called agile architecture (meanings 1 and 2 rather than 3) correspond to what I've observed and taught for 20 years as normal practice. A lesson to be learned from experience of empowering stand-alone agile software development projects is that agility should be constrained by architectural oversight, and in the face of various political, social and technical obstacles (not listed here) it is not always possible to apply the whole of the agile development dogma. Before making architectural decisions, a solution architect should start with analysis of the motivations, and the trade-offs between various design options, including:
Countless permutations of the options are possible. The beginning of wisdom for a solution architect is to understand that making a solution work doesn't mean it is the best solution, or even close to it. All good designers start by understanding the motivations for and trade-offs between alternative designs. Are microservices the answer?An architect complained his CIO speaks of "microservices" as meaninglessly as he used to speak of "SOA”. Be sceptical when vendors propose you divide monoliths into microservices, then use their middleware to coordinate them. Be sceptical when software engineers (for their CVs) propose using every fashionable design pattern. To divide a monolith into microservices conflates several different kinds of design decision into one sledge hammer of a decision. Before doing it, you should start with analysis of the motivations, and the trade-offs between the various options above. Directing all developers down one path without addressing trade-offs is a root cause of problems in practice. Some advice posted on the internet under the heading of "microservices" confuses microservices in particular with services in general. Wrapping up applications behind APIs and calling them "services" is one thing. The complexities caused by distributing stored data is another thing. The benefit of enabling local agility can be outweighed by the costs - the 4 Ds above, and other complexities. Further readingThe article above is an extract from the second of two books nearing completion:
The first is written mainly for college teachers and students. The second is written more for professional enterprise and solution architects. For other extracts from the second book, read some of the other articles here. Notably, the article on microservices, on which comments have included: "Superb." "Very informative, good to read the practical points of consideration around business, architecture and design." |