Architecture Styles and Design of Network Based Software
Total Page:16
File Type:pdf, Size:1020Kb
UNIVERSITY OF CALIFORNIA, IRVINE Architectural Styles and the Design of Network-based Software Architectures DISSERTATION submitted in partial satisfaction of the requirements for the degree of DOCTOR OF PHILOSOPHY in Information and Computer Science by Roy Thomas Fielding Dissertation Committee: Professor Richard N. Taylor, Chair Professor Mark S. Ackerman Professor David S. Rosenblum 2000 © Roy Thomas Fielding, 2000. All rights reserved. The dissertation of Roy Thomas Fielding is approved and is acceptable in quality and form for publication on microfilm: ____________________________________ ____________________________________ ____________________________________ Committee Chair University of California, Irvine 2000 ii DEDICATION To my parents, Pete and Kathleen Fielding, who made all of this possible, for their endless encouragement and patience. And also to Tim Berners-Lee, for making the World Wide Web an open, collaborative project. What is life? It is the flash of a firefly in the night. It is the breath of a buffalo in the wintertime. It is the little shadow which runs across the grass and loses itself in the sunset. — Crowfoot's last words (1890), Blackfoot warrior and orator. Almost everybody feels at peace with nature: listening to the ocean waves against the shore, by a still lake, in a field of grass, on a windblown heath. One day, when we have learned the timeless way again, we shall feel the same about our towns, and we shall feel as much at peace in them, as we do today walking by the ocean, or stretched out in the long grass of a meadow. — Christopher Alexander, The Timeless Way of Building (1979) iii TABLE OF CONTENTS Page LIST OF FIGURES .......................................................................................vi LIST OF TABLES........................................................................................vii ACKNOWLEDGMENTS ...........................................................................viii CURRICULUM VITAE.................................................................................x ABSTRACT OF THE DISSERTATION ....................................................xvi INTRODUCTION ..........................................................................................1 CHAPTER 1: Software Architecture ..............................................................5 1.1 Run-time Abstraction............................................................................................5 1.2 Elements................................................................................................................7 1.3 Configurations ....................................................................................................12 1.4 Properties ............................................................................................................12 1.5 Styles...................................................................................................................13 1.6 Patterns and Pattern Languages ..........................................................................16 1.7 Views ..................................................................................................................17 1.8 Related Work ......................................................................................................18 1.9 Summary.............................................................................................................23 CHAPTER 2: Network-based Application Architectures.............................24 2.1 Scope...................................................................................................................24 2.2 Evaluating the Design of Application Architectures ..........................................26 2.3 Architectural Properties of Key Interest .............................................................28 2.4 Summary.............................................................................................................37 iv CHAPTER 3: Network-based Architectural Styles ......................................38 3.1 Classification Methodology................................................................................38 3.2 Data-flow Styles .................................................................................................41 3.3 Replication Styles ...............................................................................................43 3.4 Hierarchical Styles..............................................................................................45 3.5 Mobile Code Styles.............................................................................................50 3.6 Peer-to-Peer Styles..............................................................................................55 3.7 Limitations ..........................................................................................................59 3.8 Related Work ......................................................................................................60 3.9 Summary.............................................................................................................64 CHAPTER 4: Designing the Web Architecture: Problems and Insights......66 4.1 WWW Application Domain Requirements ........................................................66 4.2 Problem...............................................................................................................71 4.3 Approach.............................................................................................................72 4.4 Summary.............................................................................................................75 CHAPTER 5: Representational State Transfer (REST)................................76 5.1 Deriving REST ...................................................................................................76 5.2 REST Architectural Elements.............................................................................86 5.3 REST Architectural Views .................................................................................97 5.4 Related Work ....................................................................................................103 5.5 Summary...........................................................................................................105 CHAPTER 6: Experience and Evaluation ..................................................107 6.1 Standardizing the Web......................................................................................107 6.2 REST Applied to URI.......................................................................................109 6.3 REST Applied to HTTP....................................................................................116 6.4 Technology Transfer.........................................................................................134 6.5 Architectural Lessons .......................................................................................138 6.6 Summary...........................................................................................................147 CONCLUSIONS.........................................................................................148 REFERENCES............................................................................................152 v LIST OF FIGURES Page Figure 5-1. Null Style 77 Figure 5-2. Client-Server 78 Figure 5-3. Client-Stateless-Server 78 Figure 5-4. Client-Cache-Stateless-Server 80 Figure 5-5. Early WWW Architecture Diagram 81 Figure 5-6. Uniform-Client-Cache-Stateless-Server 82 Figure 5-7. Uniform-Layered-Client-Cache-Stateless-Server 83 Figure 5-8. REST 84 Figure 5-9. REST Derivation by Style Constraints 85 Figure 5-10. Process View of a REST-based Architecture 98 vi LIST OF TABLES Page Table 3-1. Evaluation of Data-flow Styles for Network-based Hypermedia 41 Table 3-2. Evaluation of Replication Styles for Network-based Hypermedia 43 Table 3-3. Evaluation of Hierarchical Styles for Network-based Hypermedia 45 Table 3-4. Evaluation of Mobile Code Styles for Network-based Hypermedia 51 Table 3-5. Evaluation of Peer-to-Peer Styles for Network-based Hypermedia 55 Table 3-6. Evaluation Summary 65 Table 5-1. REST Data Elements 88 Table 5-2. REST Connectors 93 Table 5-3. REST Components 96 vii ACKNOWLEDGMENTS It has been a great pleasure working with the faculty, staff, and students at the University of California, Irvine, during my tenure as a doctoral student. This work would never have been possible if it were not for the freedom I was given to pursue my own research interests, thanks in large part to the kindness and considerable mentoring provided by Dick Taylor, my long-time advisor and committee chair. Mark Ackerman also deserves a great deal of thanks, for it was his class on distributed information services in 1993 that introduced me to the Web developer community and led to all of the design work described in this dissertation. Likewise, it was David Rosenblum’s work on Internet-scale software architectures that convinced me to think of my own research in terms of architecture, rather than simply hypermedia or application-layer protocol design. The Web’s architectural style was developed iteratively over a six year period, but primarily during the first six months of 1995. It has been influenced by countless discussions with researchers at UCI, staff at the World Wide Web Consortium (W3C), and engineers within the HTTP and URI working groups of the Internet Engineering Taskforce (IETF).