Architecture, structure, infrastructure October 24, 2014

3-tures: architecture, structure, infrastructure Philippe Kruchten Agile Vancouver October 26, 2014

Philippe Kruchten, Ph.D., P.Eng., CSDP

Professor of Soware Engineering NSERC Chair in Design Engineering Department of Electrical and University of Brish Columbia Vancouver, BC Canada [email protected]

Founder and president Kruchten Engineering Services Ltd Vancouver, BC Canada [email protected]

Copyright © 2014 Philippe Kruchten 2

Philippe Kruchten 1 Architecture, structure, infrastructure October 24, 2014

Outline • Architecture • Architects • Agile and architecture (!?) • Scaling agile • Socio-technical congruence • Connuous delivery • The advent of DevOps • Reducing fricon

3

Architecture

Yes, but what flavour?

• System architecture • • Business architecture • Soware architecture • Service-oriented architecture • Informaon architecture • Soluon architecture

4

Philippe Kruchten 2 Architecture, structure, infrastructure October 24, 2014

Business Architecture

• A subset of the enterprise architecture that defines an organizaon’s current and future state, including its strategy, its goals and objecves, the internal environment through a process or funconal view, the external environment in which the business operates, and the stakeholders affected by the organizaon’s acvies. BABOK v2 2009

5

Enterprise Architecture

• Enterprise architecture is a descripon of an organizaon’s business processes, IT soware and hardware, people, operaons and projects, and the relaonships between them.

Source BABOK v2 2009

6

Philippe Kruchten 3 Architecture, structure, infrastructure October 24, 2014

Soluon architecture

• System architecture

• Soware architecture

7

Two Main Cultures Soluon Architect Enterprise Architect • Authority • Advisor / Consultant • Technical Decision Maker • Building Bridges • Requirements è Architecture • Business / IT Alignment • Single “problem” • Governance over mulple • “Building Design” “problems” • “City Planning”

• References: – SEI: ATAM, CBAM, QAW • References: – RUP: 4+1 Views – Zachman – Fowler: Architectus Oryzus – TOGAF, DODAF – IEEE 1471 – DYA, IAF, GEM, BASIC,… – IEEE 1471 Source Eltjo Poort

8

Philippe Kruchten 4 Architecture, structure, infrastructure October 24, 2014

Soware Architecture

System Enterprise Architecture Architecture

Source Eltjo Poort

9

Architectural Styles, Genres, Paerns, Mechanisms,…

• Layered architecture • Client-server architecture • Service-oriented architecture

10

Philippe Kruchten 5 Architecture, structure, infrastructure October 24, 2014

Soware Architecture: A Definion

“It’s the hard stuff.”

M.Fowler, cited by J. Highsmith 11

Soware Architecture: A Definion

“It’s the hard stuff.” “It’s the stuff that will be hard to change”

M.Fowler, cited by J. Highsmith 12

Philippe Kruchten 6 Architecture, structure, infrastructure October 24, 2014

ISO/IEC 42010

Architecture: the fundamental concepts or properes of a system in its environment embodied in its elements, their relaonships, and in the principles of its design and evoluon

13

Soware Architecture Soware architecture encompasses the set of significant decisions about • the organizaon of a soware system, • the selecon of the structural elements and their interfaces by which the system is composed together with their behavior as specified in the collaboraon among those elements, • the composion of these elements into progressively larger subsystems,

Grady Booch, Philippe Kruchten, Rich Reitman, Kurt Biner; Raonal, circa 1995 (derived from Mary Shaw) 14

Philippe Kruchten 7 Architecture, structure, infrastructure October 24, 2014

Soware Architecture (cont.) … • the architectural style that guides this organizaon, these elements and their interfaces, their collaboraons, and their composion. • Soware architecture is not only concerned with structure and behavior, but also with usage, funconality, performance, resilience, reuse, comprehensibility, economic and technological constraints and tradeoffs, and aesthecs.

15

Funcons of the soware architect

