20 May 2005 Software Architecture in an Open Source World

Roy T. Fielding, Ph.D.

Chief Scientist, Day Software Co-founder, The Apache Software Foundation Member, W3C Technical Architecture Group Member, OpenSolaris Community Advisory Board http://roy.gbiv.com/

2005 International Conference on Software Engineering www.day.com 20 May 2005 2 Disclaimers

ƒ There is no single “Open Source” model ƒ Projects range in scope from the miniscule ƒ thousands of code dumps on SourceForge ƒ student projects and system dissertations ƒ failed commercial ventures ƒ to the truly international ƒ hundreds of developers ƒ collaborating, directly or indirectly ƒ on a common platform ƒ I’ll focus on a subset of “Software Architecture” ƒ Run-time architecture, not software structure ƒ Realized architecture, not architectural descriptions ƒ Principled design for desired properties

2005 International Conference on Software Engineering www.day.com 20 May 2005 3 Example open source projects

ƒ World Wide Web ƒ URI schemes, HTTP methods, media types ƒ Linux ƒ kernel modules ƒ Apache httpd ƒ feature modules, modular process models, I/O filters ƒ Mozilla Firefox ƒ extensions, themes, XUL, CSS ƒ ƒ an architecture of plug-ins

2005 International Conference on Software Engineering www.day.com 20 May 2005 4 World Wide Web Perspectives

2005 International Conference on Software Engineering www.day.com 20 May 2005 5 Web Protocol Extensibility

Uniform Resource Identifiers •schemes • hierarchical delegation HTTP •versions •methods • header fields Media types •HTML •XML

2005 International Conference on Software Engineering www.day.com 20 May 2005 6 Linux Kernel Modules

Modules • simplify core • enable independent development • promote experiments

Project improves • reduced friction • anarchic growth • more features

• less communication [diagram from Ivan T. Bowman, 1998]

2005 International Conference on Software Engineering www.day.com 20 May 2005 7 Apache httpd

ƒ Started with NCSA httpd 1.3 ƒ Simple, easy to compile on many legacy platforms ƒ Limited extensibility via CGI ƒ Improved security, features, and performance ƒ Virtual hosts ƒ Pre-forking (adaptive hunt-group) model ƒ 0.8: re-architected for extensibility (Shambhala) ƒ Modular API for features (hook and ladder design) ƒ Pools for memory allocation (robustness) ƒ 2.0: architecture enhanced for more extensibility ƒ Modular Process Model (pre-fork, multithreaded, win32, …) ƒ I/O filters and protocol modules

2005 International Conference on Software Engineering www.day.com 20 May 2005 8 Apache httpd: modules

Modules • simplify core • enable independent development • promote experiments

Project improves • reduced friction • anarchic growth • more features • less communication [Apache Modeling Project, f-m-c.org]

2005 International Conference on Software Engineering www.day.com 20 May 2005 9 Apache httpd: kernel

[Apache Modeling Project, f-m-c.org]

2005 International Conference on Software Engineering www.day.com 20 May 2005 10 Apache httpd: preforking MPM

[f-m-c.org]

2005 International Conference on Software Engineering www.day.com 20 May 2005 11 Apache httpd: worker MPM

[f-m-c.org]

2005 International Conference on Software Engineering www.day.com 20 May 2005 12 Apache httpd: winnt MPM

[f-m-c.org]

2005 International Conference on Software Engineering www.day.com 20 May 2005 13 Apache httpd: I/O filters

Filters provide more extensibility • protocol replacement • httpd, ftpd, nntpd, … • stackable content manipulation • extensions that can extend other extensions

[Apache Modeling Project, f-m-c.org]

2005 International Conference on Software Engineering www.day.com 20 May 2005 14 Mozilla Firefox

Multiplatform

Standards Compliant

Lightweight

Community Supported

2005 International Conference on Software Engineering www.day.com 20 May 2005 15 Firefox: User-friendly

Tabbed Browsing

Integrated Search

Live Bookmarks

RSS/XML Feeds

UI Themes

2005 International Conference on Software Engineering www.day.com 20 May 2005 16 Firefox: Developer-friendly

Open Source

Extensible Architecture

Plug-in Tools

Layered CSS

Editor Platform

2005 International Conference on Software Engineering www.day.com 20 May 2005 17 Eclipse Platform

Taking modular extensibility to the next level

[Birsan, ACM Queue, Mar 2005]

2005 International Conference on Software Engineering www.day.com 20 May 2005 18 Eclipse Platform

2005 International Conference on Software Engineering www.day.com 20 May 2005 19 Eclipse Platform

2005 International Conference on Software Engineering www.day.com 20 May 2005 20 Eclipse Platform

2005 International Conference on Software Engineering www.day.com 20 May 2005 21 An open source world

ƒ Most proprietary software projects depend on at least one open source component ƒ Internet (bind, httpd, browsers) ƒ XML (Xerces, Xalan, Saxon) ƒ Scripting (Bash, , Python, Ruby, TCL, Rhino) ƒ Security (GPG, OpenSSL, MD5, SHA*)

ƒ And those dependencies are growing ƒ (embedded ) ƒ (content repository API) ƒ (J2EE) ƒ (JVM) ƒ Sun OpenSolaris

2005 International Conference on Software Engineering www.day.com 20 May 2005 22 Why is this important?

ƒ Because innovation doesn’t just “happen” ƒ Innovation requires leadership ƒ Innovation occurs in spurts ƒ Innovation depends on deployment ƒ Innovation is aided by extensible architectures ƒ Because open source is taking the lead ƒ Open source encourages collaboration ƒ Collaboration is simplified through extensibility ƒ Extensibility allows us to stand on the shoulders of giants ƒ Because it makes Software Research easier! ƒ Shared platforms reduce the overhead of systems work

2005 International Conference on Software Engineering www.day.com 20 May 2005 23 Architecture of Participation

ƒ What is common to the largest and most successful open source projects? ƒ a software architecture ƒ designed to promote anarchic collaboration ƒ through extensions ƒ while preserving control over the core interfaces ƒ Collaborative open source development ƒ emphasizes community ƒ takes advantage of the scalability obtainable through Internet-based virtual organizations ƒ adapts to the volunteer nature of developers ƒ Architecture by design (not a natural byproduct)

2005 International Conference on Software Engineering www.day.com