Overview Of Layered Architectures - Vanderbilt University

Transcription

Overview of Layered ArchitecturesDouglas C. edu/ schmidtProfessor of Computer ScienceInstitute for SoftwareIntegrated SystemsVanderbilt UniversityNashville, Tennessee, USA

Learning Objectives in this Lesson1. Know what layeredarchitectures areApplication LayerApplicationsPresentation LayerDomain-SpecificMiddleware ServicesSession LayerCommonMiddleware ServicesTransport LayerDistributionMiddlewareInternetLayerHost InfrastructureMiddlewareData Link LayerOperating Systems& ProtocolsPhysical LayerHardware2

Learning Objectives in this Lesson1. Know what layeredarchitectures are2. Understand the Layersarchitectural patternLayer interfaceLayer CLayerimplementationLayer BLayer A3

Learning Objectives in this Lesson1. Know what layeredarchitectures are2. Understand the Layersarchitectural pattern3. Recognize the layers inAndroid’s software stackART Dalvik Virtual Machine4

Learning Objectives in this Lesson1. Know what layeredarchitectures are2. Understand the Layersarchitectural pattern3. Recognize the layers inAndroid’s software stack4. Realize why layeringis used in AndroidART Dalvik Virtual Machine5

Overview ofLayered Architectures6

An Overview of Layered Architectures Layering is applied in many domains7

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacksApplication ables end-to-end communicationby specifying how data should be(un)packetized, addressed,transmitted, routed, & receivedInternetLayerData LinkLayerPhysical LayerSee en.wikipedia.org/wiki/Protocol stack8

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Lower layers handle interactionswith the hardware e.g., GSM, DSL, & EthernetApplication ternetLayerData LinkLayerPhysical LayerSee en.wikipedia.org/wiki/Link layer 9& en.wikipedia.org/wiki/Physical layer

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Lower layers handle interactionswith the hardware Middle layers exchange packetsacross hosts & routers e.g., IP, TCP, & UDPApplication ternetLayerData LinkLayerPhysical LayerSee en.wikipedia.org/wiki/Internet layer10& en.wikipedia.org/wiki/Transport layer

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Lower layers handle interactionswith the hardware Middle layers exchange packetsacross hosts & routers Upper layers implement & interactwith applications e.g., PPTP, XDR, CDR, JSONApplication ternetLayerData LinkLayerPhysical LayerSee en.wikipedia.org/wiki/Session layer 11& en.wikipedia.org/wiki/Presentation layer

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Lower layers handle interactionswith the hardware Middle layers exchange packetsacross hosts & routersApplication LayerPresentationLayerSessionLayer Upper layers implement & interactTransportLayer Applications (& middleware) mostlyInternetLayerwith applicationsjust deal with the upper layer(s) e.g., FTP, TELNET, SMTP, & SNMPData LinkLayerPhysical LayerSee en.wikipedia.org/wiki/Application layer12

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Communication middleware inmulti-tier enterprise IT systemsApplicationsDomain-SpecificMiddleware ServicesCommonMiddleware ServicesDistributionMiddlewareProvides services beyond the operatingsystem & protocol stacks to enablecomponents in a distributed system tocommunicate & manage dataHost InfrastructureMiddlewareOperating Systems& ProtocolsHardwareSee en.wikipedia.org/wiki/Middleware (distributed applications)13

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Communication middleware inmulti-tier enterprise IT systems Lower layers provide portableAPIs for accessing hardware& system resources e.g., Linux, Windows, JVM, & ACEApplicationsDomain-SpecificMiddleware ServicesCommonMiddleware ServicesDistributionMiddlewareHost InfrastructureMiddlewareOperating Systems& ProtocolsHardwareSee www.dre.vanderbilt.edu/ schmidt/PDF/middleware-encyclopedia.pdf14

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Communication middleware inmulti-tier enterprise IT systems Lower layers provide portableAPIs for accessing hardware& system resources Middle layers shield applicationsfrom network programming details e.g., DDS, Web Services, MQTT,Spring, CORBA, etc.ApplicationsDomain-SpecificMiddleware ServicesCommonMiddleware ServicesDistributionMiddlewareHost InfrastructureMiddlewareOperating Systems& ProtocolsHardwareSee www.dre.vanderbilt.edu/ schmidt/PDF/middleware-encyclopedia.pdf15

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Communication middleware inmulti-tier enterprise IT systems Lower layers provide portableAPIs for accessing hardware& system resourcesApplicationsDomain-SpecificMiddleware ServicesCommonMiddleware ServicesDistributionMiddleware Middle layers shield applicationsHost InfrastructureMiddleware Upper layers enable domain-specificOperating Systems& Protocolsfrom network programming detailsreuse of capabilities e.g., MD-PnP, IIC, & FACEHardwareSee www.dre.vanderbilt.edu/ schmidt/PDF/middleware-encyclopedia.pdf16

