Architectural StylesObject-Oriented StyleObject-Oriented LLOO/LL in UMLLayered StyleLayered Style (cont’d)Slide 7Layered Systems/Virtual MachinesLayered LLClient-Server StyleClient-Server LLData-Flow StylesBatch-Sequential: A Financial ApplicationBatch-Sequential LLPipe and Filter StylePipe and Filter (cont’d)Slide 17Pipe and Filter LLBlackboard StyleBlackboard LLRule-Based StyleRule-Based Style (cont’d)Rule Based LLInterpreter StyleInterpreter LLMobile-Code StyleMobile Code LLImplicit Invocation StyleImplicit Invocation (cont’d)Publish-SubscribePublish-Subscribe (cont’d)Pub-Sub LLEvent-Based StyleEvent-based LLPeer-to-Peer StylePeer-to-Peer Style (cont’d)Peer-to-Peer LLCopyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.Architectural StylesSoftware ArchitectureLecture 52Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureObject-Oriented StyleComponents are objectsData and associated operationsConnectors are messages and method invocationsStyle invariantsObjects are responsible for their internal representation integrityInternal representation is hidden from other objectsAdvantages“Infinite malleability” of object internalsSystem decomposition into sets of interacting agentsDisadvantagesObjects must know identities of serversSide effects in object method invocations3Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureObject-Oriented LLSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.4Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureOO/LL in UMLSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.5Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureLayered StyleHierarchical system organization“Multi-level client-server”Each layer exposes an interface (API) to be used by above layersEach layer acts as aServer: service provider to layers “above”Client: service consumer of layer(s) “below”Connectors are protocols of layer interactionExample: operating systemsVirtual machine style results from fully opaque layers6Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureLayered Style (cont’d)AdvantagesIncreasing abstraction levelsEvolvabilityChanges in a layer affect at most the adjacent two layersReuseDifferent implementations of layer are allowed as long as interface is preservedStandardized layer interfaces for libraries and frameworks7Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureLayered Style (cont’d)DisadvantagesNot universally applicablePerformanceLayers may have to be skippedDetermining the correct abstraction level8Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureLayered Systems/Virtual MachinesSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.9Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureLayered LLSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.10Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureClient-Server StyleComponents are clients and serversServers do not know number or identities of clientsClients know server’s identityConnectors are RPC-based network interaction protocols11Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureClient-Server LLSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.12Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureData-Flow StylesBatch SequentialSeparate programs are executed in order; data is passed as an aggregate from one program to the next.Connectors: “The human hand” carrying tapes between the programs, a.k.a. “sneaker-net ”Data Elements: Explicit, aggregate elements passed from one component to the next upon completion of the producing program’s execution.Typical uses: Transaction processing in financial systems. “The Granddaddy of Styles”13Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureBatch-Sequential: A Financial ApplicationSoftware Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.14Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitectureBatch-Sequential LLNot a recipe for a successful lunar mission!Software Architecture: Foundations, Theory, and Practice; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.15Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitecturePipe and Filter StyleComponents are filtersTransform input data streams into output data streamsPossibly incremental production of outputConnectors are pipesConduits for data streamsStyle invariantsFilters are independent (no shared state) Filter has no knowledge of up- or down-stream filtersExamplesUNIX shell signal processingDistributed systems parallel programmingExample: ls invoices | grep -e August | sort16Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitecturePipe and Filter (cont’d)VariationsPipelines — linear sequences of filtersBounded pipes — limited amount of data on a pipeTyped pipes — data strongly typedAdvantagesSystem behavior is a succession of component behaviorsFilter addition, replacement, and reusePossible to hook any two filters together Certain analysesThroughput, latency, deadlockConcurrent execution17Foundations, Theory, and PracticeSoftware ArchitectureSoftware ArchitecturePipe and Filter (cont’d)DisadvantagesBatch organization of processingInteractive applicationsLowest common denominator on data
View Full Document