Beautiful Architecture

Book description

What are the ingredients of robust, elegant, flexible, and maintainable software architecture? Beautiful Architecture answers this question through a collection of intriguing essays from more than a dozen of today's leading software designers and architects. In each essay, contributors present a notable software architecture, and analyze what makes it innovative and ideal for its purpose.

Some of the engineers in this book reveal how they developed a specific project, including decisions they faced and tradeoffs they made. Others take a step back to investigate how certain architectural aspects have influenced computing as a whole. With this book, you'll discover:

  • How Facebook's architecture is the basis for a data-centric application ecosystem
  • The effect of Xen's well-designed architecture on the way operating systems evolve
  • How community processes within the KDE project help software architectures evolve from rough sketches to beautiful systems
  • How creeping featurism has helped GNU Emacs gain unanticipated functionality
  • The magic behind the Jikes RVM self-optimizable, self-hosting runtime
  • Design choices and building blocks that made Tandem the choice platform in high-availability environments for over two decades
  • Differences and similarities between object-oriented and functional architectural views
  • How architectures can affect the software's evolution and the developers' engagement

Go behind the scenes to learn what it takes to design elegant software architecture, and how it can shape the way you approach your own projects, with Beautiful Architecture.

Publisher resources

View/Submit Errata

Table of contents

  1. Beautiful Architecture
    1. SPECIAL OFFER: Upgrade this ebook with O’Reilly
    2. Foreword
    3. Preface
      1. How This Book Is Organized
        1. Part I: On Architecture
        2. Part II: Enterprise Application Architecture
        3. Part III: Systems Architecture
        4. Part IV: End-User Application Architectures
        5. Part V: Languages and Architecture
      2. Principles, Properties, and Structures
      3. Conventions Used in This Book
      4. Using Code Examples
      5. Safari® Books Online
      6. How to Contact Us
      7. Acknowledgments
    4. I. On Architecture
      1. 1. What Is Architecture?
        1. Introduction
          1. The Role of Architect
          2. The Role of the Software Architect
          3. What Constitutes a Software Architecture?
          4. Architecture Versus Design
        2. Creating a Software Architecture
        3. Architectural Structures
          1. The Information Hiding Structures
          2. The Uses Structures
          3. The Process Structures
            1. Process gives work to
            2. Process gets resources from
            3. Process shares resources with
            4. Process contained in module
          4. Access Structures
          5. Summary of Structures
        4. Good Architectures
        5. Beautiful Architectures
        6. Acknowledgments
        7. References
      2. 2. A Tale of Two Systems: A Modern-Day Software Fable
        1. The Messy Metropolis
          1. Down the Tubes
            1. Incomprehensibility
            2. Lack of cohesion
            3. Unnecessary coupling
            4. Code problems
            5. Problems outside the code
            6. Clear requirements
          2. Where Is It Now?
          3. A Postcard from the Metropolis
        2. Design Town
          1. First Steps into Design Town
          2. The Story Unfolds
            1. Locating functionality
            2. Consistency
            3. Growing the architecture
            4. Deferring design decisions
            5. Maintaining quality
            6. Managing technical debt
            7. Unit tests shape design
            8. Time for design
            9. Working with the design
          3. Where Is It Now?
        3. So What?
        4. Your Turn
        5. References
    5. II. Enterprise Application Architecture
      1. 3. Architecting for Scale
        1. Introduction
        2. Context
          1. The First Goal
          2. The Game World
          3. Latency Is the Enemy
        3. The Architecture
          1. The Macro Structure
          2. The Basic Services
          3. Communication Services
          4. Task Portability
        4. Thoughts on the Architecture
          1. Parallelism and Latency
          2. Betting on the Future
          3. Simplifying the Programmer’s Job
      2. 4. Making Memories
        1. Capabilities and Constraints
        2. Workflow
        3. Architecture Facets
          1. Modules and Launcher
            1. ApplicationContext
            2. Module dependencies
            3. Launcher
          2. Kiosk-Style GUI
          3. UI and UI Model
            1. Forms
            2. Properties
            3. Bindings
            4. Application facade
          4. Interchangeable Workstations
            1. Image repositories
            2. NIO image transfer
            3. Fast and robust
          5. Database Migrations
            1. Updates as objects
            2. Regular exercise
            3. Safety features
            4. Field results
          6. Immutable Data and Ubiquitous GUIDs
          7. Render Farm
            1. Conway’s Law, applied
            2. DVD loading
            3. Render pipeline
            4. Fail fast
            5. Scale out
        4. User Response
        5. Conclusion
        6. References
      3. 5. Resource-Oriented Architectures: Being “In the Web”
        1. Introduction
        2. Conventional Web Services
        3. The Web
        4. Resource-Oriented Architectures
        5. Data-Driven Applications
        6. Applied Resource-Oriented Architecture
        7. Conclusion
      4. 6. Data Grows Up: The Architecture of the Facebook Platform
        1. Introduction
          1. Some Application Core Data
          2. Some Facebook Core Data
          3. Facebook’s Application Platform
        2. Creating a Social Web Service
          1. Data: Creating an XML Web Service
          2. A Simple Web Service Authentication Handshake
        3. Creating a Social Data Query Service
          1. Method Call Batching
          2. FQL
            1. Architecture of FQL
        4. Creating a Social Web Portal: FBML
          1. Applications on Facebook: Directly Rendering HTML, CSS, and JS
          2. Applications on Facebook: iframes
          3. Applications on Facebook: FBML As Data-Driven Execution Markup
            1. Direct HTML tags
            2. Data-display tags
            3. Data-execution tags
            4. Design-only tags
            5. Replacement HTML tags
            6. “Functionality package” tags
            7. FBML: A small example
          4. FBML Architecture
            1. Implementing direct HTML tags in FBML
            2. Implementing data-display tags in FBML
            3. Data-execution tags in FBML
            4. Putting it all together
        5. Supporting Functionality for the System
          1. Platform Cookies
          2. FBJS
          3. Service Improvement Summary
        6. Summation
    6. III. Systems Architecture
      1. 7. Xen and the Beauty of Virtualization
        1. Introduction
        2. Xenoservers
        3. The Challenges of Virtualization
        4. Paravirtualization
        5. The Changing Shape of Xen
        6. Changing Hardware, Changing Xen
        7. Lessons Learned
          1. Paravirtualization
          2. Open Source Development
        8. Further Reading
      2. 8. Guardian: A Fault-Tolerant Operating System Environment
        1. Tandem/16: Some Day All Computers Will Be Built Like This
        2. Hardware
          1. Diagnosis
          2. Repair
        3. Mechanical Layout
        4. Processor Architecture
          1. Memory Addressing
          2. Procedure Calls
          3. Action of the PCAL and SCAL Instructions
        5. The Interprocessor Bus
        6. Input/Output
        7. Process Structure
          1. Process Pairs
        8. Message System
          1. Process Pairs, Revisited
          2. Synchronization
          3. Networking: EXPAND and FOX
            1. System names
            2. FOX
        9. File System
          1. File Naming
          2. Asynchronous I/O
          3. Interprocess Communication
          4. System Messages
          5. Device I/O
          6. Security
          7. File Access Security
        10. Folklore
        11. The Downside
          1. Performance
          2. Hardware Limitations
          3. Missed Opportunities
          4. Split Brain
        12. Posterity
        13. Further Reading
      3. 9. JPC: An x86 PC Emulator in Pure Java
        1. Introduction
        2. Proof of Concept
          1. Potential Processor Performance Tests
        3. The PC Architecture
        4. Java Performance Tips
        5. Four in Four: It Just Won’t Go
        6. The Perils of Protected Mode
        7. Fighting A Losing Battle
          1. Microcoding: Less Is More or More Is Less
        8. Hijacking the JVM
          1. Compiling: How to Reinvent the Wheel
            1. Simple code generation
            2. Handling exceptions
            3. Bytecode manipulation
          2. Class Loading and Unloading, but on a Big Scale
            1. Codeblock replacement
        9. Ultimate Flexibility
          1. Flexible Data Anywhere
          2. Flexible Auditing and Support
          3. Flexible Computing Anywhere
        10. Ultimate Security
        11. It Feels Better the Second Time Around
      4. 10. The Strength of Metacircular Virtual Machines: Jikes RVM
        1. Background
        2. Myths Surrounding Runtime Environments
          1. As Runtime Compilers Must Be Fast, They Must Be Simple
          2. Unlimited Analysis in a Static Compiler Must Mean Better Performance
          3. Runtime Analysis Uses a Lot of Resources
          4. Dynamic Class Loading Inhibits Performance
          5. Garbage Collection Is Slower Than Explicit Memory Management
          6. Summary
        3. A Brief History of Jikes RVM
        4. Bootstrapping a Self-Hosting Runtime
          1. Object Layout
          2. Runtime Memory Layout
          3. Compiling the Primordials and Filling in the JTOC
          4. The Boot Image Runner and VM.boot
        5. Runtime Components
          1. Basic Execution Model
          2. Adaptive Optimization System
          3. Optimizing Compilation
            1. HIR
            2. LIR
            3. MIR
            4. Factored control flow graph
            5. Scalar and extended array SSA forms
            6. Partial evaluation
            7. On-stack replacement
            8. Summary
          4. Exception Model
          5. Magic, Annotations, and Making Things Go Smoothly
          6. Thread Model
          7. Native Interface
          8. Class Loaders and Reflection
          9. Garbage Collection
            1. Jikes RVM integration
            2. Summary
        6. Lessons Learned
        7. References
    7. IV. End-User Application Architectures
      1. 11. GNU Emacs: Creeping Featurism Is a Strength
        1. Emacs in Use
        2. Emacs’s Architecture
          1. The Model: Buffers
          2. The View: Emacs’s Redisplay Engine
          3. The Controller: Emacs Lisp
        3. Creeping Featurism
          1. Creeping Featurism and User Interface Complexity
            1. How complex is the Model?
            2. How complex is the command set?
          2. Creeping Featurism and Maintainability
        4. Two Other Architectures
          1. Eclipse
          2. Firefox
      2. 12. When the Bazaar Sets Out to Build Cathedrals
        1. Introduction
        2. History and Structure of the KDE Project
        3. Akonadi
          1. Background
          2. The Evolution of Akonadi
          3. The Akonadi Architecture
          4. The First Release and Beyond
        4. ThreadWeaver
          1. Introduction to ThreadWeaver: Or, How Complicated Can It Be to Load a File?
          2. Core Concepts and Features
          3. Declarative Concurrency: A Thumbnail Viewer Example
          4. From Concurrency to Scheduling: How to Implement Expected Behavior Systematically
          5. A Crazy Idea
    8. V. Languages and Architecture
      1. 13. Software Architecture: Object-Oriented Versus Functional
        1. Overview
        2. The Functional Examples
        3. Assessing the Modularity of Functional Solutions
          1. Extendibility Criteria
          2. Assessing the Functional Approach
          3. Levels of Modularity
          4. The Functional Advantage
          5. State Intervention
        4. An Object-Oriented View
          1. Combinators Are Good, Types Are Better
          2. Using Software Contracts and Genericity
          3. The Modularization Policy
          4. Inheritance
          5. Polymorphism, Polymorphic Containers, and Dynamic Binding
          6. Deferred Classes and Features
        5. Assessing and Improving OO Modularity
          1. Reusing Operations
          2. Extendibility: Adding Types
          3. Extendibility: Adding Operations
        6. Agents: Wrapping Operations into Objects
          1. The Agent Mechanism
          2. Scope of Agents
          3. An Agent-Based Library to Make the Visitor Pattern Unnecessary
          4. Assessment
        7. Acknowledgments
        8. References
      2. 14. Rereading the Classics
        1. Everything Is an Object
        2. Types Are Defined Implicitly
        3. Problems
        4. Brick and Mortar Architecture
        5. References
    9. A. Afterword
    10. B. Contributors
    11. Index
    12. About the Authors
    13. Colophon
    14. SPECIAL OFFER: Upgrade this ebook with O’Reilly

Product information

  • Title: Beautiful Architecture
  • Author(s): Diomidis Spinellis, Georgios Gousios
  • Release date: January 2009
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596554392