An Overview of Layered Architectures Layering is applied in many domains, e.g. Computer networking protocol stacks Communication middleware inmulti-tier enterprise IT systems Lower layers provide portableAPIs for accessing hardware& system resourcesApplicationsDomain-SpecificMiddleware ServicesCommonMiddleware ServicesDistributionMiddleware Middle layers shield applicationsHost InfrastructureMiddleware Upper layers enable domain-specificOperating Systems& Protocolsfrom network programming detailsreuse of capabilities Applications may deal w/multiple layersHardwareSee www.dre.vanderbilt.edu/ schmidt/PDF/middleware-encyclopedia.pdf17

Overview of the LayersArchitectural Pattern18

An Overview of the Layers Architectural Pattern The concept of layering has beenexpressed as an architectural pattern19See www.dre.vanderbilt.edu/ schmidt/POSA

An Overview of the Layers Architectural Pattern The concept of layering has beenexpressed as an architectural pattern“a structural organization schema forsoftware systems that provides a set of predefinedsubsystems specifies their responsibilities & includes rules & guidelines fororganizing the relationshipsbetween these roles”20See en.wikipedia.org/wiki/Architectural pattern

An Overview of the Layers Architectural Pattern The concept of layering has beenexpressed as an architectural pattern“a structural organization schema forsoftware systems that provides a set of predefinedsubsystems specifies their responsibilities & includes rules & guidelines fororganizing the relationshipsbetween these roles”21See en.wikipedia.org/wiki/Architectural pattern

An Overview of the Layers Architectural Pattern The concept of layering has beenexpressed as an architectural pattern“a structural organization schema forsoftware systems that provides a set of predefinedsubsystems specifies their responsibilities & includes rules & guidelines fororganizing the relationshipsbetween these roles”22See en.wikipedia.org/wiki/Architectural pattern

An Overview of the Layers Architectural Pattern The concept of layering has beenexpressed as an architectural pattern“a structural organization schema forsoftware systems that provides a set of predefinedsubsystems specifies their responsibilities & includes rules & guidelines fororganizing the relationshipsbetween these roles”23See en.wikipedia.org/wiki/Architectural pattern

An Overview of the Layers Architectural Pattern The Layers architectural pattern hasbeen described in various publications24See en.wikipedia.org/wiki/Multilayered architecture

An Overview of the Layers Architectural Pattern The Layers pattern structures software apps & infrastructure in several waysLayer CLayer interfaceLayerimplementationLayer BLayer A25See ttern.html

An Overview of the Layers Architectural Pattern The Layers pattern structures software apps & infrastructure in several waysa. Partitions an overall system architecture into groups of subtasksLayer interfaceLayer CLayerimplementationLayer BLayer A26

An Overview of the Layers Architectural Pattern The Layers pattern structures software apps & infrastructure in several waysa. Partitions an overall system architecture into groups of subtasksb. Decomposes groups of subtasks into levels of abstractionLayer interfaceLayer CLayerimplementationLayer BLayer A27

An Overview of the Layers Architectural Pattern The Layers pattern helps to simplify software development & evolution28

An Overview of the Layers Architectural Pattern The Layers pattern helps to simplify software development & evolution e.g., it replaces tightly coupled “big balls of mud” Function 1Function 2Function BFunction 3Function YFunction XFunction AFunction CFunction ZSee en.wikipedia.org/wiki/Big ball of mud29

