32
WATERLOO CHERITON SCHOOL OF COMPUTER SCIENCE Conceptual, Concrete & Conceptual, Concrete & Reference Architecture Reference Architecture Linux Case Study” Linux Case Study” A Reference Architecture for Web Servers” A Reference Architecture for Web Servers” CS 446/646 ECE452 May 27 th , 2011 IMPORTANT NOTICE TO STUDENTS These slides are NOT to be used as a replacement for student notes. These slides are sometimes vague and incomplete on purpose to spark a class discussion

Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Conceptual, Concrete & Conceptual, Concrete & Reference Architecture Reference Architecture 

““Linux Case Study”Linux Case Study”““A Reference Architecture for Web Servers”A Reference Architecture for Web Servers”

CS 446/646 ECE452May 27th, 2011

IMPORTANT NOTICE TO STUDENTS

These slides are NOT to be used as a replacement for student notes.These slides are sometimes vague and incomplete on purpose to spark a class discussion

Page 2: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 2WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Conceptual ArchitectureIntent● “ direct attention at an appropriate decomposition of the

system without delving into the details of interface specification”[1]

● appropriate decomposition– focus on key constructs & abstractions

rather than on technical/implementation details

[1] R. Malan, D. Bredemeyer, Software Architecture Action Guide.

Page 3: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 3WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Conceptual ArchitectureIncludes● what a system does (requirements / functionality)● identification of significant components & connectors

– component responsibilities– component interactions– control & data flow

● identification of architectural (non-functional) concerns– e.g. security– other crosscutting concerns

Page 4: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 4WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Conceptual ArchitectureProvides● communicating architectural details with

– stakeholders (technical & non-technical)

Input artifacts● reference architecture (more on this later)● requirements (functional & non-functional)● documentation & code

– Hmm...these two seem out of place?

Page 5: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 5WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Conceptual ArchitectureActivities● capture system functionality

– requirements to use case descriptions● capture system properties

– evolution, system load, portability● capture system constraints

– legacy components, third party components– resources, time– technical capabilities

Page 6: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 6WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Concrete ArchitectureIntent● implementation specific architecture

– decomposition into (implementation specific components)– identification of actual relationships

● actual– e.g. identify third party, COTS components

Page 7: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 7WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Concrete ArchitectureIncludes● what a system does (requirements / functionality)● how will it do it● identification of significant components & connectors

– component responsibilities– component interactions– control & data flow

● realization of architectural non-functional concerns

Page 8: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 8WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Concrete ArchitectureInput Artifacts● ask the class● can we extract concrete architecture from code

– isn't that reveres engineering?– choice of tools

Page 9: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 9WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

ExampleLinux● lack of formal architecture

– conceptual or concrete● considerable code size● fragmented documentation

– individual systems well defined but not the overall● based on

– Linux as a Case Study: Its Extracted Software Architecture, Ivan T. Bowman, Richard C. Holt, Neil V. Brewster, 2005

Page 10: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 10WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

ExampleLinux Conceptual Architecture● input artifacts

– Unix & Minix descriptions– Linux documentation

Page 11: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 11WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Linux Conceptual ArchitectureObservations● seven kernel sub-systems● dependencies

– initialization depends on all

– library sub system forms the core

Page 12: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 12WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Linux Concrete ArchitectureGeneral technique● inspection

– source (directory structures, packages, file naming etc)– compiled artifacts

● clustering– grouping of components

● discovery– inter-component dependency

Page 13: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 13WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Linux Concrete Architecture

Page 14: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 14WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Conceptual Architecture Concrete Architecture

Comparison

Page 15: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 15WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

ObservationsStructural● same subsystem decomposition

– despite different input artifacts

Dependency Relationships● higher than expected inter-component dependency found● why would this be?

– “avoided existing interfaces for better efficiency”

Page 16: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 16WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Architectural Drift & ErosionArchitectural erosion

– conceptual architectural violations

Architectural drift– concrete architecture shifts away from conceptual

architecture

Page 17: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 17WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Reference ArchitectureDefinitions● “A reference architecture for a domain defines the

fundamental components of the domain and the relations between them”

● “A reference architecture for a domain is an architectural template for all the software systems in the domain”

Page 18: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 18WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Example 1Automobile● attributes

– transportation– wheels– steering– speed / gears

Page 19: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 19WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Is This an Automobile?

But this meets the attribute list

Page 20: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 20WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

PropertiesDomain● what is a domain?● reference architecture covers a whole domain

Fundamental components● universal abstractions

– applicable across the domain● interaction of these abstractions

Template● a product architecture is an instantiation of the reference

Page 21: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 21WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

PropertiesAvailability● well known for mature domain

– compilers, operating systems● absent for new domains

– web servers

Page 22: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 22WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

BenefitsDocumentation● captures the main ideas and components across domain● provides a higher level abstraction for architecture itself

– we don't have to reinvent the wheel or the architecture

Communication● provides a common vocabulary

– the wheel is too big– braking distance of the car is reasonable– 0 to 60 in 10 seconds

Page 23: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 23WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

BenefitsEvaluation● aids in the comparison of the different product

architectures in the same domain– electric vs. hybrid– sedan vs. coupe

Page 24: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 24WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Web Server Reference ArchitectureDomain: ● web servers,

application servers

Web servers● Apache● AOL Server● Jigsaw

Page 25: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 25WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Summary of Web Servers

WebServer

DevType

1st Release

Code Size

(KLOC)

Impl Arch stable

for (years)

Apache Open source

April 1995 80 C 5

AOL Server

Commercial May 1995 164 C & TCL

-

Jigsaw Educational May 1996 106 Java 2.5

Page 26: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 26WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Deriving Reference ArchitectureProcess● step1: derive a conceptual architecture for each

– propose a conceptual architecture ● using domain knowledge and available documentation

– refine the conceptual architecture ● using the concrete architecture

– Q: did we not say that a reference architecture should be an input artifact to a conceptual architecture?

Page 27: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 27WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Deriving Reference ArchitectureProcess● step2: derive a reference architecture from step 1

– propose a reference architecture based on ● domain knowledge● common structure between the conceptual architecture

– refine the reference architecture ● using the conceptual architecture (from step 1)

Page 28: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 28WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Web Server Reference ArchitectureArchitectural Style● follows pipes & filter

architectural style– hmmm.... does it

really?– what other

architectural styles better define web servers?

Page 29: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 29WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Flexibility of Reference ArchitectureIntent● “To be useful a reference architecture must be flexible

enough to encompass many product architectures”

● what does flexibility mean?– security flexibility?– concurrency flexibility?

Page 30: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 30WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Reference & Conceptual Mapped

Apachereception

requestanalysis

access control

resource handler

record transactions

util

OSAL

Page 31: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 31WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

Reference & Conceptual Mapped

AOL receptionand request analysis

access control

resourcehandler

recordtransaction

util OSAL

Page 32: Conceptual, Concrete & Reference Architecturea78khan/cs446/lectures/2011_05-may_27... · “A reference architecture for a domain defines the fundamental components of the domain

2011-05-04CS446/646 ECE452 32WATERLOOCHERITON SCHOOL OFCOMPUTER SCIENCE

ObservationsStructural● subsystem organization is the

main difference and not the subsystem responsibility● reference architecture is abstract

– does not depend on ● development methodology● platform● implementation concerns