Architecture fundamentals

54
Architecture Fundamentals

Transcript of Architecture fundamentals

Page 1: Architecture fundamentals

Architecture

Fundamentals

Page 2: Architecture fundamentals

#event-arch-fund

Page 3: Architecture fundamentals

Learning Objectives

� How architecture benefits me� How architecture benefits my project� What is architecture� How an architect fits in

Page 4: Architecture fundamentals

Agenda

� Boring stuff about me� What is Architecture?� Architectural Styles� Principles of Architecture� Case Study

Page 5: Architecture fundamentals

Me!

Reda HmeidHead of Solutions

Page 6: Architecture fundamentals

A bit more about me

� Middlesex County Schools u15 Rugby Champion� Middlesex County Schools u15 Rugby Player� British Junior Kickboxing Champion 1992� Leading goalscorer of all time for HH in British Airways 7 a-side

league� Managed 10 press-ups in a row a month ago

Page 7: Architecture fundamentals

1.

What is Architecture?

Just drawing some boxes

Page 8: Architecture fundamentals

Your views

Page 9: Architecture fundamentals

Some thoughts

Boxes with lines between them in some sensible manner.

Tex Soh

A clear map of the physical nature of the system/s with which you are working.

Andrew Bateson

Page 10: Architecture fundamentals

“Computer architecture, like other architecture, is the art of determining the needs of the user of a structure and then

designing to meet those needs as effectively as possible within economic

and technological constraints.Planning a Computer System: Project Stretch, ed. W. Buchholz, 1962

Page 11: Architecture fundamentals

“Computer architecture, like other architecture, is the art of determining the needs of the user of a structure and then

designing to meet those needs as effectively as possible within economic

and technological constraints.Planning a Computer System: Project Stretch, ed. W. Buchholz, 1962

Page 12: Architecture fundamentals

“Computer architecture, like other architecture, is the art of determining the needs of the user of a structure and then

designing to meet those needs as effectively as possible within economic

and technological constraints.Planning a Computer System: Project Stretch, ed. W. Buchholz, 1962

Page 13: Architecture fundamentals

“Computer architecture, like other architecture, is the art of determining the needs of the user of a structure and then

designing to meet those needs as effectively as possible within economic

and technological constraints.Planning a Computer System: Project Stretch, ed. W. Buchholz, 1962

Page 14: Architecture fundamentals

“Computer architecture, like other architecture, is the art of determining the needs of the user of a structure and then

designing to meet those needs as effectively as possible within economic

and technological constraints.Planning a Computer System: Project Stretch, ed. W. Buchholz, 1962

Page 15: Architecture fundamentals

“Software architecture defines the

components of a system; what they

do, what they are, and how they

interact (i.e. their interfaces).

David Slauson 2016 (Facebook)

Page 16: Architecture fundamentals

“Software architecture defines the

components of a system; what they

do, what they are, and how they

interact (i.e. their interfaces).

David Slauson 2016 (Facebook)

Page 17: Architecture fundamentals

“Software architecture defines the

components of a system; what they

do, what they are, and how they

interact (i.e. their interfaces).

David Slauson 2016 (Facebook)

Page 18: Architecture fundamentals

“Software architecture defines the

components of a system; what they

do, what they are, and how they

interact (i.e. their interfaces).

David Slauson 2016 (Facebook)

Page 19: Architecture fundamentals

Difference between Architecture and Design

Architecture Design

Customer Microservice

Customer Microservice

Customer Controller Customer

Connector

Customer UtilsSelf Assessment

Microservice

Customer Database

Page 20: Architecture fundamentals

2.

Architectural Styles

Page 21: Architecture fundamentals

“Architecture patterns (ed: or Styles) help define the basic

characteristics and behavior of an application.

Software Architecture Patterns, Mark Richards

Page 22: Architecture fundamentals

Layered/Tiered

Front End Layer

Business Layer

Data Layer

Util

ity La

yer

Dom

ain

La

yer

Page 23: Architecture fundamentals

Layered/Tiered

Front End Layer

Business Layer

Data Layer

Util

ity La

yer

Dom

ain

La

yer

Process Layer

Page 24: Architecture fundamentals

SOAMicroservicesProcess Services

ESB

Business Services

Data Services

Service Based Architectures

Page 25: Architecture fundamentals

Comparison

Microservices

1. Choreography2. Own DB3. Domain driven4. Full Stack Teams5. Self contained6. Polyglot7. Usually REST (or REST-like)8. Less Coupled

