KhulnaUniversity Studies3(2): 513
-
519ENGINEERING
&TECHNOLOGY
KhulnaUniversityStudies3(2):513-519BENEFITS OF
USING
COMPONENT-
BASED APPROACH OVER CONVENTIONAL ONE OF DEVELOPING LARGE-
SCALE AND COMPLEX SOFTWARE SYSTEMM
.
K.
Islam*andM.
S.
HossainComputerScience and Engineering Discipline
.
KhulnaUniversity,Khulna-9208,BangladeshKUS-01/27-210801
Manuscript received: August 21,2001;Accepted: April 01,2002
Abstract:The idea of conventional software development has been changing from last few years because of rising demands of various software products within short period of time. Developing software from scratch is the main conceptsofconventionalsoftware development considered timeconsumingand costly methods.Buildingsoftwarefrom existing softwaresystemsusingreusablecomponentsis consideredimportant inreducing developmentcostand time.In thispaper, wehave highlightedon both Component-Based and co conventional softwaredevelopment approachand foundouttheir meritsand demeritsinthecontextofdevelopingreliableand efficient large-scale and complexsoftware products.
Keywords:LRUsim;Large-scale;Component-based SoftwareDeveloment;Object-oriented;LEAPs.
Introduction
Developingreliable and efficient large
-
scale softwaresystems within minimum timeand cost is the main concern of expert softwareprofessionals .
Traditional software development approach, which starts from scratch,isunsuccessful to run with thecurrentsoftwareneeds.
Software productivity is steadily risingover
the past few decades.
However,increasing the number of software professionalshas not kept up with the rising demand fordeveloping new evermore
complex and large software systems and maintainingcurrent software. Component-
Based Software Development has raised the hope of developing more reliable and complex softwaresystemswithin minimumcostandtime.WithComponent-
BasedSoftware Development, software productions will become easier, more less expensive,more reliable, moreefficient, less time to develop and less expensivetomaintain.Current)} :.? rare thatsofrware developed byonedevelopmentgroupis reused by another, and integration opfaaas
are
faredbythepmdnmimmi'vertically integrated" applications paradigm.
AComponent-
Based Softnre Developmentprocess can
help the software industry to use the reusable software components properly In this paper, we have discussed in details both Component-
Based Software Development and Comrational approach and foundouttheirrelativemeritsanddemerits.Component
-
BasedSoftware DevelopmentProcessIn Component
-
Based Software Development, the notion of building a system by writing code has been replaced with building asystem by assembling and integratingexisting softwarecomponents. Incontrast to traditional development, where system integration is often the tail end of an implementation effort, component integrationisthe centerpieceofthe approach;thus, implementation hasgiven way tointegration as the focus of system construction.
Because of this, integrality is a key consideration in the decision whether to acquire,reuse
, or build the components. A
typical Component-
Based Software Development shouldcontain thefollowing steps:•
Identification•
Classification•
Storinginarepository•
Retrieval•
Adaptation•
Composition.
Correspondingauthor:Tel:88
-
041-
721791,720171-
3,Fax:88-
041-
731244;E-
mail: cseku@khulna.bangla.net513
DOI: https://doi.org/10.53808/KUS.2001.3.2.0127-se
ExistingApplications Components
*
L
_
.^
Fig
.
1.
Component-
Based Development.Moredetailing,theyare processed likefig.1andusingthe followingsteps:
•
Partition and extract components from the existing system (using generalization, restructuring and abstraction tools)•
Store thecomponentsinarepository•
Findout components thatcan bereused•
Modify the components tomeetspecificuserrequirements•
Build new components ifnotavailable in the repository•
Make the extracted components, the modifiedcomponents and the new-
builtcomponents theoff-
the-
shelfcomponents
•
Supplythe off-
the-
shelfcomponentsto users,so thatthey can make softwarethat meet their specific requirementsbysimply assemblingthemComparison
Although object
-
orientedtechnologieshavepromoted softwarereuse, thereisa
biggapbetween thewhole systemsandclasses.To fillthegap,many interesting ideashaveemergedinobject-
oriented software reuse for last several years.They include software architecture design patterns and framework (Fayad and Schmidt,1997).
We haveearliermentioned onsuchreusable softwareelements.
Component
-
Based Software Developmenttakesdifferent approaches from the conventional software reuse in the followingmanner.
•
Plug and Play:Component should beableto plugandplay with othercomponentsand/orframeworks sothatcomponentcanbecomposedatrun-
timewithout compilation.
•
Interface-
centric: Component should separate the interface from the implementation and hide the implementation details sothat theycanbecomposed without knowing theirimplementation.•
Architecture-
centric: Components are designed on a pre-
defined architecture so that they can interoperatewithothercomponentsand/or frameworks.•
Standardization: Component interface should be standardizedso that they can be manufactured by multiplevendors and widely reusedacrossthecorporations.•
Distributionthrough Market: Components canbe acquiredand improvedthoughcompetitionmarket, andprovide incentivesto thevendors.The nature of Component
-
Based Software Development suggest that the model of component-
basedsoftwaredevelopmentshouldbe different from the conventionaldevelopment model
.
Table1summarizes major characteristics of conventional software development and component-
based software development, which are briefly discussedin the-
following sections.
Table1.ComparisonofDevelopmentModels.
.
Characteristics Conventional CBSDArchitecture Monolithic Modular
Components Implementationand White
-
Box Interface and Black-
BoxProcess WaterfallandBig
-
bang Evolutionand ConcurrentMethodology Build from scratch Composition
Organization Monolithic Specialized: ComponentVendor,Broker and
Integrator Newapplication
Generic new
Produced
Generic Modified
Architecture
Component
-
Based SoftwareDevelopmentemphasizes modular architecturesothatwecan partially develop asystemand incrementally enhancethefunctions byadding and/or replacing components.Tomakesuch514
Khulna University Studies3(2):513
-
519design possible, we need a sound foundation of
software
systems, that is, software architecture. Most component-
based systemsassume
underlying software architecture such as MFC (Microsoft Foundation Class)andCORBA.
They are provided in the formofframeworks.
Frameworksare workablereference to the underlyingsoftwarearchitecture.
Tobeeffective,framework
can
behierarchical upfromdomain independent to domainspecific. Examples include Andersen Consulting’s Eagle project and IBM’s
San Francisco project (Lazar, 1998).
With standardized and modularsoftware architecture,the CBSDcanavoidadhocandmonolithicdesign.Process
Component
-
BasedSoftware Development makes software development and delivery be evolutional. Sincesome
parts of a system can be acquired from the component vendors and/or be outsource to other organizations,some
partsof software processcan
bedone concurrently.
Architecture of Software Process
To make software reuse happen, software
process
should be reuse-
oriented so that designers canreuse
artifacts at different levels of abstraction along withsoftware
process.
Figure 2 illustrates conventionalwaterfallprocessandan example of Component
-
BasedSoftwareDevelopment process.
Component
-
BasedSoftware Developmentprocess
consists of twoprocesses
;component development and component integration. Since these twoprocesses
can be done by different organizations, these two processes can be oooconenL Unlike conventional process, Component-
Based Software Developmentprocess
needanew
processfor component acquisition.Conventional CBSD
Process Model ProcessModel
Analysis
1
Analysis Component Requirements1
Design ComponentOriented Design
Implement
j
Compom1f
:ntComposition Unit Test
r
IntegratedTest IntegratedTest
SystemTest System Test
Fig
.
2.
Conventional Process and CBSD Process.
Methodology
Methodologies need to deal with both component development and component composition
. Most
of conventional methodologies such as object-
oriented methodologyassume
development from scratch and have not provided much help forreuse -
oriented development.
Furthermore, plug and playsoftware
componentsseparated interface from theimplementation and provideinterface
Component-
BasedSoftware Developmentfocuseson
composition of components through their interface.
Compositionalso requiresto design collaborative behavior of multiple components. So
,Component -
Based Software Development methodologies need to help interface-
centric and behavior-
oriented design such as Catalysis (Souza and Wills,1998)and connection-
oriented programming.
Organization
The separation of component development and component integration created a new role of component rroker. Component broker can selland distribute softwarecomponents
.
Sincecomponentdevelopmentand component integration requires different expertise, it is natural to specialize the organizations intocomponent vendors and component integrators
.
Thisspecialization will requires the mediators betweentwo organizations,that is, componentbrokers.
This organization structurecanbe called vendor-
broker-
integratormodel(Ning,1996)
.
As the software component vendors have been growing,asoftwarecomponent market is emerging.
Since softwarecan bedistributed over the Internet, web-
based software component brokers have emerged(Aoyama et al„1998).Comparison Results Result: 1
Here we take the comparison results of Component
-
Based Software Development versus conventional software reuse using LRUsimproducts.TheObject-
Oriented Programming Systems (OOPS) Group at the University of Texas is investigating issues ofOSmemory management.One of their projects is to analyze the locality ofreferences in memory using real program traces.
Their observation is that randomly generated memory references do not reflect the true usageof memory;the properway toevaluatememory managementschemesistouse realtraces.
LRUsim isahand
-
codedC++ tool thatmaintainstheLRU orderingofpagesusingcontainerdata structures. LRUsim readsatracefileandmaintainsapagereferencequeue;it records the positionof eachpagein the queueat reference time and promotesthat page to the headof thequeue.
If thememory size ism pages, references to positions l..
.m represent page hits; above m are misses (page faults).
The idea naturally extends to memory hierarchies: level 1 has m pages,level 2 has n pages, etc.
LRUsim is an interesting application for Component-
Based Software Development for many reasons.First,performance is critical:LRUsim runtimes
are
measured in hoursordays.
Second,LRUsim's data structuresareC++templates.
They are relatively simple structures(e
.g.,splay trees) that require no sophisticated optimizations.
Not so for LRUsim: the retrieval predicates only specified primary keys.
Thus, there was no need for predicatemanipulation;therewere
no
obvious opportunities for optimization.
Lookingatthis problem from another perspective,LRUsim's datastructureswereimplementedastemplates (i
. e .
compositional components).Forsuch asimple application, the useof transformational generators in CBSD process seemed to be overkill.
Yet, initial results suggested otherwise: our Component-
Based Software Development version of LRUsim ran30% faster than the C++ version. Although LRUsim had undergone extensive tuningby theOOPS group, we discovered a performance bug.
Uponcorrecting the C++version ofLRUsim,benchmarks indicated thattheCBSDversion was stillabout6%faster(see right¬ most columns of Table 2).
Thus, even in situations where few or no optimizations are applied, the performance of thesoftware produced byCBSD wasvery good(i.e.,comparableto programs hand-
coded and tuned byexperts).
Table2. LRUsimExecutionTimes.
TraceFile #of Memory References
LRUsim(CBSD)
run
-
time(sec) (LRUsimC++)run¬time(sec)
Speedup Over C++ Original
LRUsim (C++ corrected) run
-
time(sec)Speedup Over C++
Corrected
Tex 200K 100 130 30% 108 • 8%
Spice 200K 115 153 33% 124 8%
Ghostscript 107M 64K 84.2K 31% 66.3K 4%
Expresso 592M 378K 482K 27% 402K 6%
We learned important lessons from this experiment: synthesized algorithms have a higher probability of performing better(and for thesame reasons are morereliable)than hand
-
coded algorithms.Remember,we arenotusing formal methodstogenerate software,norare
we synthesizing customized algorithms (Smith,1990), but merely gluing pre
-
written algorithms together.
Soourapproach tosoftwaresynthesis is quite simple.
Thereasonforimproved performance is that the authorsof generator componentsfocus theirattention on coding the most efficient implementation of a setof algorithms fora highly constrained problem
.
(In
the case of Component-
Based Software Development, these are algorithms for a particular data structure).
Consequently, much more effort is focussed on optimizing what would otherwise be called "minute"
coding details
.
516
KhulnaUniversityStudies3(2):513
-
519Coding a data structure from scratch that corresponds to a composition of components typically requires fartoomanydetailstokeepstraightandtooptimize
.
It isimpracticaland tootime consuming for programmers tooptimizecode at thesame level of detail.
Programmershave finite time and energy,and attempt only a fraction of these optimizations.
For this reason, the synthetic algorithms manufactured by CBSDwilloftenoutperformtheirhand-
written counterparts.
Stated another way,components generate locallyoptimalcode
.
Composing locally optimal code fragments doesn't guaranteeglobal optimality.
So it is always possible to handcraft code that will out perform that which is produced by agenerator. But the issue is "At what cost?
".
Just as it is possible for humans to outperform optimizing compilers by hand-
coding assembly statements, it is generally not considered practical;the qualityofcompileroutput isgood enough compared to the productivity advantages gainedin programming in higher-
level languages.
Sotooitseems
forusinggenerators.Componentsrepresent repositories for"bestpractice"approachesforbuilding software:theycanencapsulate coding tricks and proven
-
effective approaches for implementing their "feature" inan
efficient way.
Overtime,additional effort
is
putinto components sothat the code thatthey produceimproves even further,so
that itis better(on
average)thananythingindividualsoreven
groupsofprogrammers
can produce. Thus, composing locally optimal componentsproduces verygoodsoftware.
Itisinteresting to note that therewere productivity improvementsinbuildingLRUsim with CBSD
.
The C++ versionof LRUsim is 6600 lines; theComponent-
Based Software Development version is about 2500 lines.
The largestCBSDfunction has52linesofcode;CBSDexpands thisto 1300 lines.Once again,by raising the levelof abstraction,thecomplexity ofan application is substantially reduced. In ourexitsurveyswith the OOPS group, they believe that theability to compactly write complicated codeisCBSD's major benefit
.
Itenabledrevisionsandrestructuringthat they believed would be difficultorimpossible toperformby hand
.
Result: 2
In
this result. We use
another popular products LEAPS.
LEAPS is a production system compiler that producesthefastest executables of OPS5rulesets.
LEAPStranslatesan
OPS5rule set—
aset of rules with actions to beperformedwhen a rule is fired—
intoa
C program.
When theC programexecutes,it fires these rules ataratewhich canbean
order of magnitudeor
more fasterthanOPS5interpreters.
LEAPS is aninterestingapplicationbecause the Cprogramsthat it generates relies
on
unusualcontainerdata structures andsearchalgorithms thatare unlikelytobefoundinanygeneric data structure library. LEAPSis alsoa
performance-
driven application;it was hand-
tuned and hand-
coded by experts.
Finally, it was well known that theLEAPS algorithms were difficulttounderstand.
Our CBSDversionof LEAPS,called RL, performed much better than wehad imagined. Wehada 4
-
fold reductionin code volume:LEAPS is 20Klines of code;RL wasabout5K.
CBSD(which itself is 50K
lines ofcode) provided uswithtremendousleverage.
In fact,our productivity in buildingRL was at the rate atwhich
experts in the domain could code,
yet we certainlywere
novices: wehadneverdealt with rule systems priortoRL.
Whenwe benchmarkedthe Cfilesproduced byLEAPSand RL,we foundthat,on average,the RL-
producedfilesexecutedabout50% faster than LEAPS executables(Batory,Thomas and Sirkin, 1994). Uponcloserinspection,wediscoveredthata contributing factor wasthatCBSDcouldperformoptimizations automaticallythatwere difficult, ifnotimpractical,todoby hand.
Finally,our CBSDspecifications of the LEAPS algorithms(expressed intermsofcursorsand containers)were
very cleanandeasytounderstand.
It revealed theunderlying eleganceof LEAPS,but alsosuggested waysin which toimprove its performance byswapping/adding CBSDcomponents to the type equations that defined theimplementations of LEAPS containers.Figure3shows theperformanceresults fora typical ruleset, waltz
.
TheY-
axis indicatesrun -
time inseconds(logarithmic, base 10); the
X -
axisshows data set size.
The toptwocurves
showthe performance of two versions of LEAPS: the highest (slowest) is the persistent version called DATEX. (DATEX containers resided in persistent storage that used the relational storage manager of Genesis(Batory, Barnett, Garza,Smith,Tsukuda,Twichell and Wise,1988). LEAPS(which usedtransientcontainers)is the second highest curve.The performance of RL (for both transient and persistent versions) is the two lines below that of LEAPS
.
Thepersistentversionof RL was achieved byunpluggingthe transient component and replacing it with a memory-
mapped persistent component.
(Because memory mapped I/O only results in a degradation ofabout 10%,therewaslittleperformance difference betweentransient and persistentversions ofRL).517
We mentioned earlier that because theCBSDspecificationof LEAPS revealed thesource of much of the CPUoverhead,weintroduced
new
hashingcomponents/data structurestothe type equation that defined RL containers.
By doingso,wewere able to improve performance further(the bottom-
mostcurvesofFigure3).
Ourpersistent hashed
-
version ofRL ran over 40 times fasterthanLEAPS!(BatoryandThomas.)u
R NI N G
T I M E
waltz 100000
10000
1000
100
10
1
.•• •
.
-
• • •I1 -
.
••••••
DATEX
RLhash-transient
InputDataSet Size(Tuples)
Fig
.
3.
Performance Comparison of RL with LEAPS running timeWe
learnedan
importantlesson in software quality from our experiments:
abstracting voluminous and complex implementation details promotes clean, efficient, and understandable designs.
Moreover, organizingfewer details often leads tomore
maintainable products.
In our case, it wasvery easy toalter design decisionsafterwe
had built RL:wesimply redefined type equations(to alter theimplementationof its containers)and recompiled;noothersource
codewaschanged.Conclusion
Component
-
Based Software Development hasa lot of benefits overconventionalone of developing more reliable and efficient large-
scale and complex software systems.
Definitely, Component-
Based Software Development approach will be the future of software development process toservethe rising demands of software products. In
this paper, we have discussed in details about the benefits of Component-
BasedSoftware Development
over
conventional approach and also shownsome
comparison results using few practical examples. In
futureonecan try to analyze both these approaches moreseriously and givesome
fruitful and systematicdirections onthese evolutionaryfieldsas
well.References
Fayad,M. E.andSchmidt,D
.
C.
,1997.Object-
Oriented Application Frameworks,CACM, 40(10).
Lazar,B.,1998
.
IBMs,SanFrancisco Project,Software Development,6(2): 40-
46.
Souza,D. F. D.and Wills,A
.
C.
,1998.Objects,Components and Frameworks withUML:TheCatalysis Approach,Addison Wesley,http://www.
iconcomp.
com.
Ning,J
.
,1996
.A Component-
Based SoftwareDevelopmentModel,Proc. COMPSAC, pp.
389-
394.
Aoyama, M
.
, et al, 1998.
An Architectureof SoftwareCommerce Brokerover the Internet, Proc.WWCA (Worldwide Computing and ItsApplications)98,LNCS,1368(1):97-
107.
Smith,D.R.,1990. KIDS: A Semiautomatic Program DevelopmentSystem,IEEETransactionsonSoftware Engineering,pp
.
1024-
1043.
518
KhulnaUniversityStudies3(2):513
-
519Batory,D.,Barnett,J
.
, Garza,J.
,Smith, K., Tsukuda, K., Twichell, B.
, and WiseT.
, 1988.Genesis:An Extensible Database Management System, IEEE Transactions on Software Engineering, pp.1711-
1730.
519