82
Lecture 01 Enterprise Application Architecture

L01 Enterprise Application Architecture

Embed Size (px)

DESCRIPTION

In this first lecture we look at the state of the industry and specifically the post-pc era that follows the digital decade. The PC is not the center anymore and we as architects need to create solution that are long lasting and usable on any device. Creating software systems is hard. Fortunately, as system architects we have many methods to build upon and in this lecture we will explore those building blocks. We also look at the evolution of software architectures and the importance of service oriented architecture

Citation preview

Page 1: L01 Enterprise Application Architecture

Lecture 01Enterprise Application Architecture

Page 2: L01 Enterprise Application Architecture

Agenda The Post-PC era Enterprise Application Building Blocks Service Oriented Architecture Layering

Page 3: L01 Enterprise Application Architecture

Reading Fowler Introduction,1 Layering Service Oriented Architecture Software as a Service Steve Yegge’s Rant

Page 4: L01 Enterprise Application Architecture

The Post-PC era

Page 5: L01 Enterprise Application Architecture

1960 1970 1980 1990 2000 2010

Mainframes

Mini computers

Personal Computers

Servers

Clusters

Cloud – utility computing

Laptops

Music player2G Cell phones

CONVERGE

DIVERGESmartphones

Tablets

Smart TV

Internet of things

Page 6: L01 Enterprise Application Architecture

2000 2010

THE DIGITALDECADE

Page 7: L01 Enterprise Application Architecture
Page 8: L01 Enterprise Application Architecture

“[The Personal Computer] can become the 'Digital Hub'

of our emerging digital lifestyle, adding tremendous value

to our other devices.”- Steve Jobs, 2001 Keynote

introducing the iPod

THE DIGITALDECADE

Page 9: L01 Enterprise Application Architecture

2000 2010

THE DIGITAL DECADE

MUSIC

PICTURES

VOICESMARTPHONES

TV SHOWS

MOVIES

BOOKS

Page 10: L01 Enterprise Application Architecture

WHAT HAPPENEDAT THE END OF THEDIGITAL DECADE?

Page 11: L01 Enterprise Application Architecture
Page 12: L01 Enterprise Application Architecture

1981-2011 The era of the PC

Page 13: L01 Enterprise Application Architecture
Page 14: L01 Enterprise Application Architecture

THE PC IS JUST ADEVICE

Page 15: L01 Enterprise Application Architecture

2000 2010

iMac iPhoneMac OS 9.0.4500 MHz PowerPC G3 CPU, 128MB MemoryScreen - 786K pixelsStorage - 30GB Hard Drive

iOS 4.01 Ghz ARM A4 CPU, 512MB MemoryScreen - 614K pixelsStorage - 32GB Flash Drive

Source: Ars Technical Images: Apple

Page 16: L01 Enterprise Application Architecture

Digital LifestyleThe “mobile web” is just the web – there is only one web

d ig i ta l on l ine wor ld

Page 17: L01 Enterprise Application Architecture

Digital Online World

Page 18: L01 Enterprise Application Architecture

WorkMore

informationFocused

Digital Online World

BrowsingConsuming

content

CheckingMobileNow

ConsumingVideo

Information

Page 19: L01 Enterprise Application Architecture

The Post-PC Era The Personal Computer era is over– Rise of the network – APIs– Enterprise systems are accessible

by consumers– New devices, mobile phone,

ITV, game machines, MP3 players,...Source: (cc) 1998-2008Digibarn Computer Museum,

Source: Picture from Convergence Transforms Digital Home: Techno-Economic Impact

Page 20: L01 Enterprise Application Architecture

The Post-PC Era New Requirements– More users, more complicated software– Uptime, security and reliability– Scalability– Competition drives need for productivity– Leveraging investments – integration with

existing systems

Page 21: L01 Enterprise Application Architecture

Challenges in Computing

Software and integration of components and devices are the challenges ahead

