44
P K Mallik Architecture Concepts Principles, Types, Views, Components, Agile

Architecture Concepts

Embed Size (px)

Citation preview

Page 1: Architecture Concepts

P K Mallik

Architecture Concepts

Principles, Types, Views, Components, Agile

Page 2: Architecture Concepts

P K Mallik

Agenda• Principles• Types• Views• Components• Architecture to Design• Agile Architecture

Page 3: Architecture Concepts

P K Mallik

Architecture Principles• Separation of concerns• Points of failure• Scalability• Access control• Architecture Styles (types of architecture, event driven,

process centric)• Segregation

Page 4: Architecture Concepts

P K Mallik

Example – Shopping Site

Purchase Items

Product Catalogue

Payment

Members

Support

Loyalty

Fulfilment

Despatch

Receipt

Page 5: Architecture Concepts

P K Mallik

Separation of Concerns• Each Feature must be addressed by

a single architectural component• One component may address

multiple features a single feature should not be managed by multiple components.

• If multiple components manage a feature they should be bundled together as a ‘package’ and treated as a single component (note if you end up with only 1 component in your system it is no longer architecture)

CRM

Member Support

Workflow

Publish Product

Product Catalogue

Workflow

Workflow

Re-use

Page 6: Architecture Concepts

P K Mallik

Local Log

Points Of Failure• Number of components that need to

fail for the entire system to shut down• Larger the points of failure the more

stable the overall architecture• Usually has a trade off with

performance

• Use Asynchronous interfaces to reduce failure points

• Use Hardware redundancy to provide for switchover• Clustering (hot switchover)• DR Site (cold switchover)

• Protect ‘sensitive’ components from overloading

Order Booking Payment

Audit Logging

Payment Gateway (3rd

Party)

Order Booking Payment

Audit Logging

Payment Gateway (3rd

Party)

Local Log

Drip Feed

Page 7: Architecture Concepts

P K Mallik

Workload/Usage Patterns• Define peak/off peak

patterns and expected ‘surges’• Project expected growth

over period of time• Provide for capacity to

absorb peak usages• Provide economically viable

solution• Pattern could be Users,

Transactions, Data Loading, Processing

• Scale Out when• Peaks are for short periods of

time• One time surge (such as start-

up)• Budgets prevent large

investments in hardware and licenses

• Scale Up when• There is a predictable growth in

volumes• Growth patterns do not have

significant peaks and troughs• Budgets support initial

overcapacity

Page 8: Architecture Concepts

P K Mallik

Segregation• Need to decouple component• High resource usage• Scale out a high usage component• Availability issues• Security Concerns

• Example• Reporting/Data warehousing• External Access• Workflow

Time

Volu

me

Data Feed

Page 9: Architecture Concepts

P K Mallik

Architecture Types• Three Tier• Service Orientation• Cloud Computing• Event Driven• High Throughput• No SQL• Map Reduce

Page 10: Architecture Concepts

P K Mallik

Three Tier• Default type and most commonly use• Applies the Model View Controller Pattern• Model

• Encapsulates Application State• Responds to Queries• Exposes Functionality• Notifies Changes

• View• Renders models• Requests for updates• Sends user actions to controller• Allows selection by controller

• Controller• Defines application behaviour• Maps user action to model updates• Selects view for response• Separate for each functionality

Page 11: Architecture Concepts

P K Mallik

Service Orientation• Provide a set of services rather than interfaces to external applications• Ability to monitor and manage the resource usage by services• Ability to allocate system resources based upon simple rules• Service has a contract – key elements of that contract. Same service

can have multiple contracts• Who can call• For that caller, what it need to pass• For that caller – what will be response• When caller can expect response• What will be communication channel

• Operates on a publish-subscribe model• May be aligned with commercial models which require specific usage

data to be maintained

Page 12: Architecture Concepts

P K Mallik

Component 1

Event Driven• Used where the system is part of a partially or fully automated

operation or a real time loop• Operates on a throw—catch model• Usually built in a single tier with interfaces with other systems for

Human Machine Interface (such as mobile alerts, emails)• Decouples application and component interfaces• Internal interfaces through components raising and processing events• Typical example would be system monitoring and management

EventRaise

Input Component 2

Catch

Page 13: Architecture Concepts

P K Mallik

Cloud Computing• Hosted environment provided by vendors for

• Web Sites• Databases• File Services• Images and Videos

• Removes need for administrating site and managing scaling• Different architectural components may be deployed on different clouds• Provides elasticity in capacity building and management• Commercials depend upon nature of site and type (public/private) of usage

(Rate Controls)• Private clouds help reduce capital budgets with shared services• Typical Usages

• Mobile Applications• Customer Services• Business Intelligence

Page 14: Architecture Concepts

P K Mallik

No SQL Databases• No SQL databases support

unstructured data by replacing RDBMS concept of row with ‘Document’(Mostly JSON)• Schema is not enforced by

database, consuming applications are expected to deal with structure• Data is mostly distributed

across some kind of network file system• Every piece of data has

(Minimum 3)