Definion of the architecture Delivery of the architecture • Architecture definion • Ownership of the big picture • Technology selecon • Leadership • Architectural evaluaon • Coaching and mentoring • Design, development and • Management of non Tesng funconal requirements • Architecture collaboraon • Quality assurance

Brown 2010

16

Philippe Kruchten 8 Architecture, structure, infrastructure October 24, 2014

Funcons of the soware architect

Definion of the architecture Delivery of the architecture • Architecture definion • Ownership of the big picture • Technology selecon • Leadership • Architectural evaluaon • Coaching and mentoring • Design, development and • Management of non Tesng funconal requirements • Architecture collaboraon • Quality assurance

Brown 2010

17

3 main boundaries

B. A.

Architect

Project Developers manager

18

Philippe Kruchten 9 Architecture, structure, infrastructure October 24, 2014

Three main constuencies Customers Domain experts Requirements eng. Product & markeng managers Legislators

Analysts

Architect

Project Developers manager Top management Subcontractors Subcontractors management Technology vendors Airlines, unions, etc. 19

Perceived Tensions Agility- Architecture

Adaptaon versus Ancipaon

Highsmith 2000

20

Philippe Kruchten 10 Architecture, structure, infrastructure October 24, 2014

Scaling agile

Scope, team size, duraon • Larger system • Larger teams • Distributed teams • More frequent releases • Over longer meframes

21

Wrong Problem

• Can we scale up agile pracces?

22

Philippe Kruchten 11 Architecture, structure, infrastructure October 24, 2014

Wrong Problem

• Can we scale up agile pracces?

23

Problems

• Can the architecture of the product support mulple waves of enhancements, to accommodate a constant flow of new needs? • Can the architecture evolve connuously to support enhancements? • Does the architecture allow teams to organize the work so that they feel as if they were in the “agile sweet spot” and allow them to take advantage of agile pracces? • Can the organizaon avoid the extra work generated by repeve handover from a development team to an operaons group?

24

Philippe Kruchten 12 Architecture, structure, infrastructure October 24, 2014

Problem (in other words)

1. Agile architecture – Flexible, evolvable architecture, over me 2. Agile architecng – Can we “be agile” while creang, evolving an architecture

Note that (1) does not imply (2), nor vice versa

25

Scale needs architecture

• Work paron – decoupling • Conceptual integrity – Common vocabulary, etc… • Guide for release planning, configuraon management • Address major “ilies” • Reuse, product line, porolio, etc.

26

Philippe Kruchten 13 Architecture, structure, infrastructure October 24, 2014

Architecture benefits from agility

• Iterave development

• Small increments • Pace decisions • Validate early arch decisions with running testable code, and by building features on it

• Some arch elements may be stubbed

27

Architecture to the rescue

• Common vocabulary • Common culture The original metaphor as architecture from XP • Control dependencies: code, data, ming, requirements • Keep technical debt in check • Guide release planning and configuraon management

28

Philippe Kruchten 14 Architecture, structure, infrastructure October 24, 2014

Early or late binding decisions?

• Upfront vs. emergent?

• Key quesons: – How early is “upfront” – How much can you defer?

• Is architecture part of development? – Architecture conjecture (or architecture planning) /= architectural development

29

Early or late binding decisions? and the specter of technical debt

Source: Kruchten, Ozkaya, Nord., 2012

30

Philippe Kruchten 15 Architecture, structure, infrastructure October 24, 2014

Zipper Model

• From requirements derive: – Architectural requirements – Funconal requirements • Establish – Dependencies – Cost • Plan interleaving: – Funconal increments – Architectural increments

31

Weaving funconal and architectural chunks

32

Philippe Kruchten 16 Architecture, structure, infrastructure October 24, 2014

Benefits

• Gradual emergence of architecture – Deliberate, not accidental (“architecture owner”) • Validaon of architecture with actual funconality (not mere hypotheses) • Early enough to support development – Time pacing

