200 likes | 234 Views
A Reference Architecture for Web Servers. A. E. Hassan and R. C. Holt. What is a Reference Architecture. A Reference Architecture for a domain is an architecture template for all of the software systems in the domain
E N D
A Reference Architecture for Web Servers A. E. Hassan and R. C. Holt
What is a Reference Architecture • A Reference Architecture for a domain is an architecture template for all of the software systems in the domain • The Reference Architecture defines the fundamental components of the domain and the relations between the components • The architecture for a specific implementation in the domain is an instance of the reference architecture
Domains • Domains classify a family of products that perform a similar function • Its argued that individual products within a domain should share a reference architecture • Examples: Compilers and Operating Systems • This paper proposes a reference architecture for web servers and examines 3 open source web server instances – Apache (“C”), Jigsaw (Java), AOLServer (“C” and TCL)
The Value of Reference Architectures • Valuable for design and program understanding • A template to be used for new designs • A template to support mapping from a reverse engineering perspective • Provides common terminology for similar things that are described differently in specific implementations of a product family • Supports objective comparisons of different product implementations
The Web Domain url Browser Internet Web Server Operating System Resources Programs: Servlet,CGI, etc. Files:HTML, etc.
Deriving A Web Server Reference Architecture • Goal: Reverse Engineer the Reference Architecture for the Web Server domain using 3 different web server products • Authors were not domain experts • Authors did not interview system implementers • Reference architecture derived from the source code
Process: Deriving A Web Server Reference Architecture • Develop a set of usage scenarios • Execute the scenarios and trace the implementation • Individual scenarios help uncover parts of the reference architecture • Quality of the reference architecture is based on the quality and quantity of the chosen scenarios
Process: Deriving A Web Server Reference Architecture • Step 1: Derive the conceptual (as-designed) architecture: • Propose a conceptual architecture using domain knowledge • Refine the conceptual architecture using reverse engineering techniques • Continue until the conceptual architecture is “reasonable” • Step 2: Derive the reference architecture using the conceptual architectures • Propose a reference architecture based on domain knowledge and the common structures between the conceptual architectures • Refine and continue until the reference architecture is “reasonable”
Web Server Reference Architecture Reference Architecture For Web Servers Apache AOL Server Jigsaw ConceptualArchitecture ConceptualArchitecture ConceptualArchitecture ConcreteArchitecture ConcreteArchitecture ConcreteArchitecture
Starting the Web Server Reference Architecture Recovery Process • Start: What is the architecture style? • Domain knowledge suggests a pipe-and-filter style • Use the architecture style to guide the creation of the reference architecture • Since intuition suggests a pipe-and-filter architectural style, the reference architecture should capture the significant subsystems and the data flow between the subsystems
Web Server Reference Architecture Reception LEGEND RequestAnalysis RecordTransaction ReferenceSubsystem AccessControl ResourceHandler All SubsystemsUse Utilities OS AbstractionLayer Control Flow Operating System
Reference Architecture Flexibility • A reference architecture must be flexible to encompass many product architectures • Resource Mapping Flexibility – A web server must map resources managed by the operating system to the web • Security Flexibility – A web server must support security but the implementation can be specific to a product and/or operating system. • Concurrency Flexibility – A web server must support concurrent access but the concurrency model can be different. Apache uses process pools, AOL Server and Jigsaw use threads.
Web Servers Examined • Apache • Written in “C” • 80K Lines of Code • AOL Server • Written in “C” and TCL • 164K Lines of Code – 160K in “C”, 4K in TCL • Jigsaw • Written in Java • 106K Lines of Code
Apache Architecture Request_recCommon structure passedbetween thesubsystems Core Assign a requestto a Process Translation Determine locallocation of theresource Logging Log theTransaction Response Generate theresponse Authentication Authenticate theclient (if needed) Authorization Determine if theclient is authorized MIME Type What is beingrequested Util Utilities: stringmanipulation, regexp, etc OS Layer Used to abstract – portingto different OS
Mapped Apache Architecture Reception Core Utilities Util Request Analysis Record Transaction Translation Logging OSAbstractionLayer Access Control Resource Handler Authentication MIME Type OSLayer Authorization Response
AOL Server Architecture Communication Driver Abstract Communication Protocol –SSL, HTTP, Sockets, etc. ConnCommon structure passedbetween thesubsystems Daemon Core Translate request into a commondata structure - Conn NSPerm Handles Authorization and Authentication URLHandle Execute Requestand Generate theResponse NSLog Log the Transaction Timer Util DatabaseInterface TCLServices NSThread
Mapped AOL Server Architecture Reception/Request Analysis CommunicationDriver Daemon Core Access Control Resource Handler Record Transaction NSPerm URLHandle NSLog OS AbstractionLayer Utilities Timer Util DatabaseInterface TCLServices NSThread
Jigsaw Architecture Daemon Protocol and ThreadPool Manager ProtocolFrameinFilter ProtocolFrameoutFilter Resource Handle Requestand GenerateResponse ResourceinFilter ResourceoutFilter Util Common Services OS Layer Nothing Here – Jigsaw Written in Java
Mapped Jigsaw Architecture Reception/Request Analysis Daemon Access Control Record Transact. Resource Handler ProtocolFrameinFilter ProtocolFrameoutFilter Request ResourceinFilter ResourceoutFilter Utilities OS AbstractionLayer Util
Summary: Creating a Reference Architecture for a Web Server • Reference Architectures are good for system understanding • Enables implementations within an application domain to be compared to each other • Facilitates both forward and reverse engineering of products within a domain • The paper illustrated a reverse engineering approach towards recovering a reference architecture, and examined 3 different open-source web servers • A reasonable reference architecture for a Web Server was produced