SOA

1. Orchestration2. Shared DB3. BPM Driven4. Factories5. Separately deployable6. Technology limited7. Usually SOAP (over HTTP or JMS)8. More Coupled

Page 26: Architecture fundamentals

REST

Described by Roy Fielding in his 2000 thesis.“REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state”

Page 27: Architecture fundamentals

Other Architectural Styles

� Event-Driven Architectures� Microkernel Architectures� Space Based Architectures

Page 28: Architecture fundamentals

3.

Principles of Architecture

Page 29: Architecture fundamentals

12 Principles of Architecture

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Page 30: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

An architecture that is not based on achieving business goals is not a good architecture. Not matter how “pure” it is.

12 Principles of Architecture

Page 31: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Technical, people, infrastructure, financial, requirements

12 Principles of Architecture

Page 32: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Deliver an architecture to fulfill the requirements - no more. If a response time of 2 seconds is ok, deliver an architecture for a 2 seconds response time.

12 Principles of Architecture

Page 33: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Fail to prepare, prepare to fail.

12 Principles of Architecture

Page 34: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Complexity is a measurement of the number of components within a system, the number of interactions between those components and what those interactions look like.

Greater the complexity, the greater the development effort, the testing effort, the maintenance effort and support effort. It increases the potential number of points failure and the number of bugs.

Some architectural styles are inherently more complex.

12 Principles of Architecture

Page 35: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Architectural decisions that increase complexity must be based on evidence:

� Metrics� User Research� Expert Opinion� Technology Characteristics� Product Owner opinion

12 Principles of Architecture

Page 36: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

“Each software module should have one and only one reason to change”

12 Principles of Architecture

Page 37: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

The reusability of a component is not measured by whether or not it has been reused, but by whether it could be reused.

Reusability is the ability of multiple clients to reuse the same functionality.

12 Principles of Architecture

Page 38: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Resume Driven Architecture - the inappropriate use of a technology to boost one’s resume.

12 Principles of Architecture

Page 39: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Coupling components makes change more difficult and less likely.

Some types of coupling:� External Data Structure� Data Format� Control� Common or module coupling

12 Principles of Architecture

Page 40: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Abstraction is the hiding of implementation details from client systems or components.

This is usually through well defined interfaces and components

BEWARE: Do not overdo the abstraction

12 Principles of Architecture

Page 41: Architecture fundamentals

1. Achieve business goals2. Constraints are King3. Just enough is always plenty4. Architect for Change5. Minimise Complexity6. Evidence Based7. Single Responsibility Principle8. Reusable components9. Avoid RDA

10. Loose Coupling11. Abstraction

12. Don’t reinvent the wheel

Use established technologies, whether internal or 3rd party where reasonably possible.

Use the 80/20 rule

12 Principles of Architecture

Page 42: Architecture fundamentals

Case Study

Page 43: Architecture fundamentals

Business Goals

Increase Customer Satisfaction through greater understandingIncrease Revenue

Page 44: Architecture fundamentals

Business Requirements

Use real-time analytics to understand our customer better to make an informed suggestion on Next Best Action.

Page 45: Architecture fundamentals

Constraints

� Java developers� Most development by 3rd party suppliers� 2 seconds end-to-end response times� 6 month initial delivery

Page 46: Architecture fundamentals

Existing Architecture

� Offline analysis through modelling produces customer and business related values

� These are fed in from the data warehouse using ETL daily and stored in an Oracle Database

� A customer component used to retrieve any and all customer related data

� A provided equation (I want to say regression equation) is used in real time, taking in the request and customer and business related values to produce an answer

� The web uses the “decisions” to display the appropriate content

Page 47: Architecture fundamentals

Next Phase

A real time decisioning engine has been procured, that will make use of existing data to suggest next best actions. This has been procured on a 1 year trial basis.

Page 48: Architecture fundamentals

Go

Page 49: Architecture fundamentals

Upcoming talks

Page 50: Architecture fundamentals

� Rest Architectural Style� Microservices Architecture� Communicating Architecture� Web Security Fundamentals & Advanced� Strategic Domain Driven Design� Machine Learning� Intro to Git

Page 51: Architecture fundamentals

Homework

Page 53: Architecture fundamentals

https://confluence.tools.tax.service.gov.

uk/display/AR/Courses

Page 54: Architecture fundamentals

thanks!

Any questions?