charlie garrod michael hiltoncharlie/courses/15-214/2017-fall/slides/...2017/11/28  · • beware:...

Post on 29-Sep-2020

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

115-214

SchoolofComputerScience

ArchitecturalPatterns/Styles

CharlieGarrod MichaelHilton

215-214

Administrivia

• Homework6checkpoint– MondayDec4th

• FinalExamReview:Dec13th,2-4pmWean5409• FinalExam:Dec15th,5:30-8:30pmWean7500

315-214

LastTime:

• DesignPatterns

415-214

ARCHITECTURALPATTERNS/STYLES

515-214

DesignPatterns

615-214

ArchitecturalStyles

715-214

ArchitecturalStyles

815-214

ArchitecturalStylesvsDesignPatterns

915-214

MonolithicApplication

+Simpletostart+Simpletodeploy+Fasttimetofirstfeature- Difficultfornewdeveloperstocomeuptospeed- Continuousdeploymentisdifficult- Scalingcanbedifficult- Candevolveinto“bigballofmud”

1015-214

Layers

1115-214

Layers

• Context:– Alargesystemthatrequiresdecomposition

• Problem:– Lowseparationofconcerns.– Partsofsystemarenotinterchangeable– Lackofgroupedcomponentshurtsunderstandabilityandmaintainability– Lackofboundariesmakestaskingdifficult

• Solution:– Definelayersofabstraction– Specifyservicesbetweenboundaries

• Beware:– Antipattern:Sinkhole– Antipattern:Lasagna

1215-214

Pipeandfilter

1315-214

Pipeandfilter

• Context:– Processingdatastream

• Problem:– Needtoprocessortransformastreamofdata– Non-adjacentstepsdon’tshareinformation– Needtoreusecertainstepsintheprocess

• Solution:– Eachfiltertransformsthedata,thenmovesitontothenextstep

• Beware:– ErrorHandling– Datatransformationoverhead

1415-214

Blackboard

1515-214

Blackboard

• Context:– Animmaturedomainwherenoclosedapproachisknowntobefeasible

• Problem:– Acompletesearchofsolutionspaceisnotfeasable– Multiplealgorithmspossiblefordifferentsubtasks– Somealgorithmsworkontheoutputofothers– Uncertaindataandaprox solutionsareinvolved

• Solution:– Independentprogramsworkingcooperativelyoncommondata– Inspectandupdatedata

• Beware:– Difficulttotest– Difficultestablishingagoodcontrolstrategy

1615-214

Model-View-Controller

1715-214

Model-View-Controller

• Context:– InteractiveapplicationswithaflexibleHuman-Computerinterface

• Problem:– Howtodevelopanapplicationnotdependentoninterface– Needabilityforapplicationtosupportdifferentinterfaces– Allowsimultaneousdevelopment

• Solution:– Model– View– Controllerdivision

• Beware:– Codenavigability– Increasedcomplexity

1815-214

Broker

1915-214

Broker

• Context:– Decoupledcomponentsinteractthroughremoteserviceinvocations

• Problem:– Scalingforlargescalesystems– Componentsshouldbedecoupledanddistributed

• Solution:– Brokersmediatebetweenclientsandservers

• Beware:– Lessefficient– Lowerfaulttolerance

2015-214

Microkernel

2115-214

Microkernel

• Context:– Thedevelopmentofseveralapplicationsthatusesimilarinterfaceson

samecore

• Problem:– Shouldcopewithcontinuoushardwareandsoftwareevolution– Platformshouldbeportable,extensibleandadaptable

• Solution:– Encapsulatefundamentalservicesofyourapplicationplatformina

microkernel– Otherfunctionalityprovidedbyinternalservers

• Beware:– Complexityofdesignandimplementation

2215-214

Event-drivenarchitecture

2315-214

Event-drivenarchitecture

• Context:– Buildingalooselycoupled,moreresponsivesystem

• Problem:– Buildasystemthatreactstoeventsintheworldaroundit– Onlyhavetodecidewhattodo,notwhentodoit

• Solution:– Eventcreators,managers,andconsumers

• Beware:– Securityrisks– Increasedcomplexity

2415-214

Peer-to-peer

2515-214

Peer-to-peer

• Context:– Asystemwhereeachnodehasthesamecapabilitiesandresponsibilities

• Problem:– Asituationwhereitisnotfeasibletoknowaheadoftimewhichnodes

willbeservers– Largeamountsofdataneedtobesenttransmitted

• Solution:– Decentralizedcomputing– Highlyrobustinthefaceofnodefailure– Highlyscalable

• Beware:– Noservertomanagedata– Noalwaysusedforlegalpurposes

2615-214

Service-orientedarchitecture

2715-214

Service-orientedarchitecture

• Context:– Servicesareprovidedtoothercomponentsoveranetwork

• Problem:– Buildingadistributedsystem– Exposeaservicenoobjects

• Solution:– Eachserviceshould:

• Representabusinessactivitywithaspecificoutcome• Beself-contained• Ablack-boxforitsconsumers• Mayconsistofunderlyingservices

• Beware:– Highinvestmentcost

2815-214

Exercise:

• Styles:– Monolith– Layers– PipeandFilter– Blackboard– MVC– Broker– Peer-to-peer– Microkernel– Event-driven– Service-oriented

• Application– Onlinebankingapplication– APIforthirdpartytoolstoget

bankinginformation– Compiler– OpticalCharacterrecognition– VRcontentdeliverysystem– VRgame– Insuranceclaimprocessing

system

top related