Cloud computing and ubiquity Move to Service Oriented Architecture and APIs

1980 1990 2000

HardwareConnecting hardware

NetworkSoftware

Connectingsoftware

Page 22: L01 Enterprise Application Architecture

New Approch to SoftwareArchitecture

Page 23: L01 Enterprise Application Architecture

Which of the following statements is not true?

A) The challenge ahead is to connect softwareB) The PC is no longer a device for developmentC) Computing has moved to the cloudD) During the digital decade, the PC was the digital hub for all you devices

QUIZ

Page 24: L01 Enterprise Application Architecture

Enterprise Application

Page 25: L01 Enterprise Application Architecture
Page 26: L01 Enterprise Application Architecture
Page 27: L01 Enterprise Application Architecture
Page 28: L01 Enterprise Application Architecture
Page 29: L01 Enterprise Application Architecture
Page 30: L01 Enterprise Application Architecture
Page 31: L01 Enterprise Application Architecture
Page 32: L01 Enterprise Application Architecture
Page 33: L01 Enterprise Application Architecture
Page 34: L01 Enterprise Application Architecture
Page 35: L01 Enterprise Application Architecture
Page 36: L01 Enterprise Application Architecture
Page 37: L01 Enterprise Application Architecture
Page 38: L01 Enterprise Application Architecture
Page 39: L01 Enterprise Application Architecture
Page 40: L01 Enterprise Application Architecture

Enterprise Applications Software running in corporate data centers Characteristics– Involve data, some times huge amounts– Concurrent data access, multiple users– Lot of user interface screens– Integration with other enterprise application– Use of middleware software, such as

databases, application servers, web servers– Operated by specialists – system operators

Page 41: L01 Enterprise Application Architecture

Examples B2C (business to consumer)– E-commerce web sites such as Amazon, eBay– Commercial services like banking

Commerce Solutions– Payroll, patient records, shipping tracking, cost

analysis, credit scoring, insurance, supply chain, accounting, customer service, and foreign exchange trading

Information– Stock quotes, sports results, email, blogs

Page 42: L01 Enterprise Application Architecture

Software as a Service (SaaS) “On-demand” software– Cloud computing

IT infrastructure demands– Communication: interacting with the software– Scalability: dealing with fluctuation– Dependability: available 24/7

Page 43: L01 Enterprise Application Architecture

Software as a Service Examples E-mail services Project management Blog services

Page 44: L01 Enterprise Application Architecture

What is not necessarily characteristic of enterprise software?

A) Has many concurrent users working on the same dataB) Integrates with other IT systemsC) Deploys some form of distribution strategyD) Is operated by specialists not by the users

QUIZ

Page 45: L01 Enterprise Application Architecture

Building Blocks

Page 46: L01 Enterprise Application Architecture

Building Enterprise Applications Building computer systems is hard– As the complexity of the

system gets greater, thetask of building thesoftware gets exponentially harder

Page 47: L01 Enterprise Application Architecture

Building Enterprise Applications Building computer systems is hard

DesignPattern

Middleware

FrameworksOOProgramming

SoftwareArchitecture

Page 48: L01 Enterprise Application Architecture

Software Architecture Shared understanding of system’s design

by the expert developers on a project– Highest-level breakdown of a system into its

parts– Decisions that are hard to change

Architecture influences design of components, technology, performance and middleware

There are always options

Page 49: L01 Enterprise Application Architecture

Object Oriented Programming OO is key to development of systems– Design for reusability, flexibility and

performance

One of the biggest hurdles for developers– Each component should be simple with simple

task– Involves understanding of interaction of parts

“OO design is more important than specific technologies, such as J2EE. We should try to avoid letting our technology choices, such as J2EE, constrain our ability to use true OO design” – Rod Johnson “If the design is good, there is no code”

– Jónas Þór, Senior Betware developer

Page 50: L01 Enterprise Application Architecture