Conceptual View of NO SQL

Node1 Node 2 Node n

Page 15: Architecture Concepts

P K Mallik

Virtual DatasetNode1 Node 2 Node n

Master ControllerNode

Map

Reduce

Map Reduce Architecture• Map-Reduce architecture is built

for handling terabyte – petabyte data load using cluster of cheap commodity nodes

• Algorithms are expressed as two functions. Map function travels over network where data resides and applies on data

• Final results are combined back using reduce function

• Our own IP – Data Extraction Platform (DEP) is built using Map-Reduce which provides grid scale capability to handle massive data loads

Page 16: Architecture Concepts

P K Mallik

Architecture Views

• Overview • Business• Application• Technical• Information • Deployment

Page 17: Architecture Concepts

P K Mallik

Structured DataContentDistributionMiningPerformance

ApplicationsProductsToolsInterfacesMapping

Enterprise Architecture

Enterprise Architecture

Business

ApplicationDe

ploy

men

t

Information Technical

Organization StructureOperationsLocations

O/SMiddleware

InstrumentationIntegration

FailoverScaling

PatternsDistribution

Support infrastructureBenchmarks

Disaster Recovery

Page 18: Architecture Concepts

P K Mallik

Business ArchitectureCEO

Operations Finance Vendor Mgmt Sales

Members

Support

Editing

Receipts

Banking

investments

Accounting

Acquisition

Delivery

Payments

Payments

Promotions

Events

Loyalty Mgmt

Products Data Analysis

Page 19: Architecture Concepts

P K Mallik

Application Architecture

Website

Content Management

Workflow

CRM Payment Gateway

BPM

Vendors

Page 20: Architecture Concepts

P K Mallik

Application Architecture

Data Layer

Business Layer

Db Server OLAP DbContent Server

User Interface LayerWeb Client App 3rd Party

CRM Content Workflow

Interface

BPM

Page 21: Architecture Concepts

P K Mallik

Information Architecture

Main Database(Entities and

Relations)

DR Site Configuration

Regional Databases

Content Server

Content BackupPurchase Payment Pricing Delivery

Customer C R U R U R U

Product R C R U R U

Page 22: Architecture Concepts

P K Mallik

Technical Architecture

O/S

App Server

Web Site

Content Server

Workflow

LDAP

O/S

Database Server

O/S

BPM

External Interfaces

O/S

Mail Server

Page 23: Architecture Concepts

P K Mallik

Deployment Architecture

Members

Partners

EmployeesVPN

Scale Up

Scale Out

Server Farm

Page 24: Architecture Concepts

P K Mallik

Architecture Components• Independently maintained software• Addresses one or more functional and non-functional requirements• Selection from a class of similar software on the basis of

• Compatibility with proposed stack• Cost• Fitment with client requirements

• Common Components• Portal• Workflow• BPM• ETL• Document Management• Rules Engine• Security• Systems Management

Page 25: Architecture Concepts

P K Mallik

Common Architecture Components• Products and tools regularly used in systems• List of most popular components• Integration & Workflow• Document Management• Rules Engine• Security• System Management• Business Intelligence

Page 26: Architecture Concepts

P K Mallik

Overview• Independently maintained software• Addresses one or more functional and non-functional

requirements• Selection from a class of similar software on the basis of• Compatibility with proposed stack• Cost• Fitment with client requirements

Page 27: Architecture Concepts

P K Mallik

Workflow• Products which manage processes within an organisation• Generates tasks on completion of an event• Has capability to determine which task to initiate

depending upon configurable parameter• May be bundled with CRM and Document Management

products• Primarily meant to handle manual tasks and does not scale

well to large transaction volumes

Page 28: Architecture Concepts

P K Mallik

Integration• Define and manage external interfaces• Manage processes across multiple systems or organisations• Process integration defined through standard language

(such as BPEL or BPMN 2)• Provide an Orchestration service to compose business

views from multiple sources• Provide a highly configurable platform when dealing with

multiple partners or systems• Can be implemented in conjunction with workflow engines• Not to be used for high volume data processing (use ETL

tools instead) for integration or data loading

Page 29: Architecture Concepts

P K Mallik

Document Management• Repository based tool to create, modify and publish documents• Manages access through Access Control Lists or third party Role

Based Access Control systems• Maintains history of changes and can produce specific version• May include multiple channels including RSS feeds• Significantly improves productivity• Can extend to maintain content, specially for web based

applications• Manage feeds from external devices (scanners, cameras etc)• Meant for stable process flows, has problems when document

management processes change frequently• Not very cost effective for small volumes

Page 30: Architecture Concepts

P K Mallik

Rules Engine• Define and manage complex business rules with high

transaction volumes • Ideally suited for STP type of requirements• Can be combined with Workflow or BPM engine to

determine process direction• May be used to make complex rule driven calculations• Expensive and process hungry

Page 31: Architecture Concepts

P K Mallik

Security• Manage access to data and functions• Three aspects• Identity Management – Issue/update password, smart card,

biometrics• Authentication – Verify identity of user • Access Control – Determine access to functions and data

