Architectural Styles and the Design of Network-Based Software Architectures
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 © Roy Thomas Fielding, 2000. All rights reserved. 2000 DEDICATION To my parents, Pete and Kathleen Fielding, The dissertation of Roy Thomas Fielding is approved and is acceptable in quality and form who made all of this possible, for publication on microfilm: 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. ____________________________________ Committee Chair 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 University of California, Irvine stretched out in the long grass of a meadow. 2000 — Christopher Alexander, The Timeless Way of Building (1979) ii iii TABLE OF CONTENTS Page CHAPTER 3: Network-based Architectural Styles ......................................38 3.1 Classification Methodology................................................................................38 LIST OF FIGURES .......................................................................................vi 3.2 Data-flow Styles .................................................................................................41 3.3 Replication Styles ...............................................................................................43 3.4 Hierarchical Styles..............................................................................................45 LIST OF TABLES........................................................................................vii 3.5 Mobile Code Styles.............................................................................................50 3.6 Peer-to-Peer Styles..............................................................................................55 ACKNOWLEDGMENTS ...........................................................................viii 3.7 Limitations ..........................................................................................................59 3.8 Related Work ......................................................................................................60 3.9 Summary.............................................................................................................64 CURRICULUM VITAE.................................................................................x CHAPTER 4: Designing the Web Architecture: Problems and Insights......66 ABSTRACT OF THE DISSERTATION ....................................................xvi 4.1 WWW Application Domain Requirements ........................................................66 4.2 Problem...............................................................................................................71 INTRODUCTION ..........................................................................................1 4.3 Approach.............................................................................................................72 4.4 Summary.............................................................................................................75 CHAPTER 1: Software Architecture ..............................................................5 CHAPTER 5: Representational State Transfer (REST)................................76 1.1 Run-time Abstraction............................................................................................5 1.2 Elements................................................................................................................7 5.1 Deriving REST ...................................................................................................76 1.3 Configurations ....................................................................................................12 5.2 REST Architectural Elements.............................................................................86 1.4 Properties ............................................................................................................12 5.3 REST Architectural Views .................................................................................97 1.5 Styles...................................................................................................................13 5.4 Related Work ....................................................................................................103 1.6 Patterns and Pattern Languages ..........................................................................16 5.5 Summary...........................................................................................................105 1.7 Views ..................................................................................................................17 1.8 Related Work ......................................................................................................18 CHAPTER 6: Experience and Evaluation ..................................................107 1.9 Summary.............................................................................................................23 6.1 Standardizing the Web......................................................................................107 6.2 REST Applied to URI.......................................................................................109 CHAPTER 2: Network-based Application Architectures.............................24 6.3 REST Applied to HTTP....................................................................................116 2.1 Scope...................................................................................................................24 6.4 Technology Transfer.........................................................................................134 2.2 Evaluating the Design of Application Architectures ..........................................26 6.5 Architectural Lessons .......................................................................................138 2.3 Architectural Properties of Key Interest .............................................................28 6.6 Summary...........................................................................................................147 2.4 Summary.............................................................................................................37 CONCLUSIONS.........................................................................................148 REFERENCES............................................................................................152 iv v LIST OF FIGURES LIST OF TABLES Page Page Figure 5-1. Null Style 77 Table 3-1. Evaluation of Data-flow Styles for Network-based Hypermedia 41 Figure 5-2. Client-Server 78 Table 3-2. Evaluation of Replication Styles for Network-based Hypermedia 43 Figure 5-3. Client-Stateless-Server 78 Table 3-3. Evaluation of Hierarchical Styles for Network-based Hypermedia 45 Figure 5-4. Client-Cache-Stateless-Server 80 Table 3-4. Evaluation of Mobile Code Styles for Network-based Hypermedia 51 Figure 5-5. Early WWW Architecture Diagram 81 Table 3-5. Evaluation of Peer-to-Peer Styles for Network-based Hypermedia 55 Figure 5-6. Uniform-Client-Cache-Stateless-Server 82 Table 3-6. Evaluation Summary 65 Figure 5-7. Uniform-Layered-Client-Cache-Stateless-Server 83 Table 5-1. REST Data Elements 88 Figure 5-8. REST 84 Table 5-2. REST Connectors 93 Figure 5-9. REST Derivation by Style Constraints 85 Table 5-3. REST Components 96 Figure 5-10. Process View of a REST-based Architecture 98 vi 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 The modern Web architecture is still defined more by the work of individual volunteers Dick Taylor, my long-time advisor and committee chair. Mark Ackerman also deserves a than by any single company. Chief among them are the members of the Apache Software great deal of thanks, for it was his class on distributed information services in 1993 that Foundation. Special thanks go to Robert S. Thau for the incredibly robust Shambhala introduced me to the Web developer community and led to all of the design work design that led to Apache 1.0, as well as for many discussions on desirable (and described in this dissertation. Likewise, it was David Rosenblum’s work on Internet-scale undesirable) Web extensions, to Dean Gaudet for teaching me more about detailed system software architectures that convinced me to think of my own research in terms of performance