<ul><li>How Software Components Grew Up and Conquered the World </li></ul><ul><li>Butler Lampson </li></ul><ul><li>For man...
How Software Components Grew Up and Conquered the World Butler Lampson Microsoft April 30, 2001
The software crisis <ul><li>It’s always with us. Why? </li></ul><ul><ul><li>Moore’s law means always trying new things </l...
Progress? <ul><li>Programming from scratch </li></ul><ul><li>Modifying existing code </li></ul><ul><li>Building on big com...
The component dream <ul><li>A library of tested, documented components. </li></ul><ul><ul><ul><li>McIlroy, NATO Software E...
Why components don’t work <ul><li>No business model </li></ul><ul><li>Cost to understand and use </li></ul><ul><li>Conflic...
<ul><li>A  reusable component costs at least 3x  as much as  a good module for your system.  </li></ul><ul><ul><li>General...
Cost to understand <ul><li>To use a component, must understand its behavior </li></ul><ul><ul><li>Resource consumption  </...
Conflicting world views <ul><li>A component interface embodies a view of the world :  </li></ul><ul><ul><ul><li>D ata type...
Components that do work <ul><li>Unix pipes </li></ul><ul><ul><li>Built by Bell Labs Unix group </li></ul></ul><ul><ul><li>...
Components in PC’s <ul><li>PC’s are built from (hardware) components </li></ul><ul><ul><li>Processor chip </li></ul></ul><...
Community makes it easier <ul><li>Includes the  component builder s  and  its  users   </li></ul><ul><ul><li>Research or e...
Good things, but not reusable components <ul><li>COM and Corba </li></ul><ul><ul><li>These are ways to run components </li...
Big components work <ul><li>T hey are so huge that you only use 3 of them.   </li></ul><ul><ul><li>5-20 M lines </li></ul>...
Why big components work <ul><li>You can sell them </li></ul><ul><ul><li>Customer only has to buy a few </li></ul></ul><ul>...
Customization is critical <ul><li>OS’s have applications, scripts </li></ul><ul><li>Browsers have scripts, Java, plug - in...
Burning cycles <ul><li>Is it bad engineering? No. </li></ul><ul><li>Engineer’s job is greatest customer value </li></ul><u...
What else could work? <ul><li>Code manipulation </li></ul><ul><li>Specs with teeth </li></ul><ul><ul><li>Encapsulation </l...
Code manipulation <ul><li>Copy a module and change it </li></ul><ul><ul><li>The most flexible way to customize </li></ul><...
Specs with teeth <ul><li>D ocumentation  with checks that: </li></ul><ul><ul><li>The component matches the documentation <...
Specs with teeth <ul><li>Create/generate vs enforce </li></ul><ul><ul><li>Create: Stubs, transactions, GC </li></ul></ul><...
Specs with teeth — Encapsulation <ul><li>Sandbox </li></ul><ul><ul><li>Operating system, Java, SFI, i nformation flow </li...
Declarative programming <ul><li>Examples </li></ul><ul><ul><li>Spreadsheets </li></ul></ul><ul><ul><li>SQL </li></ul></ul>...
Summary <ul><li>The component dream can’t work </li></ul><ul><li>Big components do work </li></ul><ul><ul><li>Use only 3 <...
Upcoming SlideShare
Loading in …5
×

Butler Lampson's presentation on components