Design Patterns Design using known ideas– Design patterns are standard solutions to

common problems in software design– Systematic approach for problems that

reoccur in software development– Patterns have name and definitions - not

language dependant History– Landmark book from 1995: Design Patterns:

Elements of Reusable Object-Oriented Software Gang of Four (GoF)

Page 51: L01 Enterprise Application Architecture

Middleware Enterprise system are built on middleware

– Can cover a broad spectrum of software and generally sits between an application and an operating system

– For example, databases, application servers, web servers, messaging systems, transaction monitors

– “The plumbing” Horizontal market

– Solves common problems – not specific business requirements

– Low-level system

Page 52: L01 Enterprise Application Architecture

Frameworks Frameworks define the support structure for how

to organize and build systems– Can improve productivity– We can use existing frameworks or build our own

Frameworks implement common problems– Developers extend and add their business requirements

Framework design– Use inheritance, inversion of control, interfaces and

helper classes– Implement design patterns

Page 53: L01 Enterprise Application Architecture

Which of the following statement is not true?

A) Design patterns are solutions to common problemsB) Object oriented programing is good for general problemsC) Frameworks are used to increase productivityD) Middleware can solve business related problems

QUIZ

Page 54: L01 Enterprise Application Architecture

Evolution of Enterprise Software

Page 55: L01 Enterprise Application Architecture

Evolution60 70 80 90 00

IBMMainframes

Limitedlayering orabstraction

IBM, DECMini-

computersUnix, VAX

“Dumb”terminals

Screens/DB

PC, Intel,DOS, Mac,

Unix, Windows

Client/ServerDB

WindowsInternet

HTTP

Web Browsers

WebApplications

DB

Windows,Linux

MacOS

Browsers,ServicesDomain

ApplicationsDB

Page 56: L01 Enterprise Application Architecture

Evolution60 70 80 90 00

IBMMainframes

Limitedlayering orabstraction

IBM, DECMini-

computersUnix, VAX

“Dumb”terminals

Screens/DB

PC, Intel,DOS, Mac,

Unix, Windows

Client/ServerDB

WindowsInternet

HTTP

Web Browsers

WebApplications

DB

Windows,Linux

MacOS

Browsers,ServicesDomain

ApplicationsDB

iOSAndroidHTML5

BrowsersAppsAPI

CloudNoSQL

10

Page 57: L01 Enterprise Application Architecture

Client-Server Two-layer systems– Thick client on PCs handle user interface and

connect to servers for data

Page 58: L01 Enterprise Application Architecture

Client-Server The client handles all computation –

domain logic (business logic)– Limited reusability– Versioning is a challenge

Page 59: L01 Enterprise Application Architecture

Move to Three Tiers Three Layers– Presentation Layer for the User Interface– Domain Layer for the domain logic– Data Source Layer for the data access

Page 60: L01 Enterprise Application Architecture

Enter the Web Layer The Web added new challenges

– The browser accesses strings of tags (HTML)– Move the logic from client to a web layer

– Web layer adds connectivity by HTTP protocols

Page 61: L01 Enterprise Application Architecture

Application Servers Domain Components are deployed on

Application Servers– Distributed Multi-tiered Applications– Example:

• Web Servers, Spring, EJB containers

Page 62: L01 Enterprise Application Architecture

Client Types Native Applications – Apps – Usually use some OS GUI and APIs– Windows, Linux, MacOS, iOS, Andriod– Communication can be anything

Embedded– Run inside Web Browsers– Flash, Java Applets– Communication with XML using HTTP

Page 63: L01 Enterprise Application Architecture

Client Types Rich Internet Application (RIA)– JavaScript calls REST/SOAP services for data– HTML with XML/Json using Ajax/jQuery

HTML Presentation in Browsers– All functionality is server side– Simple HTML

Page 64: L01 Enterprise Application Architecture

Tiers vs. Layers Tier implies physical layer