• Not just BUFD • No YAGNI effect

33

Weaving funconal and architectural chunks

34

Philippe Kruchten 17 Architecture, structure, infrastructure October 24, 2014

A more complex story

Architecture of the System

Structure of the Producon Development Organizaon Infrastructure

36

Philippe Kruchten 18 Architecture, structure, infrastructure October 24, 2014

3 tures

• The Architecture (A) of the system under design, development, or refinement, what we have called the tradional system or soware architecture • The Structure (S) of the organizaon: teams, partners, subcontractors, and others • The Producon infrastructure (P) used to develop and deploy the system, the last acvity being especially important in contexts where the development and operaons are combined and the system is deployed more or less connuously

37

Three evolving structures

Architecture of the System

Structure of the Producon Development Organizaon Infrastructure

38

Philippe Kruchten 19 Architecture, structure, infrastructure October 24, 2014

Socio-technical congruence

Architecture of the System

Socio-technical congruence

Structure of the Producon Development Organizaon Infrastructure

39

Socio-technical congruence

• A measure of the alignment between technical relaonships (in the product) and the social relaonships (in the development organizaon)

• Conway’s law (1968): “...organizaons which design systems ... are constrained to produce designs which are copies of the communicaon structures of these organizaons.”

40

Philippe Kruchten 20 Architecture, structure, infrastructure October 24, 2014

Architecture ßà Structure • If architecture (of the system) and the structure (of the organizaon) are at odds, the structure of the organizaon wins • Architecture and structure must co-evolve • if they don't, Conway's Law warns us that the organizaon form will trump intended designs that go "cross-grain" to the organizaon warp. • System architects (the “architects”) and business/ organizaon architects (the “managers”) should not work as if one has no impact on the other.

41

Three evolving structures

Architecture of the System

Socio-technical congruence

Structure of the Producon Development Organizaon DevOps Infrastructure

42

Philippe Kruchten 21 Architecture, structure, infrastructure October 24, 2014

DevOps

43

DevOps

• DevOps is the pracce of operaons and development engineers parcipang together in the enre service lifecycle, from design through the development process to producon support. hp://theagileadmin.com/what-is-devops/

• Kill the silos Patrick Debois hp://www.jedi.be/blog/2010/02/12/what-is-this--thing-anyway/

44

Philippe Kruchten 22 Architecture, structure, infrastructure October 24, 2014

DevOps

• Test environment on development not representave of the deployment environment • Data conversion and transfer • Connuity of operaons • Retenon of personnel, of knowledge • Connuous release

45

DevOps and Architecture

• Operaonal concerns considered early • Break down system in small independent services – Micro-service oriented architecture (?)

46

Philippe Kruchten 23 Architecture, structure, infrastructure October 24, 2014

Connuous architecture to emable connuous delivery 1. Architect Products – not Projects 2. Focus on Quality Aributes – not on Funconal Requirements 3. Delay design decisions unl they are absolutely necessary 4. Architect for Change – Leverage “The Power of Small” 5. Architect for Build, Test and Deploy 6. Model the organizaon of your teams aer the design of the system you are working on

Source: Pureur & Erder hp://pgppgp.wordpress.com/ 47

Taccs

• An architectural tacc is a design opon for the architect • Each tacc is an hypothesis – To be validated by implementaon, prototyping, tesng • Paerns and frameworks package taccs

48

Philippe Kruchten 24 Architecture, structure, infrastructure October 24, 2014

Example

• Need high availability • Possible tacc: acve redundancy • Does acve redundancy give me the adequate level of availability? • A paern that supports availability will ikly use some form of redundancy

49

Taccs Catalog

• Availability • Interoperability • Modifiability • Performance • Security • Testability • Usability

50

Philippe Kruchten 25 Architecture, structure, infrastructure October 24, 2014

Deployability taccs

• Parameterizaon • Self-monitoring • Self-iniated version update

51

52

Philippe Kruchten 26 Architecture, structure, infrastructure October 24, 2014