321 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
321
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Butler Lampson's presentation on components

  1. 1. <ul><li>How Software Components Grew Up and Conquered the World </li></ul><ul><li>Butler Lampson </li></ul><ul><li>For many years programmers have dreamed of building systems from a library of reusable software components together with a little new code. The closest we've come is Unix commands connected by pipes. I'll discuss the fundamental reasons why software components of this kind haven't worked in the past and are unlikely to work in the future. Then I'll explain how the dream has come true in spite of this failure, and why most people haven't noticed. </li></ul>
  2. 2. How Software Components Grew Up and Conquered the World Butler Lampson Microsoft April 30, 2001
  3. 3. The software crisis <ul><li>It’s always with us. Why? </li></ul><ul><ul><li>Moore’s law means always trying new things </li></ul></ul><ul><ul><li>Complexity moves into software </li></ul></ul><ul><ul><li>Can’t find the limits except by trial and error </li></ul></ul><ul><ul><ul><li>“A man’s reach should exceed his grasp, or what’s a heaven for.” </li></ul></ul></ul><ul><ul><ul><ul><ul><li>Browning </li></ul></ul></ul></ul></ul><ul><li>Can components make a difference? </li></ul><ul><ul><li>PITAC says yes </li></ul></ul>
  4. 4. Progress? <ul><li>Programming from scratch </li></ul><ul><li>Modifying existing code </li></ul><ul><li>Building on big components </li></ul><ul><ul><li>“White-collar” computing </li></ul></ul><ul><li>High-level programming </li></ul><ul><ul><li>Declarative </li></ul></ul><ul><ul><li>Domain-specific </li></ul></ul><ul><ul><li>Examples: spreadsheets, SQL </li></ul></ul>A little A lot
  5. 5. The component dream <ul><li>A library of tested, documented components. </li></ul><ul><ul><ul><li>McIlroy, NATO Software Engineering Conference, 1968 </li></ul></ul></ul><ul><li>To build your system, you take down a couple of dozen components and glue them together . </li></ul>Component Library
  6. 6. Why components don’t work <ul><li>No business model </li></ul><ul><li>Cost to understand and use </li></ul><ul><li>Conflicting world views </li></ul>Business model Cost to understand World views
  7. 7. <ul><li>A reusable component costs at least 3x as much as a good module for your system. </li></ul><ul><ul><li>Generality </li></ul></ul><ul><ul><li>Simplicity </li></ul></ul><ul><ul><li>Customization </li></ul></ul><ul><ul><li>Testing </li></ul></ul><ul><ul><li>Documentation </li></ul></ul><ul><ul><li>Stability </li></ul></ul><ul><li>Who will pay? </li></ul><ul><ul><li>The market won’t support this kind of development </li></ul></ul>No business model Business model Cost to understand World views Just code it Good module for your system Reusable component ½ – 2 x 3 – 5 x
  8. 8. Cost to understand <ul><li>To use a component, must understand its behavior </li></ul><ul><ul><li>Resource consumption </li></ul></ul><ul><ul><li>Exceptions </li></ul></ul><ul><ul><li>Customization </li></ul></ul><ul><ul><li>Bugs </li></ul></ul><ul><ul><li>Workarounds when it doesn’t do what you want </li></ul></ul><ul><li>One measure: ratio of spec size to code size </li></ul><ul><li>The alternative: re-implement it yourself </li></ul>Business model Cost to understand World views
  9. 9. Conflicting world views <ul><li>A component interface embodies a view of the world : </li></ul><ul><ul><ul><li>D ata types </li></ul></ul></ul><ul><ul><ul><li>R esource consumption </li></ul></ul></ul><ul><ul><ul><li>Memory allocation </li></ul></ul></ul><ul><ul><ul><li>E xception handling </li></ul></ul></ul><ul><ul><ul><li>… </li></ul></ul></ul><ul><li>When you put 10 world views together, the result is a mess . </li></ul><ul><ul><li>No one is responsible for design integrity, or for the whole thing working </li></ul></ul><ul><li>Interactions are N 2 ( N log N if you’re lucky) </li></ul>Business model Cost to understand World views
  10. 10. Components that do work <ul><li>Unix pipes </li></ul><ul><ul><li>Built by Bell Labs Unix group </li></ul></ul><ul><ul><li>Very simple interface: char stream </li></ul></ul><ul><ul><li>Unencoded: just words and lines </li></ul></ul><ul><li>Libraries (math and graphics) </li></ul><ul><ul><li>Take a long time to perfect </li></ul></ul><ul><ul><li>Clean mathematical model </li></ul></ul><ul><ul><li>World view inherited from math, and library usually done by a single group </li></ul></ul><ul><li>Lesson: It works in simple, narrow domains </li></ul>Business model Cost to understand World views
  11. 11. Components in PC’s <ul><li>PC’s are built from (hardware) components </li></ul><ul><ul><li>Processor chip </li></ul></ul><ul><ul><li>DRAM SIMM </li></ul></ul><ul><ul><li>Disk + driver </li></ul></ul><ul><ul><li>Display monitor + driver </li></ul></ul><ul><ul><li>. . . + driver </li></ul></ul><ul><li>Why does it work? </li></ul><ul><ul><li>Only a few components work well </li></ul></ul><ul><ul><ul><li>These have very clear interfaces </li></ul></ul></ul><ul><ul><ul><li>Odd-ball ones have lots of problems </li></ul></ul></ul><ul><ul><li>Microsoft is responsible for integrity </li></ul></ul>Business model Cost to understand World views
  12. 12. Community makes it easier <ul><li>Includes the component builder s and its users </li></ul><ul><ul><li>Research or engineering community </li></ul></ul><ul><li>People work for status in the community </li></ul><ul><li>Shared context that everyone understands </li></ul><ul><li>Common world view </li></ul>Business model Cost to understand World views
  13. 13. Good things, but not reusable components <ul><li>COM and Corba </li></ul><ul><ul><li>These are ways to run components </li></ul></ul><ul><li>Visual Basic components and ActiveX. </li></ul><ul><ul><li>You can use a couple, but not more </li></ul></ul><ul><li>Modules with clean i nterfaces </li></ul><ul><ul><li>These are necessary, but not sufficient </li></ul></ul>
  14. 14. Big components work <ul><li>T hey are so huge that you only use 3 of them. </li></ul><ul><ul><li>5-20 M lines </li></ul></ul><ul><ul><li>Operating system: Linux, Windows </li></ul></ul><ul><ul><li>RAD environment: Visual Basic, Java </li></ul></ul><ul><ul><li>Browser: Netscape, Internet Explorer </li></ul></ul><ul><ul><li>Database: Oracle, DB2, SQL Server </li></ul></ul>Netscape Visual Basic Oracle User Interface Business logic Database
  15. 15. Why big components work <ul><li>You can sell them </li></ul><ul><ul><li>Customer only has to buy a few </li></ul></ul><ul><li>The spec is much smaller than the code </li></ul><ul><ul><li>and you can customize them </li></ul></ul><ul><li>They impose their own world view </li></ul><ul><ul><li>Vendor provides design integrity inside </li></ul></ul><ul><ul><li>Only N ( N - 1)/2 = 3 interactions — 2 if layered </li></ul></ul><ul><li>Moore’s law –cycles and storage to burn </li></ul>Business model Cost to understand World view
  16. 16. Customization is critical <ul><li>OS’s have applications, scripts </li></ul><ul><li>Browsers have scripts, Java, plug - ins, DHTML </li></ul><ul><li>RDBs have SQL </li></ul>Netscape Visual Basic Oracle User Interface Business logic Database
  17. 17. Burning cycles <ul><li>Is it bad engineering? No. </li></ul><ul><li>Engineer’s job is greatest customer value </li></ul><ul><ul><li>Time to market </li></ul></ul><ul><ul><li>Flexibility </li></ul></ul><ul><ul><li>Total cost of ownership </li></ul></ul><ul><li>Today’s PC = 10,000 x Alto. Where did it go? </li></ul><ul><ul><li>Deliver lots of features quickly </li></ul></ul><ul><ul><ul><li>Can’t have first-class design everywhere </li></ul></ul></ul><ul><ul><ul><li>Trade resources for time to market </li></ul></ul></ul><ul><ul><li>Integration </li></ul></ul><ul><ul><li>Support lots of hardware </li></ul></ul><ul><ul><li>Backward compatibility </li></ul></ul>
  18. 18. What else could work? <ul><li>Code manipulation </li></ul><ul><li>Specs with teeth </li></ul><ul><ul><li>Encapsulation </li></ul></ul><ul><li>Declarative programming </li></ul>
  19. 19. Code manipulation <ul><li>Copy a module and change it </li></ul><ul><ul><li>The most flexible way to customize </li></ul></ul><ul><li>Tools to support this </li></ul><ul><ul><li>Specs help in understanding the code </li></ul></ul><ul><ul><li>Checks (types, assertions, …) catch mistakes </li></ul></ul><ul><ul><li>Analyzers reveal structure </li></ul></ul><ul><li>The true destiny of open source? </li></ul>
  20. 20. Specs with teeth <ul><li>D ocumentation with checks that: </li></ul><ul><ul><li>The component matches the documentation </li></ul></ul><ul><ul><li>The use is legal </li></ul></ul><ul><li>C hecking ensures correct documentation </li></ul><ul><ul><li>More likely to pass the coffee stain test </li></ul></ul><ul><li>P rototype : type checking </li></ul>
  21. 21. Specs with teeth <ul><li>Create/generate vs enforce </li></ul><ul><ul><li>Create: Stubs, transactions, GC </li></ul></ul><ul><ul><li>Enforce: Sandbox, Purify, types </li></ul></ul><ul><li>Static vs dynamic check </li></ul><ul><ul><li>Static: Types, PCC </li></ul></ul><ul><ul><ul><li>No dynamic error can occur </li></ul></ul></ul><ul><ul><ul><li>There’s no debugger in Peoria. Morris </li></ul></ul></ul><ul><ul><ul><li>Well-typed programs don’t go wrong. Milner </li></ul></ul></ul><ul><ul><li>Dynamic: Sandbox, XML </li></ul></ul>
  22. 22. Specs with teeth — Encapsulation <ul><li>Sandbox </li></ul><ul><ul><li>Operating system, Java, SFI, i nformation flow </li></ul></ul><ul><li>Code modification </li></ul><ul><ul><li>S FI, Eraser, Purify </li></ul></ul><ul><li>Transactions </li></ul><ul><ul><li>Automatic concurrency, fault tolerance, resource management </li></ul></ul><ul><li>Replicated state machines </li></ul><ul><ul><li>Automatic fault tolerance </li></ul></ul>
  23. 23. Declarative programming <ul><li>Examples </li></ul><ul><ul><li>Spreadsheets </li></ul></ul><ul><ul><li>SQL </li></ul></ul><ul><ul><li>Mathematica </li></ul></ul><ul><ul><li>YACC </li></ul></ul><ul><li>Advantages </li></ul><ul><ul><li>Closer to intent, hence faster and more reliable </li></ul></ul><ul><ul><li>More analysis and optimization—parallel SQL </li></ul></ul><ul><li>High-level programming? </li></ul>
  24. 24. Summary <ul><li>The component dream can’t work </li></ul><ul><li>Big components do work </li></ul><ul><ul><li>Use only 3 </li></ul></ul><ul><ul><li>Customize </li></ul></ul><ul><li>What else? </li></ul><ul><ul><li>Encapsulate </li></ul></ul><ul><ul><li>Declare </li></ul></ul>Business model Cost to understand World views

×