– Example:• Client-server is two-tier system: client on one machine,

server on another

Layers do not need to run on separate machines– Layers can be on the same machine– Example:

• Web system with Web Layer, Domain Layer and Data Source Layer on the same machine, then the database on a separate machine

Page 65: L01 Enterprise Application Architecture

N-tier Web App Architecture Classic architecture

Page 66: L01 Enterprise Application Architecture

Which of the following statements is not true?

A) Versioning is only a challenge with client-service modelB) Layers need not be on a separate machinesC) Web servers can be used as application serversD) Scalability is achieved by duplicating the system

QUIZ

Page 67: L01 Enterprise Application Architecture

Service Oriented Architecture

Page 68: L01 Enterprise Application Architecture

Imagine you are building an e-commerce web site

Page 69: L01 Enterprise Application Architecture

Traditional Architecture

Bookstore UI

Accounting service

Payment service

Shipping service SQLBrowser Apache

Page 70: L01 Enterprise Application Architecture

Benefits– Simple to develop and test, good architecture– One release and deployment– Easy to scale

Monolithic Architecture– Silo– Any subsystem can call other subsystems

Traditional Architecture

Page 71: L01 Enterprise Application Architecture

Drawbacks with the Monolith– UI requirements, multiple devices, streaming

real-time– Need to deploy everything to change one

component– Increased risk of failure– Fear of change– Updates are less often (A/B tests are difficult)

Traditional Architecture

Page 72: L01 Enterprise Application Architecture

Service Oriented Architecture Software Architecture where all

components are designed to be services Applications composed of interoperable

services– Easy to build new services– Easy to change

Page 73: L01 Enterprise Application Architecture

SOA Architecture

Bookstore Service

Accountservice

Payment service

Shipping service

Bookstore UI

API

Page 74: L01 Enterprise Application Architecture

Bezos’ Mandate1. All teams will henceforth expose their

data and functionality through service interfaces

2. Teams must communicate with each other through these interfaces

3. There will be no other form of interprocess communication allowed

Page 75: L01 Enterprise Application Architecture

Bezos’ Mandate4. It doesn't matter what technology they

use5. All service interfaces, without exception,

must be designed from the ground up to be externalizable. No exceptions.

6. Anyone who doesn't do this will be fired.

Page 76: L01 Enterprise Application Architecture

Which statement is not true about SOA?

A) SOA does not affect performanceB) No service can access other service data except using APIsC) SOA improves productivity though reuseD) Monoliths system must deploy all components

QUIZ

Page 77: L01 Enterprise Application Architecture

Layering

Page 78: L01 Enterprise Application Architecture

Layering Software systems can get complicated– Abstractions are needed

Layering provides abstraction by separating computer systems in layers– Higher layers use services from

lower layers– Each layer has dedicated tasks

and hides complexity from upperlayers

Page 79: L01 Enterprise Application Architecture

Benefits of Layering You can understand a single layer as a

coherent whole without knowing much about other layers

You can substitute layers with alternative implementation of the same basic service

You minimize dependencies between layers Layers make good places for standardization Once you have a layer built, you can use it for

many higher-level services

Page 80: L01 Enterprise Application Architecture

Downsides Layers encapsulate some, but not all,

things well– Cascading changes– For example adding a field in the UI requires

changes on each layer Extra layers can harm performance– At every layer things typically need to be

transformed from one presentation to another

Page 81: L01 Enterprise Application Architecture

The Three Layers Presentation

– User’s interface to the system– User can be another system– Accepts input, displays views

Domain– The Application of the system– The “Business logic”– Tends to creep into presentation and data source

Data Source– Connection to the database– Also Persistence

Page 82: L01 Enterprise Application Architecture

Summary The Post-PC era poses new challenges Enterprise Application defined Building Blocks for building enterprise

applications Service Oriented Architecture Layering is the oldest trick in the book