Fricon

“There is sll much fricon in the process of craing complex soware; the goal of creang quality soware in a repeatable and sustainable manner remains elusive to many organizaons, especially those who are driven to develop in Internet me.”

53

Fricon

“Fricon: the resistance that one surface or object encounters when moving over another.”

In soware development, fricon is the set of phenomena that limits or constraints our progress, therefore reduces our velocity (or producvity).

Technical debt causes fricon.

54

Philippe Kruchten 27 Architecture, structure, infrastructure October 24, 2014

Fricon and Debt

Technical Debt Fricon Social Debt Reduced velocity Defects Delays …

55

Social debt

• Social debt is a state of a development project which is the result of the accumulaon over me of decisions about the way the development team (or community) communicates, collaborates and coordinates.

Tamburri et al. 2013

56

Philippe Kruchten 28 Architecture, structure, infrastructure October 24, 2014

Social debt

• In other words, decisions about : – the organizaonal structure, – the process, – the governance, – the social interacons, • or some elements inherited through the people: – their knowledge, personality, working style, etc.

Tamburri et al. 2013 57

Parallel Technical & Social Debt

Visible Invisible Posive New features Architectural, Added Structural Value funconality features Negave Defects Technical Value Debt

58

Philippe Kruchten 29 Architecture, structure, infrastructure October 24, 2014

Social debt

Visible Invisible Posive Community Community Features Structure Value Negave Community Social Defects Value Debt

Tamburri et al. 2013

59

To agilely architect an agile architecture • Architecture /= Big Design Up Front – Architecture is development • Design architecture incrementally … but not in isolaon from the rest of the system • Re-pay architectural technical debt – As you go, or as needed to not hinder future evoluon • Align the organizaon to match the architecture – Not the opposite • And use all the agile pracces you see fit

60

Philippe Kruchten 30 Architecture, structure, infrastructure October 24, 2014

Reduce fricon - Keep them aligned

Architecture of the System

Structure of the Producon Development Organizaon Infrastructure

61

62

Philippe Kruchten 31 Architecture, structure, infrastructure October 24, 2014

References

• S. Bellomo, P. Kruchten, R.L. Nord, and I. Ozkaya, "How to agilely architect an agile architecture?," Cuer IT Journal, vol. 27, no. 2, 2014, pp. 12-17 • P. Kruchten, R. Nord, and I. Ozkaya, "Technical debt: from metaphor to theory and pracce," IEEE Soware, vol. 29, no. 6, 2012, pp. 18-21. • R. Kazman and P. Kruchten, Design approaches for taming complexity, in IEEE Internaonal Systems Conference, Alain Beaulieu and George Foster (eds). 2012, IEEE, pp. 519-524. • P. Kruchten, "What do soware architects really do?," Journal of Systems & Soware, vol. 81, no. 12, 2008, pp. 2413-2416. • C. Hofmeister, P. Kruchten, R. Nord, H. Obbink, A. Ran, and P. America, "A general model of soware architecture design derived from five industrial approaches," Journal of Systems & Soware, vol. 80, 2007, pp. 106-126. DOI:10.1016/j.jss.2006.05.024

63

References (cont.)

• D. Tamburri, P. Lago, P. Kruchten, and H. van vliet, "What is social debt in soware engineering?," presented at CHASE Workshop (part of ICSE), San Francisco, 2013, IEEE Computer Society, pp.93-96DOI 10.1109/CHASE. 2013.6614739 • Ruth Malan, A trace in the sand, Blog at hp://www.ruthmalan.com/ journal/journalcurrent.htm • Patrick Debois, DevOps blog at, hp://www.jedi.be/blog/ • Pierre Pureur, Murat Erder, Connuous architecture Blog at hp:// pgppgp.wordpress.com/ • M. E. Conway, "How do commiees invent?," Datamaon, vol. 14(4), pp. 28-31, 1968.

64

Philippe Kruchten 32