• Each aspect may be addressed by a different product• Regulatory requirements regarding privacy at local and

country level• Additional measures would include firewalls, certification

and anti-virus solutions

Page 32: Architecture Concepts

P K Mallik

System Management• System Monitoring and Management• Instrumentation for escalating key events• Performance monitoring and diagnostics• Compatibility with application and product instrumentation• Optimizes hardware and software resources• Expensive to deploy and maintain

Page 33: Architecture Concepts

P K Mallik

Common Components• Can be a library or published services• Nature of services or methods provided• Usage rules must be defined• Typically fall into these categories• Interface Patterns or Facades• System Service Providers (Security, Access Control, Audit)• File Management• Instrumentation

Page 34: Architecture Concepts

P K Mallik

Architecture to Design• Defining common components• Constraints• Design standards• Defining master templates• Coding standards,

• Risks – How mitigated• Assumption

Page 35: Architecture Concepts

P K Mallik

Agile Architecture• Solution Modelling• Evolutionary Design• NFR Management

Page 36: Architecture Concepts

P K Mallik

Solution Modelling• Three Dimensional Models• Business/Product/Service for which the software is used• Features and Functionality which are provided by the software• Technology and Configuration used to run the software

• Release objectives and scope set on one dimension• Teams defined on another• Product Backlog on the third

Page 37: Architecture Concepts

P K Mallik

F5

Traditional – Modelling

F1

F2

F3

F4

T1 T2 T3 T4 T5 T6 T7

Technologies

Page 38: Architecture Concepts

P K Mallik

F5

Agile Planning – Modelling

F1

F2

F3

F4

P1 P2 P3 P4 P5 P6 P7Businesses/Products/Services

Page 39: Architecture Concepts

P K Mallik

Func

tiona

l

Non

-Fun

ction

al

Evolutionary Design

Pre Sales(Contract)

Application Architecture

Features Themes Story/Function Points

Non Functional Requirements

FunctionalityConcepts, Standards and Templates

Estimate, Staffing

Principles, Components and Interfaces

Velocity, Productivity, Buffers, Activities

Foundation(Plan)

High Level Design

Epics ThemesProject Backlog

Story Points

Sprint(Actual)

Low Level Design

User StoriesBacklog

Story Points

Tasks

Estimate, Staffing

Velocity, Activities

Actual

Dis

Asse

mbl

y

Estimate

Velocity

Assign

Page 40: Architecture Concepts

P K Mallik

Example – Shopping CartEpic – Registered user searches for products for Purchase

User StoriesSearch Select CheckoutLogin

High Level DesignSearch Form• Free Text Search• Product Name,

Category, Size, Colour and brand

Query Generator• Create Query based

on selected parameters

• Fetch Data

Saved Searches• Parameter• Value

Low Level DesignWireframe Field

ValidationsQuery Generator Interface

Save SearchesRetrieve Searches

Pre Sales

Release Planning

Release Foundation

Sprint

Page 41: Architecture Concepts

P K Mallik

Agile Architecture

Data Layer

Business Layer

Db Server OLAP DbContent Server

User Interface Layer

Usability Themes

User Story 1 User Story 2

Maintainability Themes

Performance Themes

Task

1Ta

sk 2

Task

1Ta

sk 2

Task

3

Security Themes

EpicUser Story

3

Availability ThemesQ

uery

Mem

ory/

CPU

Rend

erin

g

Auth

entic

ation

Acce

ss C

ontr

olDa

ta F

ilter

Page 42: Architecture Concepts

P K Mallik

NFR ManagementFeatures User Story Security Performance Usability Others

RBAC Data Filter Capacity Latency UI Preferences MenuFeature 1 User Story 1 X X X X X X

User Story 2 XUser Story 3 X X X X X

Feature 2 User Story 4 X XFeature 3 User Story 5 X X X

User Story 6 X X XUser Story 7 X X X X

Feature 4 User Story 8 X XUser Story 9 X X XUser Story 10 X X X X

Feature 5 User Story 11User Story 12 X X X X

Implementation approach Template Component Service Optimise Db Template Template TemplateImplemented by Story Story Story Activity Story Story Story

Page 43: Architecture Concepts

P K Mallik

Object Model

Design FrameworkUser Interface Business Rules Data Management External Interfaces

FormsGrids

WorkflowValidations

Stored Procedures/Triggers

DatabaseContentConfiguration

Protocols

Transport

Content/PayloadGene

ricPr

oduc

t

FlexFlash Browser YAWL

DROOLSANSI (Oracle/SQL Server)

File ServicesWeb Services REST/SOAP

Blaze

Server Interface

Mod

el

Application Objects

Logical Model

Group Model

Data Model

Interface Objects

Impl

emen

t Pagination

Actions

Process Flow

Work Flow

Rules

Transaction Manager

Persistence Manager

Interface Manager

File Manager

Eclipse for ModellingBIRT over RDB

Custom Workflow YAWL TemplatesJBEAM

Calculations

Calculations

Page 44: Architecture Concepts

P K Mallik

Thank You