An Overview of the Layers Architectural Pattern The Layers pattern helps to simplify software development & evolution e.g., it replaces tightly coupled “big balls of mud” with modular solutionsthat can be extended & contracted more easilyLayer interfaceLayer CLayerimplementationLayer BLayer ASee www.dre.vanderbilt.edu/ schmidt/family.pdf30

An Overview of the Layers Architectural Pattern Be careful when implementing a layered architecture to avoid unnecessaryoverhead when exchanging data between the layersLayer CLayer interfaceLayerimplementationLayer BLayer ASee www.dre.vanderbilt.edu/ schmidt/PDF/p96-van renesse.pdf31

An Overview of the Layers Architectural Pattern Be careful when implementing a layered architecture to avoid unnecessaryoverhead when exchanging data between the layers e.g., minimize context switching, synchronization, & data copying overheadLayer interfaceLayer CLayerimplementationLayer BLayer ASee www.cs.wustl.edu/ schmidt/PDF/dissertation.pdf32

An Overview ofAndroid’s LayeredArchitecture33

An Overview of Android’s Layered Architecture Android’s architecture isstructured in accordanceto multiple layersART Dalvik Virtual Machine34

An Overview of Android’s Layered Architecture Android’s architecture isstructured in accordanceto multiple layersART Dalvik Virtual Machine35The Android Linux kernel controls hardware& manages system resources

An Overview of Android’s Layered Architecture Android’s architecture isstructured in accordanceto multiple layersART Dalvik Virtual MachineSeveral layers of middleware provide36higher-level reusable services to apps

An Overview of Android’s Layered Architecture Android’s architecture isstructured in accordanceto multiple layersART Dalvik Virtual Machine37The application layer provides packagedfunctionality to end-users

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several ariesVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardware38

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software iesVM &RuntimeHardware AbstractionLayerAn intentional strategy for increasingproductivity & improving software qualityOperating SystemKernelHardware39See en.wikipedia.org/wiki/Code reuse#Systematic software reuse

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software iesVM &RuntimeHardware AbstractionLayerOperating SystemKernellibC provides a common API foraccessing OS kernel capabilitiesHardware40

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software iesVM &RuntimeHardware AbstractionLayerEnable apps to run concurrently overvarious types of multi-core hardware41Operating SystemKernelHardware

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software reuseApplications Enable “plug & play” replacement ofApplicationFrameworkscertain layer implementationsNativeLibrariesVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardware42

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software reuseApplications Enable “plug & play” replacement ofApplicationFrameworkscertain layer implementationsNativeLibrariesShield apps frominconsistenthardware APIsVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardware43

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software reuseApplications Enable “plug & play” replacement ofcertain layer sVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardware44 layer whose implementation changesEffects of updates can be confined to the

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software reuseApplications Enable “plug & play” replacement ofcertain layer implementations Reduce the complexity of APIs thatapp developers must understandApplicationFrameworksNativeLibrariesVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardwareSee en.wikipedia.org/wiki/Facade pattern45

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software reuseApplications Enable “plug & play” replacement ofcertain layer implementations Reduce the complexity of APIs thatapp developers must understand Enable use of popular protocols, APIs,& programming languagesApplicationFrameworksNativeLibrariesVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardware46

An Overview of Android’s Layered Architecture Layering is applied in complex systems like Android for several reasons, e.g. Enhance systematic software reuseApplications Enable “plug & play” replacement ofcertain layer implementations Reduce the complexity of APIs thatapp developers must understand Enable use of popular protocols, APIs,& programming languages These popular protocols & APIsare available in open-source formApplicationFrameworksNativeLibrariesVM &RuntimeHardware AbstractionLayerOperating SystemKernelHardwareSee source.android.com & source.android.com/source/building-kernels.html47

End of Overview ofLayered Architectures48

11 Layering is applied in many domains, e.g. Computer networking protocol stacks Lower layers handle interactions with the hardware Middle layers exchange packets across hosts & routers Upper layers implement & interact with applications e.g., PPTP, XDR, CDR, JSON An Overview of Layered Architectures Physical Layer Presentation Layer