why telecom software reuse has failed and how to …schmidt/pdf/keynote.pdf · 2005-08-27 · why...
TRANSCRIPT
Why Telecom Software Reuse Has Failedand How to Make It Work for You
Douglas C. Schmidt
Associate Professor & Computer Science Dept.Director of the Center for Washington University, St. LouisDistributed Object computing www.cs.wustl.edu/�schmidt/
SponsorsNSF, DARPA, Bellcore/Telcordia, BBN, Boeing, CDI/GDIS, Hughes,Kodak, Lockheed, Lucent, Microsoft, Motorola, Nokia, Nortel, OTI,SAIC, Siemens SCR, Siemens MED, Siemens ZT, Sprint, USENIX
April 22nd, 1999
Douglas C. Schmidt Making Software Reuse Work
Motivation: the Communication Software Crisis
WIDE AREANETWORK
SATELLITESTRACKINGSTATIONPEERS
STATUS INFO
COMMANDS BULK DATA
TRANSFER
LOCAL AREA NETWORK
GROUNDSTATIONPEERS
GATEWAY� Symptoms
– Hardware gets smaller,faster, cheaper
– Software gets larger,slower, more expensive
� Culprits
– Inherent and accidentalcomplexity
� Solutions
– Frameworks, components,patterns, and architecture
Washington University, St. Louis 1
Douglas C. Schmidt Making Software Reuse Work
Techniques for Improving CommunicationSoftware Quality, Reuse, and Productivity
Washington University, St. Louis 2
Douglas C. Schmidt Making Software Reuse Work
NETWORKING
DATABASE
GUI
EVENT
LOOP
APPLICATION-SPECIFIC
FUNCTIONALITY
EVENT
LOOP
EVENT
LOOP
CALL
BACKSINVOKES
(A) CLASS LIBRARY ARCHITECTURE
(B) FRAMEWORK ARCHITECTURE
DATABASE
CLASSES
NETWORK
IPCCLASSES
MATH
CLASSES
ADTCLASSES
GUICLASSES
APPLICATION-SPECIFIC
FUNCTIONALITY
EVENT
LOOP
GLUE
CODE
LOCAL
INVOCATIONS
ADTCLASSES
MATH
CLASSES
Proven solutions !
� Components– Self-contained, “pluggable”
ADTs
� Frameworks– Reusable, “semi-complete”
applications
� Patterns– Problem/solution/context
� Architecture– Families of related patterns
and components
Washington University, St. Louis 3
Douglas C. Schmidt Making Software Reuse Work
When Reality Sets In...
Components
� “Artifacts everyonewants to use, but veryfew are willing/able tobuild or afford”
Patterns
� “An excuse to be vague”
Frameworks
� “Tangled webs of componentsthat give up all pretense ofmodularity or separation ofconcerns”
Architecture
� “Those who can no longerdevelop become architects... ;-)”
Bottom-line : systematic reuse is hard...
Washington University, St. Louis 4
Douglas C. Schmidt Making Software Reuse Work
Why Systematic Software Reuse has (Largely) Failed
HHOOSSTT IINNFFRRAASSTTRRUUCCTTUURREE MMIIDDDDLLEEWWAARREE
DDIISSTTRRIIBBUUTTIIOONN MMIIDDDDLLEEWWAARREE
CCOOMMMMOONN MMIIDDDDLLEEWWAARREE SSEERRVVIICCEESS
AAPPPPLLIICCAATTIIOONNSS
HHAARRDDWWAARREE DDEEVVIICCEESS
WWTTSSHHUUDD
NNaavv
AAVVIIOONNIICCSSRREEPPLLIICCAATTIIOONN
SSEERRVVIICCEEDDOOMMAAIINN--SSPPEECCIIFFIICC MMIIDDDDLLEEWWAARREE SSEERRVVIICCEESS
OOPPEERRAATTIINNGG SSYYSSTTEEMMSS && PPRROOTTOOCCOOLLSS
EEVVEENNTTCCHHAANNNNEELL
CCoonnssCCoonnss
CCoonnss
� Improper software process
– Reuse techniques are oftendecoupled from reality...
– Poor “expectationmanagement”
� Lack of organizational support
– e.g., no economic incentives
� Lack of technical expertise
– e.g., limited knowledge ofpatterns and design principles
Washington University, St. Louis 5
Douglas C. Schmidt Making Software Reuse Work
Why We Need Reusable Communication Middleware
� System call-level programming is wrong abstraction for applicationdevelopers, e.g.,
– Too low-level ! error codes, endless reinvention– Error-prone ! HANDLEs lack type-safety, thread cancellation– Mechanisms do not scale ! Win32 TLS– Steep learning curve ! Win32 Named Pipes– Non-portable ! sockets and threads– Inefficient ! i.e., tedious for humans
� GUI frameworks are inadequate for communication software, e.g.,
– Inefficient ! excessive use of virtual methods– Lack of features ! minimal threading and synchronization
mechanisms, no network services
Washington University, St. Louis 6
Douglas C. Schmidt Making Software Reuse Work
The ADAPTIVE Communication Environment (ACE)
PROCESSES/THREADS
DYNAMIC
LINKING
SHARED
MEMORYSELECT/IO COMP
FILE SYS
APIS
WIN32 NAMEDPIPES & UNIX
STREAM PIPES
UNIX
FIFOS
CAPIS
SOCKETS/TLI
COMMUNICATION
SUBSYSTEM
VIRTUAL MEMORY & FILE
SUBSYSTEM
GENERAL OPERATING SYSTEM SERVICES
PROCESS/THREAD
SUBSYSTEM
FRAMEWORK
LAYER
ACCEPTOR CONNECTOR
NETWORKED
SERVICE
COMPONENTS
LAYER
NAME
SERVER
TOKEN
SERVER
LOGGING
SERVER
GATEWAY
SERVER
SOCK SAP/TLI SAP
FIFO
SAP
LOG
MSG
SERVICE
HANDLER
TIME
SERVER
C++WRAPPER
FACADE
LAYER SPIPE
SAP
CORBA
HANDLER
FILE
SAP
SHARED
MALLOC
THE ACE ORB
(TAO)
JAWS ADAPTIVE
WEB SERVERSTANDARDS-BASED MIDDLEWARE
REACTOR/PROACTOR
PROCESS/THREAD
MANAGERS
STREAMS
SERVICE
CONFIG-URATOR
SYNCH
WRAPPERS
MEM
MAP
OS ADAPTATION LAYER
www.cs.wustl.edu/�schmidt/ACE.html
ACE Overview !
� A concurrentOO networkingframework
� Available inC++ and Java
� Ported toPOSIX, Win32,and RTOSs
Related work !
� x-Kernel
� SysVSTREAMS
Washington University, St. Louis 7
Douglas C. Schmidt Making Software Reuse Work
The ACE ORB (TAO)
NETWORK
ORB RUN-TIMESCHEDULER
operation()
IDLSTUBS
IDLSKELETON
in args
out args + returnvalue
CLIENT
OS KERNEL
HIGH-SPEEDNETWORK INTERFACE
REAL-TIME I/OSUBSYSTEM
OBJECT(SERVANT)
OS KERNEL
HIGH-SPEEDNETWORK INTERFACE
REAL-TIME I/OSUBSYSTEM
ACECOMPONENTS
OBJREF
REAL-TIME ORB COREIOP
PLUGGABLEORB & XPORTPROTOCOLS
IOPPLUGGABLE
ORB & XPORTPROTOCOLS
REAL-TIMEOBJECT
ADAPTER
www.cs.wustl.edu/�schmidt/TAO.html
TAO Overview !
� An open-source,standards-based,real-time,high-performanceCORBA ORB
� Runs on POSIX,Win32, &embedded RTplatforms– e.g., VxWorks,
Chorus,LynxOS
� Leverages ACE
Washington University, St. Louis 8
Douglas C. Schmidt Making Software Reuse Work
ACE and TAO Statistics
� Over 30 person-years of effort
– ACE > 185,000 LOC– TAO > 100,000 LOC– TAO IDL compiler > 100,000 LOC– TAO CORBA Object Services >
150,000 LOC
� Ported to UNIX, Win32, MVS, andRTOS platforms
� Large user community
– www.cs.wustl.edu/�schmidt/ACE-users.html
� Currently used by dozensof companies
– Bellcore, Boeing,Ericsson, Kodak,Lockheed, Lucent,Motorola, Nokia, Nortel,Raytheon, SAIC,Siemens, etc.
� Supported commercially
– ACE !
www.riverace.com– TAO !
www.ociweb.com
Washington University, St. Louis 9
Douglas C. Schmidt Making Software Reuse Work
Patterns for Communication Middleware
EventPatterns
ConcurrencyPatterns
ExternalPolymorphism
WrapperFacade
Connector
ThreadPool
Thread-perSession
Thread-perRequest
AsynchronousCompletion
Token
ThreadSpecificStorage
ActiveObject
Half-Sync/Half-Async
Leader/Followers
ComponentConfigurator
Object LifetimeManager
Reactor
Proactor
DoubleCheckedLocking
Thread-Safe
Interface
ScopedLocking
StrategizedLocking
InitializationPatterns
SynchronizationPatterns
AcceptorObservation !
� Project failures rarelyresult from unknownscientific principles, butfrom failing to applyproven engineeringpractices and patterns
Benefits of Patterns !
� Facilitate design reuse
� Preserve crucial designinformation
� Guide design choices
Washington University, St. Louis 10
Douglas C. Schmidt Making Software Reuse Work
The Active Object Pattern
Proxy
Future m1()Future m2()Future m3()
HIDDENFROM
CLIENTS
VISIBLETO
CLIENTS
2: enqueue(M1)
ActivationList
enqueue()dequeue()
Servantn
1
loop { m = act_list.dequeue() if (m.guard()) m.call() else act_list.enqueue (m);}
Schedulerdispatch()enqueue()
m1()m2()m3() 4: m1()
1 1
1: enqueue(new M1)
3: dispatch()
MethodRequestguard()call()
M1
M2
M3
www.cs.wustl.edu/�schmidt/patterns/Act-Obj.ps.gz
Active Object
� Decouples threadof methodinvocation fromthread of methodexecution
� Simplifiessynchronization ofconcurrent objects
Washington University, St. Louis 11
Douglas C. Schmidt Making Software Reuse Work
How to Make Reuse Work for You
� Be patient
– Good components, frameworks,and software architectures taketime to develop
� Reuse-in-the-large works bestwhen:
1. The marketplace is competitive2. The domain is complex3. Skilled middleware developers4. Supportive corporate culture5. “Reuse magnets” exist6. Open source development
models
� The best componentscome from solving realproblems
– Keep feedback loops tightto avoid “runaway” reuseefforts
� Produce reusablecomponents bygeneralizing from workingapplications
– i.e., don’t buildcomponents in isolation
Washington University, St. Louis 12
Douglas C. Schmidt Making Software Reuse Work
The Good News
� Frameworks and components are becoming mainstream
– e.g., GUIs and ADTs
� Less “Not Invented Here” syndrome
– e.g., due to increased complexity and competition
� Developers are more sophisticated
– e.g., OOP/OOD, event loops, templates, applets
� More attention to performance
– e.g., good ORBs are very efficient, predictable, & scalable
� Software architecture is gaining substance
– e.g., patterns and architectural styles
Washington University, St. Louis 13
Douglas C. Schmidt Making Software Reuse Work
The Bad News
� Lack of breadth
– e.g., focus is mostly on a few areas (GUIs)
� Lack of component integration
– e.g., incompatible event loops, name space pollution, poor tools
� Lack of education
– e.g., most universities don’t teach software skills
� Lack of experience and training
– e.g., developers rarely apply reuse principles/patterns to theircode
� Lack of standardized semantics & performance
– e.g., design patterns & optimization principle patterns
Washington University, St. Louis 14
Douglas C. Schmidt Making Software Reuse Work
The Ugly News
� Lack of useful and truly open standards
– e.g., ODP, ISO OSI, CORBA, DCOM, TINA, Java– Often leads to proprietary systems sold under guise of open
systems
� Lack of adequate payoff
– i.e., cost of building components “in-house” can be prohibitive– Leads to cancelled projects
� Lack of effective leadership and management
– e.g., organizations often focus on Process at expense of Product– Leads to the Dilbert Principle
Washington University, St. Louis 15
Douglas C. Schmidt Making Software Reuse Work
Towards a Product-Oriented Software Process
� Develop complex systemsincrementally
– i.e., not sequentially
� Emphasize qualitative reviews
– e.g., use systematicdesign/code inspections
� Reward software developmentskills
– Both generalization andcustomization skills
� Use reverse-engineering tools
– e.g., auto-generatedocumentation
� Invest in continuouseducation and training
– Components and frameworksare only as good as thepeople who build and usethem
Washington University, St. Louis 16
Douglas C. Schmidt Making Software Reuse Work
Traits of Dysfunctional Software Organizations
Process Traits
� Death through quality
– “Process bureaucracy”
� Analysis paralysis
– “Zero-lines of codeseduction”
� Infrastructure churn
– e.g., programming tolow-level APIs
Organizational Traits
� Disrespect for qualitydevelopers
– “Coders vs. developers”
� Top-heavy bureaucracy
Sociological Traits
� The “Not Invented Here”syndrome� Modern method madness
Washington University, St. Louis 17
Douglas C. Schmidt Making Software Reuse Work
Traits of Highly Successful Software Organizations
� Strong leadership inbusiness and technology
– e.g., understand the roleof software technology
– Don’t wait for “silverbullets”
� Clear architectural vision
– e.g., know when to buy vs.build
– Avoid worship of specifictools and technologies
� Effective use ofprototypes and demos
– e.g., reduce risk and getuser feedback
� Commitment to/fromskilled developers
– e.g., know how tomotivate softwaredevelopers and recognizethe value of thoughtware
Washington University, St. Louis 18
Douglas C. Schmidt Making Software Reuse Work
Concluding Remarks
Take-home Points
� Not all problems requirecomplex solutions
� Beware simple(-minded)solutions to complex problems
� Don’t settle for proprietaryopen systems
� Systematic reuse isachievable, though non-trivial
False Prophets
� Languages
� Methodologies
� Process
� Middleware
� Organization-central solutions� Technology-centric solutions
There is no substitute for thinking and hard work !
Washington University, St. Louis 19
Douglas C. Schmidt Making Software Reuse Work
Web URLs for Additional Information
� These slides:www.cs.wustl.edu/ �schmidt/keynote4.ps.gz
� More information on patterns:www.cs.wustl.edu/ �schmidt/patterns.html
� More information on CORBA:www.cs.wustl.edu/ �schmidt/corba.htmlwww.omg.org
� More info on ACE:www.cs.wustl.edu/ �schmidt/ACE.htmlcomp.soft-sys.ace
� More info on TAO:www.cs.wustl.edu/ �schmidt/TAO.html
Washington University, St. Louis 20