sa_notes_by_divya (rnsit) (vtuplanet.com).docx

180
7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 1/180 R N S INSTITUTE OF TECHNOLOGY CHANNASANDRA, BANGALORE - 98 SOFTWARE ARCHITECTURE NOTES FOR 7 TH  SEMESTER INFORMATION SCIENCE SUBJECT CODE: 06IS72 PREPARED BY DIYA ! SHWETHA SHREE "RN09IS0"6 "RN09IS0#0 7 $%  S&'&($&) 7 $%  S&'&($&) I*+)'$.* S/.&*/& I*+)'$.* S/.&*/& .13")*09.(0"645'.3/' (%&$%(%)&&3")*09.(0#045'.3/' TET BOO!S: 1. S+$)& A)/%.$&/$)& .* P)/$./&, S&/* E.$.* by Len Bass, Paul Clements, Rick Kazman 2. P$$&)*-O).&*$& S+$)& A)/%.$&/$)& by Frank Buschmann, Regine Meunier, Hans Rhnert, Peter !rnmerla", Michael !tal #. A* I*$)/$.* T S+$)& A)/%.$&/$)& by $a%i" &arlan 'n" Mary !ha( )tes ha%e been circulate" n sel* risk. )b"y can be hel" res+nsible i* anything is (rng r is im+r+er in*rmatin r insucient in*rmatin +r%i"e" in it. CONTENTS: UNIT ", UNIT 2, UNIT , UNIT ;, UNIT #, UNIT 6, UNIT 7, UNIT 8

Upload: hanuscribd

Post on 18-Feb-2018

231 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 1/180

R N S INSTITUTE OF TECHNOLOGYCHANNASANDRA, BANGALORE - 98

SOFTWARE

ARCHITECTURE 

NOTES FOR 7TH

 SEMESTER INFORMATION SCIENCE

SUBJECT CODE: 06IS72

PREPARED BY

DIYA ! SHWETHA SHREE"RN09IS0"6 "RN09IS0#0

7$% S&'&($&) 7$% S&'&($&)

I*+)'$.* S/.&*/& I*+)'$.* S/.&*/&

.13")*09.(0"645'.3/'

(%&$%(%)&&3")*09.(0#045'.3/'

TET BOO!S:

1. S+$)& A)/%.$&/$)& .* P)/$./&, S&/* E.$.* by Len Bass, Paul Clements,Rick Kazman

2. P$$&)*-O).&*$& S+$)& A)/%.$&/$)& by Frank Buschmann, Regine Meunier,

Hans Rhnert, Peter !rnmerla", Michael !tal

#. A* I*$)/$.* T S+$)& A)/%.$&/$)& by $a%i" &arlan 'n" Mary !ha(

)tes ha%e been circulate" n sel* risk. )b"y can be hel" res+nsible i* anything is (rng r is im+r+er in*rmatin r insucient in*rmatin+r%i"e" in it.

CONTENTS:

UNIT ", UNIT 2, UNIT , UNIT ;, UNIT #, UNIT 6, UNIT 7, UNIT 8

Page 2: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 2/180

R ) ! - !/F0'R'RCH-CR )/!

ALONG WITH CHAPTER-WISE PREIOUS TU <UESTION PAPERS

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2

Page 3: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 3/180

)- 1-)R/$C-/)

CHAPTER " : 

THE ARCHITECTURE BUSINESS CYCLE he s*t(are architecture * a +rgram r cm+uting system is the structure r structures* the system, (hich

cm+rise s*t(are elements, the e=ternally %isible +r+erties * thse elements, an" the re

them. !*t(are architecture is a result * technical, business an" scial in>uences. -ts e=istence i

techn ical, business an" scial en%irnments that subse@uently in>uence *uture architectures.0e call this cycle* in>uences, *rm en%irnment t the architecture an" back t the en%irnment, theA)/%.$&/$)& B(.*&(

C/& =ABC>3 his cha+ter intr"uces the'BC in "etail an" e=amine the *ll(ing3  H( rganizatinal gals in>uence re@uirements an" "e%el+ment strategy.  H( re@uirements lea" tarchitecture.  H( architectures are analyze".  H( architectures yiel" systems that suggest ne( rganizatinal ca+abilities an" re@uirements.

"3" WHERE DO ARCHITECTURES COME FROM?

'n architecture is the result * a set * business an" technical "ecisins. here are many inits "esign, an" the realizatin * these in>uences (ill change "e+en"ing n theen%irnment in (hich thearchitecture is re@uire" t +er*rm. %en (ith the same re@uirements, har"(are, su++rt shumanresurces a%ailable, an architect "esigning a system t"ay is likely t "esign a "i?erent syst

been "esigne" A%eyears ag.

  ARCHITECTURES ARE INFLUENCED BY SYSTEMSTA!EHOLDERS  Many +e+le an" rganizatins intereste" in the cnstructin * a s*t(are syste

as stakehl"ers..g. custmers, en" users, "e%el+ers, +rect manager etc.  Figure bel( sh(s the architect recei%ing hel+*ul stakehl"er suggestinsD.

 

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #

Page 4: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 4/180

R ) ! - !/F0'R'RCH-CR )/!

Ha%ing an acce+table system in%l%es +r+erties such as +er*rmance, reliability,

a%ailability, +lat*rm cm+atibility, memry utilizatin, net(rk usage, security,m"iAability, usability, an" inter+erability (ith ther systems as (ell as beha%ir.

 he un"erlying +rblem, * curse, is that each stakehl"er has "i?erent cncerns an"

gals, sme * (hich may be cntra"ictry.

 he reality is that the architect *ten has t All in the blanks an" me"iate the cn>icts.

ARCHITECTURES ARE INFLUENCED BY THE DEELOPING ORGANI@ATIONS3

'rchitecture is in>uence" by the structure r nature * the "e%el+ment rganizatin.

 here are three classes * in>uence that cme *rm the "e%el+ing rganizatins3

imme"iate business, lngEterm business an" rganizatinal structure.

• 'n rganizatin may ha%e an imme"iate business in%estment in certain assets, such ase=isting architectures an" the +r"ucts base" n them.

• 'n rganizatin may (ish t make a lngEterm business in%estment in an in*rastructure t+ursue strategic gals an" may re%ie( the +r+se" system as ne means * Anancingan" e=ten"ing that in*rastructure.

•  he rganizatinal structure can sha+e the s*t(are architecture.

ARCHITECTURES ARE INFLUENCED BY THE BAC!GROUND AND EPERIENCE OF

THE ARCHITECTS3

-* the architects *r a system ha%e ha" g" results using a +articular architectural

a++rach, such as "istribute" bects r im+licit in%catin, chances are that they (ill trythat same a++rach n a ne( "e%el+ment e?rt.

Cn%ersely, i* their +rir e=+erience (ith this a++rach (as "isastrus, the architects may

be reluctant t try it again.

'rchitectural chices may als cme *rm an architects e"ucatin an" training, e=+sure

t success*ul architectural +atterns, r e=+sure t systems that ha%e (rke" +articularly

+rly r +articularly (ell.  he architects may als (ish t e=+eriment (ith an architectural +attern r techni@ue

learne" *rm a bk r a curse.

ARCHITECTURES ARE INFLUENCED BY THE TECHNICAL ENIRONMENT

' s+ecial case * the architects backgrun" an" e=+erience is re>ecte" by the technical

environment .

 he en%irnment that is current (hen an architecture is "esigne" (ill in>uence that

architecture.

-t might inclu"e stan"ar" in"ustry +ractices r s*t(are engineering +re%alent in the

architects +r*essinal cmmunity.

RAMIFICATIONS OF INFLUENCES ON AN ARCHITECTURE

 he in>uences n the architect, an" hence n the architecture, are sh(n in Figure 1.#.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G

Page 5: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 5/180

 

R ) ! - !/F0'R'RCH-CR )/!

-n>uences n an architecture cme *rm a (i"e %ariety * surces. !me are nly im+lie",

(hile thers are e=+licitly in cn>ict.

'rchitects nee" t kn( an" un"erstan" the nature, surce, an" +ririty * cnstraints n

the +rect as early as +ssible.  here*re, they must identify and actively engage the stakeholders to solicit their needs

and expectations.

'rchitects are in>uence" by the re@uirements *r the +r"uct as "eri%e" *rm its

stakehl"ers, the structure an" gals * the "e%el+ing rganizatin, the a%ailabletechnical en%irnment, an" their (n backgrun" an" e=+erience.

THE ARCHITECTURE AFFECTS THE FACTORS THAT INFLUENCE THEM

Relatinshi+s amng business gals, +r"uct re@uirements, architects e=+erience,

architectures an" Ael"e" systems *rm a cycle (ith *ee"back l+s that a business canmanage.

' business manages this cycle t han"le gr(th, t e=+an" its enter+rise area, an" ttake a"%antage * +re%ius in%estments in architecture an" system buil"ing.

Figure 1.G sh(s the *ee"back l+s. !me * the *ee"back cmes *rm the architecture

itsel*, an" sme cmes *rm the system built *rm it.

W).*5 + )/%.$&/$)& (.*&(( //&:

1 he architecture a?ects the structure * the "e%el+ing rganizatin. 'n architecture+rescribes a structure *r a system it +articularly +rescribes the units * s*t(are that

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <

Page 6: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 6/180

R ) ! - !/F0'R'RCH-CR )/!

must be im+lemente" an" integrate" t *rm the system. eams are *rme" *r in"i%i"uals*t(are unitsI an" the "e%el+ment, test, an" integratin acti%ities arun" the units.Like(ise, sche"ules an" bu"gets allcate resurces in chunks crres+n"ing t the units.

 eams becme embe""e" in the rganizatins structure. his is *ee"back *rm thearchitecture t the "e%el+ing rganizatin.

2 he architecture can a?ect the gals * the "e%el+ing rganizatin. ' success*ul systembuilt *rm it can enable a cm+any t establish a *thl" in a +articular market area. hearchitecture can +r%i"e ++rtunities *r the ecient +r"uctin an" "e+lyment * thesimilar systems, an" the rganizatin may a"ust its gals t take a"%antage * itsne(*un" e=+ertise t +lumb the market. his is *ee"back *rm the system t the"e%el+ing rganizatin an" the systems it buil"s.

# he architecture can a?ect custmer re@uirements *r the ne=t system by gi%ing thecustmer the ++rtunity t recei%e a system in a mre reliable, timely an" ecnmicalmanner than i* the subse@uent system (ere t be built *rm scratch.

G he +rcess * system buil"ing (ill a?ect the architects e=+erience (ith subse@uentsystems by a""ing t the cr+rate e=+erience base.

< ' *e( systems (ill in>uence an" actually change the s*t(are engineering culture. i.e, he technical en%irnment in (hich system buil"ers +erate an" learn.

"32 SOFTWARE PROCESSES AND THE ARCHITECTURE BUSINESS CYCLESoftware process is the term gi%en t the rganizatin, ritualizatin, an" management * s*t(are "e%el+ment acti%ities.

 he %arius acti%ities in%l%e" in creating s*t(are architecture are3

C)&$.*5 $%& (.*&(( /(& +) $%& (($&' o -t is an im+rtant ste+ in creating an"

cnstraining any *uture re@uirements. o H( much shul" the +r"uct cstJ

o 0hat is its targete" marketJ o 0hat is its targete" time

t marketJ o 0ill it nee" t inter*ace (ith ther systemsJ

o 're there system limitatins that it must (rk (ithinJ o 

 hese are all the @uestins that must in%l%e the

systems architects.

o  hey cannt be "eci"e" slely by an architect, but i* an

architect is nt cnsulte" in the creatin * the businesscase, it may be im+ssible t achie%e the business gals.

U*&)($*.*5 $%& )&.)&'&*$( o  here are a %ariety * techni@ues *r eliciting

re@uirements *rm the stakehl"ers.

o Fr e=3

/bect riente" analysis uses scenaris, r use casesD t emb"y re@uirements.

!a*etyEcritical systems use mre rigrus a++raches, such as AniteEstateEmachine

m"els r *rmal s+eciAcatin languages.o  'nther techni@ue that hel+s us un"erstan" re@uirements is the creatin * 

+rtty+es. o  Regar"less * the techni@ue use" t elicit the re@uirements, the

"esire" @ualities * the system t be cnstructe" "etermine the sha+e * itsstructure.

C)&$.*5 ) (&&/$.*5 $%& )/%.$&/$)& o  -n the lan"mark bk The Mythical Man-

Month, Fre" Brks argues *rce*ully an" el@uently that cnce+tual integrity is the key

t sun" system "esign an" that cnce+tual integrity can nly be ha" by a small

number * min"s cming tgether t "esign the systems architecture. 

D/'&*$.*5 * /''*./$.*5 $%& )/%.$&/$)& o  Fr the architecture t bee?ecti%e as the backbne * the +rects "esign, it must be cmmunicate" clearly an"unambiguusly t all * the stakehl"ers.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9

Page 7: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 7/180

R ) ! - !/F0'R'RCH-CR )/!

o  $e%el+ers must un"erstan" the (rk assignments it re@uires * them, testers

must un"erstan" the task structure it im+ses n them, management mustun"erstan" the sche"uling im+licatins it suggests, an" s *rth.

A*.*5 ) &1$.*5 $%& )/%.$&/$)& o  Chsing amng multi+le cm+eting

"esigns in a ratinal (ay is ne * the architects greatest challenges.

o %aluating an architecture *r the @ualities that it su++rts is essential t ensuring that thesystem cnstructe" *rm that architecture satisAes its stakehl"ers nee"s.

o se scenariEbase" techni@ues r architecture tra"e? analysis meth" ''M r cst

beneAt analysis meth" CB'M.

I'&'&*$.*5 $%& (($&' (& * $%& )/%.$&/$)& o  his acti%ity is cncerne"

(ith kee+ing the "e%el+ers *aith*ul t the structures an" interactin +rtclscnstraine" by the architecture.

o  Ha%ing an e=+licit an" (ellEcmmunicate" architecture is the Arst ste+ t(ar"ensuring architectural cn*rmance.

E*().*5 $%$ $%& .'&'&*$$.* /*+)'( $ $%& )/%.$&/$)&

o Finally, (hen an architecture is create" an" use", it ges int a maintenance +hase.o Cnstant %igilance is re@uire" t ensure that the actual architecture an" its re+resentatin

remain t each ther "uring this +hase.

"3 WHAT MA!ES A GOOD ARCHITECTURE?&i%en the same technical re@uirements *r a system, t( "i?erent architects in "i?erentrganizatins (ill +r"uce "i?erent architectures, h( can (e "etermine i* either ne * themis the right neJ

0e "i%i"e ur bser%atins int t( clusters3 +rcess recmmen"atins an" +r"uct rstructural recmmen"atins.

P)/&(( )&/''&*$.*( )& ( +(:  he architecture shul" be the +r"uct * a single architect r a small gru+ * 

architects (ith an i"entiAe" lea"er.

 he architect r architecture team shul" ha%e the *unctinal re@uirements *r the

system an" an articulate", +riritize" list * @uality attributes that the architecture ise=+ecte" t satis*y.

 he architecture shul" be (ell "cumente", (ith at least ne static %ie( an" ne

"ynamic %ie(, using an agree"En ntatin that all stakehl"ers can un"erstan" (ith aminimum * e?rt.

 he architecture shul" be circulate" t the systems stakehl"ers, (h shul" be

acti%ely in%l%e" in its re%ie(.

 he architecture shul" be analyze" *r a++licable @uantitati%e measures such asma=imum thrugh+ut an" *rmally e%aluate" *r @uality attributes be*re it is t latet make changes t it.

 he architecture shul" len" itsel* t incremental im+lementatin %ia the creatin * a

skeletalD system in (hich the cmmunicatin +aths are e=ercise" but (hich at Arst hasminimal *unctinality. his skeletal system can then be use" t gr(D the systemincrementally, easing the integratin an" testing e?rts.

 he architecture shul" result in a s+eciAc an" small set * resurce cntentin areas,

the reslutin * (hich is clearly s+eciAe", circulate" an" maintaine".

P)/$ =($)/$)> )&/''&*$.*( )& ( +(:

 he architecture shul" *eature (ellE"eAne" m"ules (hse *unctinal res+nsibilities

are allcate" n the +rinci+les * in*rmatin hi"ing an" se+aratin * cncerns.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page

Page 8: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 8/180

R ) ! - !/F0'R'RCH-CR )/!

ach m"ule shul" ha%e a (ellE"eAne" inter*ace that enca+sulates r hi"esD

changeable as+ects *rm ther s*t(are that uses its *acilities. hese inter*acesshul" all( their res+ecti%e "e%el+ment teams t (rk largely in"e+en"ent * each ther.

Nuality attributes shul" be achie%e" using (ellEkn(n architectural tactics

s+eciAc t each attribute.  he architecture shul" ne%er "e+en" n a +articular %ersin * a cmmercial

+r"uct r tl.

M"ules that +r"uce "ata shul" be se+arate *rm m"ules that cnsume "ata.

 his ten"s t increase m"iAability.

Fr +arallel +rcessing systems, the architecture shul" *eature (ellE"eAne"

+rcessrs r tasks that " nt necessarily mirrr the m"ule "ecm+sitinstructure.

%ery task r +rcess shul" be (ritten s that its assignment t a s+eciAc

+rcessr can be easily change", +erha+s e%en at runtime.

 he architecture shul" *eature a small number * sim+le interactin +atterns.

CHAPTER 2

WHAT IS SOFTWARE ARCHITECTURE

23" WHAT SOFTWARE ARCHITECTURE IS AND WHAT IT ISNT

Figure 2.1 3 y+ical, but unin*rmati%e, +resentatin * a s*t(are architectureFigure 2.1, taken *rm a system "escri+tin *r an un"er(ater acustic simulatin,+ur+rts t "escribe that systems Ot+Ele%el architectureO an" is +recisely the kin" * "iagram mst *ten "is+laye" t hel+ e=+lain an architecture. =actly (hat can (e tell*rm itJ

 he system cnsists * *ur elements.  hree * the elements Pr+ Lss M"el M/$P, Re%erb M"el M/$R, an"

)ise M"el M/$) might ha%e mre in cmmn (ith each ther than (ith the*urthCntrl Prcess CPbecause they are +sitine" ne=t t each ther.

'll * the elements a++arently ha%e sme srt * relatinshi+ (ith each ther,

since the "iagram is *ully cnnecte".

-s this an architectureJ 0hat can (e not tell *rm the "iagramJ

What is the nature of the elements?0hat is the signiAcance * their se+aratinJ $ they run n se+arate +rcessrsJ $ they run at se+arate timesJ $ the elements cnsist* +rcesses, +rgrams, r bthJ $ they re+resent (ays in (hich the +rect labr (ill be "i%i"e", r " they cn%ey a sense * runtimese+aratinJ 're they bects, tasks, *unctins, +rcesses, "istribute" +rgrams, r smething elseJ

What are the responsibilities of the elements?0hat is it they "J 0hat is their *unctin in the systemJ

What is the signicance of the connections?

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q

Page 9: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 9/180

R ) ! - !/F0'R'RCH-CR )/!

$ the cnnectins mean that the elements cmmunicate (ith each ther, cntrl each ther, sen" "ata t each ther, use each ther, in%keeach ther, synchrnize (ith each ther, share sme in*rmatinEhi"ing secret (ith each ther, r sme cmbinatin * these r ther relatinsJ0hat are the mechanisms *r the cmmunicatinJ 0hat in*rmatin >(s acrss the mechanisms, (hate%er they may beJ

What is the signicance of the layout?0hy is CP n a se+arate le%elJ $es it call the ther three elements, an" are the thers nt all(e" t call itJ $es it cntain the ther three in anim+lementatin unit senseJ /r is there sim+ly n rm t +ut all *ur elements n the same r( in the "iagramJ

 his "iagram "es nt sh( a s*t(are architecture. 0e n( "eAne (hat does cnstitute as*t(are architecture3

The software architecture of a program or computing system is the structure or structures of the system which comprise software elements the externally visible properties of thoseelements and the relationships among them!

Lets lk at sme * the im+licatins * this "eAnitin in mre "etail.

'rchitecture "eAnes s*t(are elements

 he "eAnitin makes clear that systems can an" " cm+rise mre than ne structurean" that n ne structure can irre*utably claim t be the architecture.

 he "eAnitin im+lies that e%ery cm+uting system (ith s*t(are has a s*t(arearchitecture because e%ery system can be sh(n t cm+rise elements an" therelatins amng them.

 he beha%ir * each element is +art * the architecture ins*ar as that beha%ir can bebser%e" r "iscerne" *rm the +int * %ie( * anther element. !uch beha%ir is(hat all(s elements t interact (ith each ther, (hich is clearly +art * thearchitecture.

 he "eAnitin is in"i?erent as t (hether the architecture *r a system is a g" ne r aba" ne, meaning that it (ill all( r +re%ent the system *rm meeting its beha%iral,+er*rmance, an" li*ecycle re@uirements.

232 OTHER POINTS OF IEW he stu"y * s*t(are architecture is an attem+t t abstract the cmmnalities inherent insystem "esign, an" as such it must accunt *r a (i"e range * acti%ities, cnce+ts, meth"s,a++raches, an" results.

•  Architecture is high-level design! /ther tasks assciate" (ith "esign are ntarchitectural, such as "eci"ing n im+rtant "ata structures that (ill be enca+sulate".

•  Architecture is the overall structure of the system.   he "i?erent structures+r%i"e the critical engineering le%erage +ints t imbue a system (ith the @ualityattributes that (ill ren"er it a success r *ailure. he multi+licity * structures in anarchitecture lies at the heart * the cnce+t.

•  Architecture is the structure of the components of a program or system,

their interrelationships, and the principles and guidelines governing their design and evolution over time.  'ny system has an architecture that can be"isc%ere" an" analyze" in"e+en"ently * any kn(le"ge * the +rcess by (hich thearchitecture (as "esigne" r e%l%e".

•  Architecture is components and connectors.  Cnnectrs im+ly a runtimemechanism *r trans*erring cntrl an" "ata arun" a system. 0hen (e s+eak * Orelatinshi+sO amng elements, (e inten" t ca+ture bth runtime an" nnEruntimerelatinshi+s.

23 ARCHITECTURAL PATTERNS, REFERENCE MODELS REFERENCEARCHITECTURES

A* )/%.$&/$) $$&)* is a "escri+tin * element an" relatin ty+es tgether (ith a set* cnstraints n h( they may be use".

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8

Page 10: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 10/180

R ) ! - !/F0'R'RCH-CR )/!

Fr e=3 clientEser%er is a cmmn architectural +attern. Client an" ser%er are t( elementty+es, an" their cr"inatin is "escribe" in terms * the +rtcl that the ser%er uses tcmmunicate (ith each * its clients.

A )&+&)&*/& '& is a "i%isin * *unctinality tgether (ith "ata >( bet(een the +ieces.

' re*erence m"el is a stan"ar" "ecm+sitin * a kn(n +rblem int +arts thatc+erati%ely sl%e the +rblem.

A )&+&)&*/& )/%.$&/$)&  is a re*erence m"el ma++e" nt s*t(are elements thatc+erati%ely im+lement the *unctinality "eAne" in the re*erence m"el an" the "ata >(sbet(een them. 0hereas a re*erence m"el "i%i"es the *unctinality, ' re*erence architectureis the ma++ing * that *unctinality nt a system "ecm+sitin.

Re*erence m"els, architectural +atterns, an" re*erence architectures are nt architecturesIthey are use*ul cnce+ts that ca+ture elements * an architecture. ach is the utcme * early "esign "ecisins. he relatinshi+ amng these "esign elements is sh(n in Figure 2.2.' s*t(are architect must "esign a system that +r%i"es cncurrency, +rtability,m"iAability, usability, security, an" the like, an" that re>ects cnsi"eratin * the tra"e?samng these nee"s.

23; WHY IS SOFTWARE ARCHITECTURE IMPORTANT? here are *un"amentally three reasns *r s*t(are architectures im+rtance *rm atechnical +ers+ecti%e.

Communication among stakeholders3 s*t(are architecture re+resents a cmmn

abstractin * a system that mst i* nt all * the systems stakehl"ers can use as abasis *r mutual un"erstan"ing, negtiatin, cnsensus an" cmmunicatin.

Early design decisions3 !*t(are architecture mani*ests the earliest "esign "ecisins

abut a system (ith res+ect t the systems remaining "e%el+ment, its "e+lyment, an"its maintenance li*e. -t is the earliest +int at (hich "esign "ecisins g%erning thesystem t be built can be analyze".

Transferable abstraction of a system3 s*t(are architecture m"el is trans*erable

acrss systems. -t can be a++lie" t ther systems e=hibiting similar @uality attribute an"*unctinal attribute an" *unctinal re@uirements an" can +rmte largeEscale reEuse.

0e (ill a""ress each * these +ints in turn3

 ARCHITECTURE IS THE EHICLE FOR STA!EHOLDER COMMUNICATION

• ach stakehl"er * a s*t(are system custmer, user, +rect manager, c"er, testeran" s n E is cncerne" (ith "i?erent system characteristics that are a?ecte" by thearchitecture.

• Fr e=. he user is cncerne" that the system is reliable an" a%ailable (hen nee"e"I the

custmer is cncerne" that the architecture can be im+lemente" n sche"ule an" tbu"getI the manager is (rrie" that the architecture (ill all( teams t (rk largelyin"e+en"ently, interacting in "isci+line" an" cntrlle" (ays.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17

Page 11: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 11/180

R ) ! - !/F0'R'RCH-CR )/!

• 'rchitecture +r%i"es a cmmn language in (hich "i?erent cncerns can be e=+resse",negtiate", an" resl%e" at a le%el that is intellectually manageable e%en *r large,cm+le= systems.

ARCHITECTURE MANIFESTS THE EARLIEST SET OF DESIGN DECISIONS

!*t(are architecture re+resents a systems earliest set * "esign "ecisins. hese early"ecisins are the mst "icult t get crrect an" the har"est t change later in the"e%el+ment +rcess, an" they ha%e the mst *arEreaching e?ects.

• T%& )/%.$&/$)& &*&( /*($).*$( * .'&'&*$$.* o  his means that the

im+lementatin must be "i%i"e" int the +rescribe" elements, the elements must interact(ith each ther in the +rescribe" *ashin, an" each element must *ulAll its res+nsibilityt the thers as "ictate" by the architecture.

• T%& )/%.$&/$)& ./$$&( )5*.$.* ($)/$)& o  he nrmal meth" *r "i%i"ing

u+ the labr in a large system is t assign "i?erent gru+s "i?erent +rtins * thesystem t cnstruct. his is calle" the (rk break"(n structure * a system.

• T%& )/%.$&/$)& .*%..$( ) &*&( (($&'K( .$ $$).$&( o  0hether a

system (ill be able t e=hibit its "esire" r re@uire" @uality attributes is substantially"etermine" by its architecture.

o H(e%er, the architecture alne cannt guarantee *unctinality r @uality.

o $ecisins at all stages * the li*e cycle*rm highEle%el "esign t c"ing an"

im+lementatina?ect system @uality. o  Nuality is nt cm+letely a *unctin * 

architectural "esign. ensure @uality, a g" architecture is necessary, but ntsucient.

• P)&./$.*5 (($&' .$.&( ($.*5 $%& )/%.$&/$)& o 'rchitecture e%aluatintechni@ues such as the architecture tra"e? analysis meth" su++rt t+E"(n insightint the attributes * s*t(are +r"uct @uality that is ma"e +ssible an" cnstraine" bys*t(are architectures.

• T%& )/%.$&/$)& '&( .$ &(.&) $ )&(* $ * '*5& /%*5& o !*t(aresystems change %er their li*etimes. o %ery architecture +artitins +ssible changes int

three categries3 lcal, nnlcal, an" architectural.

o ' lcal change can be accm+lishe" by m"i*ying a single element.

o ' nnlcal change re@uires multi+le element m"iAcatins but lea%es the un"erlying

architectural a++rach intact.

• T%& )/%.$&/$)& %&( .* &1$.*) )$$.*5 o  he system is e=ecutable

early in the +r"ucts li*e cycle. -ts A"elity increases as +rtty+e +arts are re+lace" bycm+lete %ersins * the s*t(are.

o  ' s+ecial case * ha%ing the system e=ecutable early is that +tential

+er*rmance +rblems can be i"entiAe" early in the +r"ucts li*e cycle.

• T%& )/%.$&/$)& &*&( ')& //)$& /($ * (/%&& &($.'$&( o Cst an"

sche"ule estimates are an im+rtant management tl t enable the manager t ac@uirethe necessary resurces an" t un"erstan" (hether a +rect is in truble.

ARCHITECTURE AS A TRANSFERABLE, RE-USABLE MODEL

 he earlier in the li*e cycle reEuse is a++lie", the greater the beneAt that can be

achie%e". 0hile c"e reuse is beneAcial, reEuse at the architectural le%el +r%i"es

tremen"us le%erage *r systems (ith similar re@uirements.

• S+$)& )/$ .*&( (%)& /''* )/%.$&/$)&

' s*t(are +r"uct line r *amily is a set * s*t(areEintensi%e systems sharing a

cmmn, manage" set * *eatures that satis*y the s+eciAc nee"s * a +articular marketsegment r missin an" that are "e%el+e" *rm a cmmn set * cre assets in a+rescribe" (ay.    S($&'( /* & .$ (.*5 )5&3 E$&)* &1&&&&'&*$(

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11

Page 12: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 12/180

R ) ! - !/F0'R'RCH-CR )/!

0hereas earlier s*t(are +ara"igms *cuse" n +rgramming as the +rime acti%ity,(ith +rgress measure" in lines * c"e, architectureEbase" "e%el+ment *ten *cusesn cm+sing r assembling elements that are likely t ha%e been "e%el+e"se+arately, e%en in"e+en"ently, *rm each ther.

• L&(( .( ')&: .$ ( $ )&($)./$ $%& 1/) + &(.5* $&)*$.1&(

0e (ish t minimize the "esign cm+le=ity * the system (e are buil"ing. '"%antagest this a++rach inclu"e enhance" reEuse mre regular an" sim+ler "esigns that aremre easily un"erst" an" cmmunicate", mre ca+able analysis, shrter selectintime, an" greater inter+erability.

• A* )/%.$&/$)& &)'.$( $&'$&-(& &1&'&*$

'n architecture emb"ies "esign "ecisins abut h( elements interact that, (hilere>ecte" in each elements im+lementatin, can be lcalize" an" (ritten ust nce.

 em+lates can be use" t ca+ture in ne +lace the interEelement interactinmechanisms.

• A* )/%.$&/$)& /* & $%& (.( +) $).*.*5

 he architecture, inclu"ing a "escri+tin * h( elements interact t carry ut the

re@uire" beha%ir, can ser%e as the intr"uctin t the system *r ne( +rectmembers.

23# ARCHITECTURAL STRUCTURES AND IEWS'rchitectural structures can by an" large be "i%i"e" int three gru+s, "e+en"ing n thebra" nature * the elements they sh(.

• Module structures!

Here the elements are m"ules, (hich are units * im+lementatin. M"ules re+resenta c"eEbase" (ay * cnsi"ering the system. hey are assigne" areas * *unctinalres+nsibility. here is less em+hasis n h( the resulting s*t(are mani*ests itsel* atruntime. M"ule structures all( us t ans(er @uestins such as 0hat is the +rimary

*unctinal res+nsibility assigne" t each m"uleJ 0hat ther s*t(are elements is am"ule all(e" t useJ 0hat ther s*t(are "es it actually useJ 0hat m"ules arerelate" t ther m"ules by generalizatin r s+ecializatin i.e., inheritancerelatinshi+sJ

• Component-and-connector structures!

Here the elements are runtime cm+nents (hich are the +rinci+al units * cm+utatin an" cnnectrs (hich are the cmmunicatin %ehicles amngcm+nents. Cm+nentEan"Ecnnectr structures hel+ ans(er @uestins such as0hat are the mar e=ecuting cm+nents an" h( " they interactJ 0hat are themar share" "ata stresJ 0hich +arts * the system are re+licate"J H( "es "ata+rgress thrugh the systemJ 0hat +arts * the system can run in +arallelJ H( can

the systems structure change as it e=ecutesJ

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12

Page 13: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 13/180

R ) ! - !/F0'R'RCH-CR )/!

•  Allocation structures!

'llcatin structures sh( the relatinshi+ bet(een the s*t(are elements an" theelements in ne r mre e=ternal en%irnments in (hich the s*t(are is create" an"e=ecute". hey ans(er @uestins such as 0hat +rcessr "es each s*t(are elemente=ecute nJ -n (hat Ales is each element stre" "uring "e%el+ment, testing, an"

system buil"ingJ 0hat is the assignment * s*t(are elements t "e%el+ment teamsJ

Page

SOFTWARE STRUCTURES

 Module

M"uleEbase" structures inclu"e the *ll(ing structures.

Decomposition he units are m"ules relate" t each ther by the Ois a subm"ule

* O relatin, sh(ing h( larger m"ules are "ecm+se" int smaller nesrecursi%ely until they are small enugh t be easily un"erst".

!ses  he units are relate" by the uses relatin. /ne unit uses anther i* the

crrectness * the Arst re@uires the +resence * a crrect %ersin as ++se" t astub * the secn".

"ayered  Layers are *ten "esigne" as abstractins %irtual machines that hi"e

im+lementatin s+eciAcs bel( *rm the layers ab%e, engen"ering +rtability.

Class or generali#ation he class structure all(s us t reasn abut reEuse an" the

incremental a""itin * *unctinality.

 Component-and-connector

Cm+nentEan"Ecnnectr structures inclu"e the *ll(ing structures

$rocess or communicating processes3 he units here are +rcesses r threa"s that

are cnnecte" (ith each ther by cmmunicatin, synchrnizatin, an"Sr e=clusin

+eratins. Concurrency  he cncurrency structure is use" early in "esign t i"enti*y the

re@uirements *r managing the issues assciate" (ith cncurrent e=ecutin.

%hared data or repository  his structure cm+rises cm+nents an" cnnectrs

that create, stre, an" access +ersistent "ata

Client-server his is use*ul *r se+aratin * cncerns su++rting m"iAability, *r

+hysical "istributin, an" *r la" balancing su++rting runtime +er*rmance.

  Allocation

'llcatin structures inclu"e the *ll(ing structures

Deployment  his %ie( all(s an engineer t reasn abut +er*rmance, "ata

integrity, a%ailability, an" security &mplementation his is critical *r the management * "e%el+ment acti%ities an"

buil"s +rcesses.

'ork assignment  his structure assigns res+nsibility *r im+lementing an"

integrating the m"ules t the a++r+riate "e%el+ment teams.

RELATING STRUCTURES TO EACH OTHER

ach * these structures +r%i"es a "i?erent +ers+ecti%e an" "esign han"le n a system, an"each is %ali" an" use*ul in its (n right. -n general, ma++ings bet(een structures are manyt many. -n"i%i"ual structures bring (ith them the +(er t mani+ulate ne r mre @ualityattributes. hey re+resent a +(er*ul se+aratinE*cncerns a++rach *r creating the

architecture.

WHICH STRUCTURES TO CHOOSE?

Kruchtens *ur %ie(s *ll(3

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#

Page 14: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 14/180

R ) ! - !/F0'R'RCH-CR )/!

"ogical.  he elements are Okey abstractins,O (hich are mani*este" in the bectE

riente" (rl" as bects r bect classes. his is a m"ule %ie(.

$rocess.  his %ie( a""resses cncurrency an" "istributin * *unctinality. -t is a

cm+nentEan"cnnectr %ie(.

Development.   his %ie( sh(s the rganizatin * s*t(are m"ules, libraries,

subsystems, an" units * "e%el+ment. -t is an allcatin %ie(, ma++ing s*t(are t the"e%el+ment en%irnment.

$hysical.  his %ie( ma+s ther elements nt +rcessing an" cmmunicatin n"es

an" is als an allcatin %ie(

R ) ! - !/F0'R'RCH-CR )/!

)- 1 E N!-/) B')K

N

3

<UESTION YEAR MAR! 

S

1 0hat is a architecture business cycleJ $ec78

2 0hy is s*t(are architecture im+rtantJ $ec78

#

# List all the cmmn s*t(are architecture structures. =+lain thecm+nent cnnectr structure.

$ec78

17

G $eAne s*t(are architecture. =+lain the cmmn s*t(are architecturestructures.

 Tune17

17

< =+lain h( the architecture business cycle (rks, (ith a neat "iagram Tune

17

17

9 =+lain h( the s*t(are architectures a?ect the *actrs * in>uence.Hence r ther(ise e=+lain 'BC.

$ec17

Q

Brie>y e=+lain the technical im+rtance * s*t(are architectures.Further elabrate n the *act that architecture is the %ehicle *rstakehl"er cmmunicatin

$ec17

Q 0hat is an allcatin structure as a++lie" t s*t(are architecturesJ=+lain the three allcatin structures in +ractice.

$ec17

<

8 0ith the hel+ * a neat blck "iagram * 'BC, e=+lain in "etail the

"i?erent acti%ities (hich are in%l%e" in creating a s*t(are architecture

 Tune

11

17

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G

Page 15: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 15/180

List * cmmn architectural styles3

D$ (($&'(:  Batch se@uential  Pi+es an" Alters

.)$ '/%.*&(:  -nter+reters  RuleE base" systems

C-*- )&$)* (($&'(:  Main +rgram an" subrutine  // systems

  Hierarchical layers.

D$- /&*$&)& (($&'(:  $atabases  Hy+erte=t systems

  Blackbar"s.I*&&*&*$ /'*&*$(:  Cmmunicating +rcesses  %ent systems

 

R ) ! - !/F0'R'RCH-CR )/!

17 numerate an" e=+lain in "etail the "i?erent gru+s s*t(arearchitecture structures are categrize" int (ith the hel+ * a++r+riate+ictrial "escri+tins

 Tune11

17

11 $eAne s*t(are architecture. $iscuss in "etail, the im+licatins * the

"eAnitin

$ec

11

17

12 $eAne the *ll(ing terms3

iarchitectural m"eliire*erence m"eliiire*erencearchitecture

$ec11

9

1# =+lain the m"ule base" structures $ec11

G

1G $eAne s*t(are architecture. 0hat is a architecture business cycleJ=+lain (ith a neat "iagram

 Tune12

17

1< $eAne architectural m"el, re*erence m"el, re*erence architecture an"bring ut the relatinshi+ bet(een them

 Tune12

9

19 =+lain the %arius +rcess recmmen"atins as use" by an architect(hile "e%el+ing s*t(are architectures

 Tune12

G

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12

)- 2'RCH-CR'L !5L! ; C'!!$-!

ARCHITECTURAL STYLES

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<

Page 16: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 16/180

R ) ! - !/F0'R'RCH-CR )/!

PIPES AND FILTERS ach cm+nents has set * in+uts an" set * ut+uts

' cm+nent rea"s streams * "ata n its in+ut an" +r"uces streams * "ata n its

ut+ut.

By a++lying lcal trans*rmatin t the in+ut streams an" cm+uting incrementally, sthat ut+ut begins be*re in+ut is cnsume". Hence, cm+nents are terme" as Alters.

Cnnectrs * this style ser%e as cn"ucts *r the streams transmitting ut+uts * ne

Alter t in+uts * anther. Hence, cnnectrs are terme" +i+es.

C*.$.*( =.*1).*$(> + $%.( ($& )&: 

Filters must be in"e+en"ent entities.

 hey shul" nt share state (ith ther Alter

Filters " nt kn( the i"entity * their u+stream an" "(nstream Alters.

!+eciAcatin might restrict (hat a++ears n in+ut +i+es an" the result that a++ears n

the ut+ut +i+es.

Crrectness * the ut+ut * a +i+eEan"EAlter net(rk shul" nt "e+en" n the r"erin (hich Alter +er*rm their +rcessing.

Cmmn s+ecializatin * this style inclu"es 3

"ipelines#

Restrict the t+lgies t linear se@uences * Alters.

$ounded pipes#Restrict the amunt * "ata that can resi"e n +i+e.

Typed pipes#

Re@uires that the "ata +asse" bet(een t( Alters ha%e a (ellE"eAne" ty+e.

(atch se)uential system

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 19

Page 17: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 17/180

R ) ! - !/F0'R'RCH-CR )/!

' "egenerate case * a +i+eline architecture ccurs (hen each Alter +rcesses all * itsin+ut "ata as a single entity. -n these systems +i+es n lnger ser%e the *unctin * +r%i"ing a stream * "ata an" are largely %estigial.

E'& ":

Best kn(n e=am+le * +i+eEan"EAlter architecture are +rgrams (ritten in )-UE!HLL.ni= su++rts this style by +r%i"ing a ntatin *r cnnecting cm+nents 6ni= +rcess:an" by +r%i"ing runEtime mechanisms *r im+lementing +i+es.

E'& 2:

 ra"itinally cm+ilers ha%e been %ie(e" as +i+eline systems. !tages in the +i+elineinclu"e le=ical analysis +arsing, semantic analysis an" c"e generatin ther e=am+les * this ty+e are.

!ignal +rcessing "mains

Parallel +rcessing

Functinal +rcessing  $istribute" systems.

A1*$5&(:

o  hey all( the "esigner t un"erstan" the %erall in+utSut+ut beha%ir

* a system as a sim+le cm+sitin * the beha%ir * the in"i%i"ualAlters.

o  hey su++rt reuse3 'ny t( Alters can be hke" tgether i* they agree

n "ata. o !ystems are easy t maintain an" enhance3 )e( Alters can be

a""e" t e=citing systems. o  hey +ermit certain kin"s * s+ecialize"

analysis eg3 "ea"lck, thrugh+ut o  hey su++rt cncurrent e=ecutin.

D.(1*$5&(:

o  hey lea" t a batch rganizatin * +rcessing. o Filters are in"e+en"ente%en thugh they +rcess "ata incrementally. o )t g" at han"ling

interacti%e a++licatins

0hen incremental "is+lay u+"ates are re@uire".

 hey may be ham+ere" by ha%ing t maintain crres+n"ences bet(een t( se+arate

but relate" streams.

L(est cmmn "enminatr n "ata transmissin.

 his can lea" t bth lss * +er*rmance an" t increase" cm+le=ity in (riting the Alters.

OBJECT-ORIENTED AND DATA ABSTRACTION-n this a++rach, "ata re+resentatin an" their assciate" +rimiti%e +eratins areenca+sulate" in the abstract "ata ty+e '$ r bect. he cm+nents * this style areEbectsS'$s bects interact thrugh *unctin an" +rce"ure in%catins.

T .')$*$ (&/$( + $%.( ($& )&:

  /bect is res+nsible *r +reser%ing the integrity * itsre+resentatin.  Re+resentatin is hi""en *rm ther bects.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1

Page 18: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 18/180

 

R ) ! - !/F0'R'RCH-CR )/!

A1*$5&(

-t is +ssible t change the im+lementatin

(ithut a?ecting the clients because an becthi"es its re+resentatin *rm clients.

 he bun"ling * a set * accessing rutines (ith

the "ata they mani+ulate all(s "esigners t"ecm+se +rblems int cllectins * 

interacting agents.

D.(1*$5&(

  call a +rce"ure, it must kn( the i"entity * 

the ther bect.

0hene%er the i"entity * bect changes it is

necessary t m"i*y all ther bects thate=+licitly in%ke it.

EENT-BASED, IMPLICIT INOCATION

-nstea" * in%king the +rce"ure "irectly acm+nent can annunce ne r mre e%ents.

/ther cm+nents in the system can register an

interest in an e%ent by assciating a +rce"ure tit.

0hen the e%ent is annunce", the system itsel* 

in%kes all * the +rce"ure that ha%e beenregistere" *r the e%ent. hus an e%entannuncement im+licitlyD causes the in%catin* +rce"ures in ther m"ules.

'rchitecturally s+eaking, the cm+nents in an

im+licit in%catin style are m"ules (hseinter*ace +r%i"es bth a cllectin * +rce"uresan" a set * e%ents.

A1*$5&(:

%t provides strong support for reuse

'ny cm+nent can be intr"uce" int the systemsim+ly by registering it *r the e%ents * thatsystem.

%mplicit invocation eases system evolution!

Cm+nents may be re+lace" by ther

cm+nents (ithut a?ecting the inter*aces * ther cm+nents.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1Q

Page 19: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 19/180

R ) ! - !/F0'R'RCH-CR )/!

D.(1*$5&(:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 18

Page 20: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 20/180

R ) ! - !/F0'R'RCH-CR )/!

Cm+nents relin@uish cntrl %er the cm+utatin +er*rme" by the system.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 27

Page 21: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 21/180

R ) ! - !/F0'R'RCH-CR )/!

Cncerns change * "ata

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 21

Page 22: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 22/180

R ) ! - !/F0'R'RCH-CR )/!

&lbal +er*rmance an" resurce management can becme artiAcial issues.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 22

Page 23: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 23/180

R ) ! - !/F0'R'RCH-CR )/!

LAYERED SYSTEMS:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2#

Page 24: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 24/180

R ) ! - !/F0'R'RCH-CR )/!

' layere" system is rganize" hierarchically  ach layer +r%i"es ser%ice t the layer

ab%e it.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2G

Page 25: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 25/180

R ) ! - !/F0'R'RCH-CR )/!

-nner layers are hi""en *rm all e=ce+t the a"acent layers.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2<

Page 26: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 26/180

R ) ! - !/F0'R'RCH-CR )/!

Cnnectrs are "eAne" by the +rtcls that "etermine h( layers interact each ther.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 29

Page 27: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 27/180

R ) ! - !/F0'R'RCH-CR )/!

&al is t achie%e @ualities * m"iAability +rtability.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2

Page 28: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 28/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2Q

Page 29: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 29/180

R ) ! - !/F0'R'RCH-CR )/!

E'&(:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 28

Page 30: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 30/180

R ) ! - !/F0'R'RCH-CR )/!

Layere" cmmunicatin +rtcl

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #7

Page 31: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 31/180

R ) ! - !/F0'R'RCH-CR )/!

/+erating systems

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #1

Page 32: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 32/180

R ) ! - !/F0'R'RCH-CR )/!

$atabase systems

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #2

Page 33: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 33/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page ##

Page 34: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 34/180

R ) ! - !/F0'R'RCH-CR )/!

A1*$5&(:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #G

Page 35: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 35/180

R ) ! - !/F0'R'RCH-CR )/!

o  hey su++rt "esigns base" n increasing le%els abstractin.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #<

Page 36: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 36/180

R ) ! - !/F0'R'RCH-CR )/!

o 'll(s im+lementers t +artitin a cm+le= +rblem int a se@uence * incremental

ste+s.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #9

Page 37: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 37/180

R ) ! - !/F0'R'RCH-CR )/!

o  hey su++rt enhancement o  hey su++rt reuse.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #

Page 38: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 38/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #Q

Page 39: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 39/180

R ) ! - !/F0'R'RCH-CR )/!

D.(1*$5&(:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #8

Page 40: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 40/180

R ) ! - !/F0'R'RCH-CR )/!

o )t easily all systems can be structures in a layere" *ashin.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G7

Page 41: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 41/180

  Per*rmance may re@uire clsercu+ling bet(een lgically highE le%el *unctins an" their l(erEle%el

  $iculty t ma++ing e=isting +rtcls int the -!/ *rame(rk as many * thse +rtc

REPOSITORIES:6 "ata cantere" architecture:  &al * achie%ing the @uality * integrability * "ata.  -n this style, there are t( kin"s * cm+nents.

B/):

hree mar +arts3  !*&5& ()/&(:

  B/) $ ($)/$)&:

  C*$):

   -n%catin * a kn(le"ge surce ks is triggere" by the state * blackbar".   he actual *cus * cntrl can be in

E kn(le"ge surceE blackbar"E !e+arate m"ule rE cmbinatin * these

Blackbar" systems ha%e tra"itinally been use" *r a++licatin re@uiring cm+le= inter+retati+rcessing like s+eech recgnitin, +attern recgnitin.

INTERPRETERS  'n inter+reter inclu"es+seu" +rgram being

  Pseu" +rgram inclu"es the +rgram an"

  -nter+retatin engine inclu"es bth "eAnitin *

-nter+reter inclu"esG cm+nents3" 

 

R ) ! - !/F0'R'RCH-CR )/!

im+lementatins.

se%eral layers.

Layer bri"ging3 *unctins is ne layer may talk t ther than its imme"iate neighbr.

i.Central "ata structureE re+resents current state.

ii. Cllectin * in"e+en"ent cm+nents (hich +erate n central "ata stre.

 he chice * a cntrl "isci+line lea"s t t( mar sub categries.

 y+e * transactins is an in+ut stream trigger selectin * +rcess t e=ecute

Current state * the central "ata structure is the main trigger *r selecting +rcesses te=ecute. 'cti%e re+sitry such as blackbar".

!e+arate, in"e+en"ent +arcels * a++licatin "e+en"ents kn(le"ge.

Prblem sl%ing state "ata, rganize"

int an a++licatinE"e+en"ent

hierarchy $ri%en entirely by the state

* blackbar" inter+rete" an"

inter+retatin engine. acti%atin

recr". inter+reter an" current state * 

its e=ecutin.

-nter+retatin engine3 t " the (rk 

Memry3 that cntains +seu" c"e t beinter+rete". 

Re+resentatin * cntrl state * inter+retatinengine 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G1

Page 42: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 42/180

R ) ! - !/F0'R'RCH-CR )/!

Re+resentatin * cntrl state * the +rgrambeing simulate". 

=3 T4M r %irtual Pascal machineD

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G2

Page 43: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 43/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G#

Page 44: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 44/180

R ) ! - !/F0'R'RCH-CR )/!

•  he thermstat setting is the set +int

•  em+erature sensr is the sensr

F.5)& 23"0 +&&/ /*$)

F&&+)) /*$):

-t antici+ates *uture e?ects n the cntrlle" %ariable by measuring ther +rcess %ariablesan" a"usts the +rcess base" n these %ariables. he im+rtant cm+nents * a*ee"*r(ar" cntrller are essentially the same as *r a *ee"back cntrller e=ce+t that thesensrs btain %alues * in+ut r interme"iate %ariables.

F.5)& 23"" +&&+)) /*$)

•  hese are sim+liAe" m"els

•  hey " nt "eal (ith cm+le=ities E +r+erties * sensrs, transmissin "elays ;

calibratin issues    hey ignre the res+nse characteristics * the system, such

as gain, lag an" hysteresis.    hey "nt sh( h( cmbine" *ee"*r(ar" an"

*ee"back  hey "nt sh( h( t mani+ulate +rcess %ariables.

A SOFTWARE PARADIGM FOR PROCESS CONTROL'n architectural style *r s*t(are that cntrls cntinuus +rcesses can be base" n the+rcessEcntrl m"el, incr+rating the essential +arts * a +rcessEcntrl l+3

 C'$$.* &&'&*$(3 se+arate the +rcess * interest *rm the cntrlle" +licy

• "rocess denition, inclu"ing mechanisms *r mani+ulating sme +rcess %ariables

• &ontrol algorithm, *r "eci"ing h( t mani+ulate %ariables

 D$ &&'&*$3 cntinuusly u+"ate" +rcess %ariables an" sensrs that cllect them

• "rocess variables, inclu"ing "esigne" in+ut, cntrlle" an" mani+ulate" %ariables an"

kn(le"ge * (hich can be sense"• Set point , r re*erence %alue *r cntrlle" %ariable

• Sensors t btain %alues * +rcess %ariables +ertinent t cntrl

  T%& /*$) ).5'3 establishes the relatin that the cntrl algrithme=ercises.

OTHER FAMILIAR ARCHITECTURES D.($).$& )/&((&(: $istribute" systems ha%e "e%el+e" a number * cmmn

rganizatins *r multiE+rcess systems. !me can be characterize" +rimarily by theirt+lgical *eatures, such as ring an" star rganizatins. /thers are better

characterize" in terms * the kin"s * interE+rcess +rtcls that are use" *rcmmunicatin e.g., heartbeat algrithms.

M.* )5)'()$.*& )5*.$.*(:  he +rimary rganizatin * many

systems mirrrs the +rgramming language in (hich the system is (ritten. Fr

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page GG

Page 45: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 45/180

R ) ! - !/F0'R'RCH-CR )/!

languages (ithut su++rt *r m"ularizatin this *ten results in a system rganize"arun" a main +rgram an" a set * subrutines.

D'.*-(&/./ (+$)& )/%.$&/$)&(:  hese architectures +r%i"e an

rganizatinal structure tailre" t a *amily * a++licatins, such as a%inics, cmman"an" cntrl, r %ehicle management systems. By s+ecializing the architecture t the

"main, it is +ssible t increase the "escri+ti%e +(er * structures. S$$& $)*(.$.* (($&'(: hese systems are "eAne" in terms a set * states an" a

set * name" transitins that m%e a system *rm ne state t anther.

HETEROGENEOUS ARCHITECTURES'rchitectural styles can be cmbine" in se%eral (ays3

 /ne (ay is thrugh hierarchy. =am+le3 )-U +i+eline

 !ecn" (ay is t cmbine styles is t +ermit a single cm+nent t use a mi=ture * architectural cnnectrs. =am+le3 acti%e "atabaseD

  hir" (ay is t cmbine styles is t cm+letely elabrate ne le%el * architectural"escri+tin in a cm+letely "i?erent architectural style. =am+le3 case stu"ies

CASE STUDIES

!EYWORD IN CONTET =!WIC> his case stu"y sh(s h( "i?erent architectural slutins t the same +rblem +r%i"e"i?erent beneAts.

Parnas +r+se" the *ll(ing +rblems3*'&C inde+ system accepts an ordered set of lines. Each line is an ordered set of ords and each ord is an ordered set of characters. Any line may becircularly shifted by repeated removing the rst ord and appending it at the end of the line. *'&C inde+ system outputs a listing of all circular shiftsof all lines in alphabetical order.

Parnas use" the +rblem t cntrast "i?erent criteria *r "ecm+sing a system intm"ules.

He "escribes 2 slutins3

a Base" n *unctinal "ecm+sitin (ith share access t "ata re+resentatin.

b Base" n "ecm+sitin that hi"es "esign "ecisin.

Frm the +int * %ie( * !*t(are 'rchitecture, the +rblem is t illustrate the e?ect * changes n s*t(are "esign. He sh(s that "i?erent +rblem "ecm+sitin %ary greatly intheir ability t (ithstan" "esign changes. he changes that are cnsi"ere" by +arnas are3

"3 T%& /%*5&( .* )/&((.*5 5).$%':

g3 line shi*ting can be +er*rme" n each line as it is rea" *rm in+ut "e%ice, n alllines a*ter they are rea" r an "eman" (hen al+habetizatin re@uires a ne( set * shi*te" lines.

23 C%*5&( .* $ )&)&(&*$$.*:

g3 Lines, (r"s, characters can be stre" in "i?erent (ays. Circular shi*ts can bestre" e=+licitly r im+licitly

&arlan, Kaiser an" )tkin als use K0-C +rblem t illustrate m"ularizatin schemes base"n im+licit in%catin. hey cnsi"ere" the *ll(ing.

3 E*%*/&'&*$ $ (($&' +*/$.*:Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G<

Page 46: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 46/180

R ) ! - !/F0'R'RCH-CR )/!

M"i*y the system t eliminate circular shi*t that starts (ith certain nise change thesystem t interacti%e.

;3 P&)+)'*/&:

Bth s+ace an" time

#3 R&(&:

=tent t (hich cm+nents ser%e as reusable entities

Lets utline G architectural "esigns *r K0-C system.

SOLUTION ": MAIN PROGRAMSUBROUTINE WITH SHARED DATA $ecm+se the +rblem accr"ing t G basic *unctins +er*rme".

o -n+ut o 

!hi*t o 

'l+habetize

o ut+ut

 hese cm+utatinal cm+nents are cr"inate" as subrutines by a main +rgramthat se@uence thrugh them in turn.

$ata is cmmunicate" bet(een cm+nents thrugh share" strage.

Cmmunicatin bet(een cm+utatinal cm+nent an" share" "ata is cnstraine" by

rea"E(rite +rtcl.

A1*$5&(:

'll(s "ata t be re+resente" eciently. !ince, cm+utatin can share the same

strage

D.(1*$5&(:

Change in "ata strage *rmat (ill a?ect almst all * the m"ules. Changes in the %erall +rcessing algrithm an" enhancement t system *unctin are

nt easily accmm"ate".

 his "ecm+sitin is nt +articularly su++rt reuse.

SOLUTION 2: ABSTRACT DATA TYPES $ecm+ses he !ystem -nt ' !imilar !et /* Fi%e M"ules.

$ata is n lnger "irectly share" by the cm+utatinal cm+nents.

ach m"ule +r%i"es an inter*ace that +ermits ther cm+nents t access "ata nly

by in%king +rce"ures in that inter*ace.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G9

Page 47: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 47/180

R ) ! - !/F0'R'RCH-CR )/!

A1*$5&:

Bth 'lgrithms an" "ata re+resentatin can be change" in in"i%i"ual m"ules (ithut

a?ecting thers. Reuse is better su++rte" because m"ules make *e(er assum+tin abut the thers

(ith (hich they interact.

D.(1*$5&:

)t (ell suite" *r *unctinal enhancements    a"" ne( *unctins t the system

  m"i*y the e=isting m"ules.

SOLUTION : IMPLICIT INOCATION ses a *rm * cm+nent integratin base" n share" "ata

$i?ers *rm 1st slutin by these t( *actrs o -nter*ace t the "ata is abstract

o Cm+utatins are in%ke" im+licitly as "ata is m"iAe". -nteractins is base" nan acti%e "ata m"el.

A1*$5&(:

!u++rts *unctinal enhancement t the system !u++rts reuse.

D.(1*$5&(:

$icult t cntrl the +rcessing r"er.

Because in%catins are "ata "ri%en, im+lementatin * this kin" * "ecm+sitin

uses mre s+ace.

SOLUTION ;: PIPES AND FILTERS: Fur Alters3 -n+ut, /ut+ut, !hi*t an" al+habetize

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G

Page 48: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 48/180

R ) ! - !/F0'R'RCH-CR )/!

ach Alter +rcess the "ata an" sen"s it t the ne=t Alter

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page GQ

Page 49: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 49/180

R ) ! - !/F0'R'RCH-CR )/!

Cntrl is "istribute" o ach Alter can run (hene%er it has "ata n (hich t cm+ute.

$ata sharing bet(een Alters are strictly limite".

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G8

Page 50: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 50/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <7

Page 51: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 51/180

R ) ! - !/F0'R'RCH-CR )/!

A1*$5&(:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <1

Page 52: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 52/180

(1*$5&(:

OMPARISONS

 

INSTRUMENTATION SOFTWARE:

/scillsc+e als +er*rms measurements n the signals an" "is+laysthem n screen.M"ern scillsc+e has t +er*rm "zens * measurements su++ly megabytes * internal strage.

!u++rt an inter*ace t a net(rk * (rkstatins an" ther instruments an" +r%i"e s+hisuser inter*ace, inclu"ing tuch +anel screen (ith menus, builtE in hel+ *acilities an" clr "is+lays.

Little reuse acrss "i?erent scillsc+e +r"ucts.Per*rmance +rblems (ere increasing because the s*t(are (as nt ra+i"ly cnAgu

&al * the +rect (as t "e%el+ an architectural *rame(rk *r scillsc+e.Result * that (as "main s+eciAc s*t(are architecture that *rme" the basis * the ne=t gene

O LUTION ": OBJECT ORIENTED MODEL$i?erent "ata ty+es use" in scillsc+e are3

ere(as n %erall m"el that e=+laine" h( thety+es At tgether. his le" t cn*usin abut the

+artitining * *unctinality.=3 it is nt clearly"eAne" that measurements t be assciate" (ith

+es * "ata being measure"r re+resente"

=ternally. 

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <2

Page 53: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 53/180

R ) ! - !/F0'R'RCH-CR )/!

-t maintains initiati%e >( * +rcessing

-t su++rts reuse

)e( *unctins can be easily a""e" t the system by inserting Alters at a++r+riate

le%el. -t is easy t m"i*y.

-m+ssible t m"i*y the "esign t su++rt an interacti%e system.   !lutin uses

s+ace ineciently.

 $escribes the in"ustrial "e%el+ment * s*t(are architecture.

   he +ur+se * the +rect (as t "e%el+ a reusable system architecture *rscillsc+e

 /scillsc+e is an instrumentatin system that sam+les electrical signals an" "is+lays+ictures * them n screen.

 

  

 Prblems *ace"3

 

  (ithin theinstrument.

 

 

scillsc+es.

0a%e*rms

!ignals

Measurements

 rigger m"es s n

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <#

Page 54: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 54/180

R ) ! - !/F0'R'RCH-CR )/!

SOLUTION 2: LAYERED MODEL   crrect the +rblems by +r%i"ing a layere" m"el * an scillsc+e.

  CreElayer3 im+lemente" in har"(are re+resents signal mani+ulatin *unctins that

Alter signals as they enter the scillsc+e.  -nitially the layere" m"el (as a++ealing since it +artitine" the *unctins * an

scillsc+e int (ell "eAne" gru+s.

 But, it (as a (rng m"el *r the a++licatin "main. Because, the +rblem (as thatthe bun"aries * abstractin en*rce" by the layers cn>icte" (ith the nee"s *rinteractin amng %arius *unctins.

SOLUTION : PIPE-AND-FILTER MODEL: -n this a++rach scillsc+e *unctins (ere %ie(e" as incremental

trans*rmers * "ata. o !ignal trans*rmer3 t cn"itin e=ternal signal.

o 'c@uisitin trans*rmer3 t "eri%e "igitize" (a%e*rms o $is+lay

trans*rmers3 t cn%ert (a%e*rms int %isual "ata.

  -t is im+r%ement %er layere" m"el as it "i" nt islate the *unctins in se+arate+artitin.

 Main +rblem (ith this m"el is that o  -t is ntclear h( the user shul" interact (ith it.

SOLUTION ;: MODIFIED PIPE-AND-FILTER MODEL:  %ercme the ab%e sai" +rblem, assciate cntrl inter*ace (ith each Alter that all(e"e=ternal entity t set +arameters * +eratin *r the Alter.

-ntr"uctin * cntrl inter*ace sl%es a large +art * the user inter*ace +rblem

-t +r%i"es cllectin * setting that "etermines (hat as+ect * the scillsc+e can be

m"iAe" "ynamically by the user.

-t e=+lains h( user can change *unctins by incremental a"ustments t the s*t(are.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <G

Page 55: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 55/180

R ) ! - !/F0'R'RCH-CR )/!

FURTHER SPECIALI@ATION he ab%e "escribe" m"el is greater im+r%ement %er the +ast. But, the main +rblem(ith this is the +er*rmance.

a! $ecause waveform occupy large amount of internal storage

-t is nt +ractical *r each Alter t c+y (a%e*rms e%ery time they +rcess them.

b! 'i(erent lters run at di(erent speeds

-t is unacce+table t sl( ne Alter "(n because anther Alter is still +rcessing its "ata.

  %ercme the ab%e "iscusse" +rblems the m"el is *urther s+ecialize".

-nstea" * using same kin" * +i+e. 0e use "i?erent clrsD * +i+e. all( "ata t be+rcesse" (ithut c+ying, sl( Alters t ignre incming "ata.

 hese a""itinal +i+es increase" the stylistic %cabulary an" all(e" +i+eSAltercm+utatins t be tailre" mre s+eciAcally t the +er*rmance nee"s * the +r"uct.

MOBILE ROBOTICS

M.& R$./ (($&'( Cntrls a manne" r semiEmanne" %ehicle o .g., car, s+ace %ehicle, etc

se" in s+ace e=+lratin missins

Hazar"us (aste "is+sal

n"er(ater e=+lratin

T%& (($&' .( /'&

Real ime res+n"

in+ut *rm %arius sensrs

Cntrlling the mtin an" m%ement * rbts

Planning its *uture +athSm%e

U*)&./$..$ + &*1.)*'&*$

/bstacles blcking rbt +ath

!ensr may be im+er*ect

P(er cnsum+tin

 Res+n" t hazar"us material an" situatins

DESIGN CONSIDERATIONS RE<": !u++rts "eliberate an" reacti%e beha%ir. Rbt must cr"inate the actins t

accm+lish its missin an" reactins t une=+ecte" situatins

RE<2: 'll(s uncertainty an" un+re"ictability * en%irnment. he situatins are nt

*ully "eAne" an"Sr +re"icable. he "esign shul" han"le incm+lete an" unreliable

in*rmatin RE<:  !ystem must cnsi"er +ssible "angerus +eratins by Rbt an"

en%irnment

RE<;:  he system must gi%e the "esigner >e=ibility missins changeSre@uirement

changes

SOLUTION ": CONTROL LOOP R&":  an a"%antage * the clse" l+ +ara"igm is its sim+licity   it ca+tures the

basic interactin bet(een the rbt an" the utsi"e.

R&2: cntrl l+ +ara"igm is biase" t(ar"s ne meth"  re"ucing the unkn(ns

thrugh iteratin

R&:  *ault tlerance an" sa*ety are su++rte" (hich makes "u+licatin easy an"

re"uces the chances * errrs

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <<

Page 56: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 56/180

R ) ! - !/F0'R'RCH-CR )/!

R&;: the mar cm+nents * a rbt architecture are se+arate" *rm each ther an"

can be re+lace" in"e+en"ently

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <9

Page 57: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 57/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <

Page 58: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 58/180

R ) ! - !/F0'R'RCH-CR )/!

R&": it %ercmes the limitatins * cntrl l+ an" it "eAnes abstractin le%els t

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <Q

Page 59: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 59/180

R ) ! - !/F0'R'RCH-CR )/!

R&": it %ercmes the limitatins * cntrl l+ an" it "eAnes abstractin le%els t gui"e

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <8

Page 60: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 60/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 97

Page 61: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 61/180

R ) ! - !/F0'R'RCH-CR )/!

 system nS?, engine nS?, brake an" resume in+uts als ha%ea bearing   &ontrolled variable sensor 3  m"elle" n "ata *rm (heel+ulses an" clck

F.5)& 3"8 /*$) )/%.$&/$)& +) /).(& /*$)

 he acti%eSinacti%e tggle is triggere" by a %ariety * e%ents, s a state transitin "esign is

natural. -ts sh(n in Figure #.18. he system is cm+letely ? (hene%er the engine is ?.

/ther(ise there are three inacti%e an" ne acti%e state.

F.5)& 3"9 ($$& '/%.*& +) /$.1$.*

0e can n( cmbine the cntrl architecture, the state machine *r acti%atin, an" thee%ent table *r "etermining the set +int int an entire system.

F.5)& 32" /'&$& /).(& /*$) (($&'

ANALYSIS AND DISCUSSION6-ntereste" stu"ents can re*er te=t bk since this has nt been aske" in e=am till "ate:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 91

Page 62: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 62/180

 

uleE base" systems make hea%y use * +atternmatching an" cnte=t currently rele%ant rules. '""ing s+ecialmechanisms *r these *acilities tthe "esign lea"s t the mre cm+licate" %ie( sh(n in Figure 22.

V he kn(le"ge base remains arelati%ely sim+le memry structure,merely gaining substructure t

R ) ! - !/F0'R'RCH-CR )/!

THREE IGNETTES IN MIED STYLE

A LAYERED DESIGN WITH DIFFERENT STYLES FOR THE LAYERS

ach le%el crres+n"s t a "i?erent +rcess management *unctin (ith its (n "ecisinEsu++rt re@uirements.

 L&1& ": Prcess measurement an" cntrl3 "irect a"ustment * Anal cntrl elements.

 L&1& 2: Prcess su+er%isin3 +eratins cnsle *r mnitring an" cntrlling Le%el 1.

  L&1& :  Prcess management3 cm+uterEbase" +lant autmatin, inclu"ingmanagement re+rts, +timizatin strategies, an" gui"ance t +eratins cnsle.

 L&1&( ; * #: Plant an" cr+rate management3 higherEle%el *unctins such as cst

accunting, in%entry cntrl, an" r"er +rcessingSsche"uling.

Figure 27 sh(s the cannical *rm * a +int

"eAnitinI se%en s+ecialize" *rms su++rt the

mst cmmn kin"s * cntrl. Pints are, in

essence, bectEriente" "esign elements that

enca+sulate in*rmatin abut cntrl +ints * the

+rcess. $ata assciate" (ith a +int

inclu"es3 /+erating +arameters, inclu"ing

current +rcess %alue, set +int target %alue,

%al%e ut+ut, an" m"e autmatic r manualI uning +arameters, such as gain, reset, "eri%ati%e,

an" alarm tri+E+intsI CnAguratin

+arameters, inclu"ing tag name an" -S/ channels.

 

AN INTERPRETER USING DIFFERENT IDIOMS FOR THE COMPONENTSRuleEbase" systems +r%i"e a means * c"i*ying the +rblemEsl%ing kn(h( * humane=+erts. hese e=+erts ten" t ca+ture +rblemEsl%ing techni@ues as sets * situatinEactinrules (hse e=ecutin r acti%atin is se@uence" in res+nse t the cn"itins * thecm+utatin rather than by a +re"etermine" scheme. !ince these rules are nt "irectly

e=ecutable by a%ailable cm+uters, systems *r inter+reting such rules must be +r%i"e".HayesERth sur%eye" the architecture an" +eratin * ruleEbase" systems.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 92

Page 63: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 63/180

R ) ! - !/F0'R'RCH-CR )/!

 he basic *eatures * a ruleEbase" system,

sh(n in HayesERths ren"ering as Figure 21,

are essentially the *eatures * a tableE"ri%en

inter+reter, as utline" earlier.

V he pseudo-code t be e=ecute", in this case thekn(le"ge base

V he interpretation engine in this case the ruleinter+reter, the heart * the in*erence engine

V he control state of the interpretation engine inthis case the rule an" "ata element selectr

V he current state of the program running n the%irtual machine, in this case the (rking memry.

 

0e see that3

"istinguish acti%e *rm inacti%e cntents.

V he rule inter+reter is e=+an"e" (ith theinter+reter i"im, (ith cntrl +rce"ures +layingthe rle * the +seu"Ec"e t be e=ecute" an"the e=ecutin stack the rle * the current+rgram state.

V Rule an" "ata element selectinD isim+lemente" +rimarily as a +i+eline that+rgressi%ely trans*rms acti%e rules an" *acts t

+riritize" acti%atins. V 0rking memry is nt*urther elabrate".

R ) ! - !/F0'R

'RCH-CR )/!

)- 2 N!-/) B')K

N

3

<UESTION YEAR MAR! 

S

1 =+lain the architecture styles base" n3

i$ata abstractin an" bectEriente" rganizatin

iie%entEbase", im+licit in%catin

$ec78

17

2 0hat are the basic re@uirements *r mbile rbt architectureJ $ec78

G

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9#

Page 64: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 64/180

 

A BLAC!BOARD GLOBALLY RECAST ASAN INTERPRETER he blackbar" m"el * +rblem sl%ing is a highly structure" s+ecial case * ++rtunistic +rblem sl%in

-n this m"el, the slutin s+ace is rganize"int se%eral a++licatinE "e+en"ent hierarchies an" the "kn(le"ge is+artitine" int in"e+en"ent m"ules * kn(le"ge that +erate nkn(le"ge (ithin an"bet(een le%els. Figure2G sh(e" the basic architecture * a blackbar" system an" utline" its thr+arts3 kn(le"ge surces, the blackbar" "ata structure, an" cntrl.

 

 he Arst mar blackbar" system (asH'R!'5E -- s+eech recgnitinsystem. )iis

schematic * the H'R!'5E -- architecture2G.a++ears Figureas he blackbar"

structure is a si=E t eightE le%el hierarchy in(hich each le%elabstracts in*rmatin n it

a"acent l(er le%el an" blackbar" elere+resent hy+theses abut the inter+retat* an utterance.

H'R!'5E -- (as im+lemente" bet(een 18an" 189I these machines (ere nt "irectca+able * cn"itinE triggere" cntrl, s it

shul" nt be sur+rising t An" that aim+lementatin +r%i"es themechanisms * a

%irtual machine that realizes the im+liin%catin semantics re@uire" by theblackbar" m"el.

 - ntereste" stu"ents can re*er te=t bk *r blackb

an" inter+reter %ie( * H'R!'5 --(hich is similar tab%e Agure

R ) ! - !/F0'R'RCH-CR )/!

# =+lain the cntrl l+ slutin *r a mbile rbt $ec78

9

G $eAne architectural style. Mentin any *ur cmmnly use" styles Tune17

G

< Cnsi"er the case stu"y * buil"ing a s*t(are cntrlle" mbile rbt.$escribe its challenging +rblems an" "esign cnsi"eratins (ith *urre@uirements. Finally gi%e the slutin by layere" architecture *r allthe *ur re@uirements.

 Tune17

19

9 $eAne the *ll(ing (ith an

e=am+le3 icntrlle" %ariable

iiset +int iii+en l+ system

i%*ee"back cntrl system

%*ee" *r(ar" cntrl system

$ec17

17

!tate the +rblem * K0-C. Pr+se im+licit in%catin an" +i+es an"Alters style t im+lement a slutin *r the same

$ec17

17

Q $iscuss the im+rtance an" a"%antages * the *ll(ing architecturalstyles (ith re*erence t an a++r+riate a++licatin area

 Tune11

Q

8 List ut the "esign cnsi"eratins *r mbile rbtics case stu"y. 0iththe hel+ * the "esign cnsi"eratins, e%aluate the +rs an" cns * 

the layere" architecture an" im+licit in%catin architecture *r mbilerbts

 Tune11

12

17 $iscuss the in%ariants, a"%antages an" "isa"%antages * +i+es an"Alters architectural style

$ec11

8

11 0hat are the basic re@uirements *r a mbile rbts architectureJ H(the im+licit in%catin m"el han"les themJ

$ec11

Q

12 0rite a nte n hetergeneus architectures $ec11

#

1# =+lain the +rcess cntrl +ara"igm (ith %arius +rcess cntrl"eAnitins

 Tune12

9

1G List the basic re@uirements *r mbile rbt architecture Tune12

G

1< =+lain the +rcess cntrl %ie( * cruise cntrl architectural style an"btain the cm+lete cruise cntrl system

 Tune12

17

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #1

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9G

Page 65: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 65/180

R ) ! - !/F0'R'RCH-CR )/!

)- #N'L-5

;3" FUNCTIONALITY AND ARCHITECTUREF*/$.*.$3 -t is the ability * the system t " the (rk *r (hich it (as inten"e".

' task re@uires that many r mst * the systems elements (rk in a cr"inate" manner tcm+lete the b, ust as *ramers, electricians, +lumbers, "ry(all hangers, +ainters, an" Anishcar+enters all cme tgether t c+erati%ely buil" a huse.

S+$)& )/%.$&/$)&  cnstrains its allcatin t structure (hen other @uality attributesare im+rtant.

;32 ARCHITECTURE AND <UALITY ATTRIBUTES'chie%ing @uality attributes must be cnsi"ere" thrughut "esign, im+lementatin, an""e+lyment. ) @uality attribute is entirely "e+en"ent n "esign, nr is it entirely "e+en"entn im+lementatin r "e+lyment. Fr e=am+le3

• sability in%l%es bth architectural an" nnEarchitectural as+ects

• M"iAability is "etermine" by h( *unctinality is "i%i"e" architectural an" by c"ingtechni@ues (ithin a m"ule nnEarchitectural.

• Per*rmance in%l%es bth architectural an" nnEarchitectural "e+en"encies he message* this sectin is t(*l"3

'rchitecture is critical t the realizatin * many @ualities * interest in a system, an"these @ualities shul" be "esigne" in an" can be e%aluate" at the architectural le%el

'rchitecture, by itsel*, is unable t achie%e @ualities. -t +r%i"es the *un"atin *r achie%ing@uality.

;3 SYSTEM <UALITY ATTRIBUTES

<UALITY ATTRIBUTE SCENARIOS' @uality attribute scenari is a @ualityEattributeEs+eciAc re@uirement. -t cnsists * si= +arts.

1 %ource of stimulus!  his is sme entity a human, a cm+uter system, r any theractuatr that generate" the stimulus.

2 %timulus! he stimulus is a cn"itin that nee"s t be cnsi"ere" (hen it arri%es at a

system.# Environment.  he stimulus ccurs (ithin certain cn"itins. he system may be in an

%erla" cn"itin r may be running (hen the stimulus ccurs, r sme thercn"itin may be true.

G  Artifact ! !me arti*act is stimulate". his may be the (hle system r sme +ieces * it.

< esponse! he res+nse is the acti%ity un"ertaken a*ter the arri%al * the stimulus.

9 esponse measure.  0hen the res+nse ccurs, it shul" be measurable in sme*ashin s that the re@uirement can be teste".

Figure G.1 sh(s the +arts * a @uality attribute scenari.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9<

Page 66: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 66/180

 

R ) ! - !/F0'R'RCH-CR )/!

<UALITY ATTRIBUTE SCENARIOS IN PRACTICE

AAILABILITY SCENARIOA1...$ is cncerne" (ith system *ailure an" its assciate" cnse@uences

Failures are usually a result * system errrs that are "eri%e" *rm *aults in the system.

-t is ty+ically "eAnes as

%ource of stimulus! 0e "i?erentiate bet(een internal an" e=ternal in"icatins * *aults r*ailure since the "esire" system res+nse may be "i?erent. -n ur e=am+le, the une=+ecte"message arri%es *rm utsi"e the system.

%timulus. ' *ault * ne * the *ll(ing classes ccurs.

E omission! ' cm+nent *ails t res+n" t an in+ut.

E crash! he cm+nent re+eate"ly su?ers missin *aults.

E timing! ' cm+nent res+n"s but the res+nse is early r late. E response! 'cm+nent res+n"s (ith an incrrect %alue.

 Artifact.  his s+eciAes the resurce that is re@uire" t be highly a%ailable, such as a+rcessr, cmmunicatin channel, +rcess, r strage.

Environment ! he state * the system (hen the *ault r *ailure ccurs may als a?ect the"esire" system res+nse. Fr e=am+le, i* the system has alrea"y seen sme *aults an" is+erating in ther than nrmal m"e, it may be "esirable t shut it "(n ttally. H(e%er, i* this is the Arst *ault bser%e", sme "egra"atin * res+nse time r *unctin may be+re*erre". -n ur e=am+le, the system is +erating nrmally.

esponse.  here are a number * +ssible reactins t a system *ailure. hese inclu"elgging the *ailure, nti*ying selecte" users r ther systems, s(itching t a "egra"e" m"e(ith either less ca+acity r less *unctin, shutting "(n e=ternal systems, r becminguna%ailable "uring re+air. -n ur e=am+le, the system shul" nti*y the +eratr * theune=+ecte" message an" cntinue t +erate nrmally.

esponse measure.  he res+nse measure can s+eci*y an a%ailability +ercentage, r it cans+eci*y a time t re+air, times "uring (hich the system must be a%ailable, r the "uratin *r(hich the system must be a%ailable

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 99

Page 67: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 67/180

 

R ) ! - !/F0'R'RCH-CR )/!

MODIFIABILITY SCENARIOM"iAability is abut the cst * change. -t brings u+ t( cncerns.

What can change )the artifact*?

When is the change made and who makes it )the environment*?

%ource of stimulus!  his +rtin s+eciAes (h makes the changesthe "e%el+er, asystem a"ministratr, r an en" user. Clearly, there must be machinery in +lace t all( thesystem a"ministratr r en" user t m"i*y a system, but this is a cmmn ccurrence. -nFigure G.G, the m"iAcatin is t be ma"e by the "e%el+er. %timulus.  his +rtin s+eciAesthe changes t be ma"e. ' change can be the a""itin * a *unctin, the m"iAcatin * ane=isting *unctin, r the "eletin * a *unctin. -t can als be ma"e t the @ualities * thesystemmaking it mre res+nsi%e, increasing its a%ailability, an" s *rth. he ca+acity * the system may als change. -ncreasing the number * simultaneus users is a *re@uentre@uirement. -n ur e=am+le, the stimulus is a re@uest t make a m"iAcatin, (hich can bet the *unctin, @uality, r ca+acity.

 Artifact.  his +rtin s+eciAes (hat is t be change"the *unctinality * a system, its+lat*rm, its user inter*ace, its en%irnment, r anther system (ith (hich it inter+erates. -nFigure G.G, the m"iAcatin is t the user inter*ace.

Environment.  his +rtin s+eciAes (hen the change can be ma"e"esign time, cm+iletime, buil" time, initiatin time, r runtime. -n ur e=am+le, the m"iAcatin is t ccur at"esign time.

esponse. 0he%er makes the change must un"erstan" h( t make it, an" then make it,test it an" "e+ly it. -n ur e=am+le, the m"iAcatin is ma"e (ith n si"e e?ects.

esponse measure! 'll * the +ssible res+nses take time an" cst mney, an" s timean" cst are the mst "esirable measures. ime is nt al(ays +ssible t +re"ict, h(e%er,an" s less i"eal measures are *re@uently use", such as the e=tent * the change number * m"ules a?ecte". -n ur e=am+le, the time t +er*rm the m"iAcatin shul" be less thanthree hurs.

PERFORMANCE SCENARIO:

Per*rmance is abut timing. %ents interru+ts, messages, re@uests *rm users, r the+assage * time ccur, an" the system must res+n" t them. here are a %ariety * characterizatins * e%ent arri%al an" the res+nse but basically +er*rmance is cncerne"(ith h( lng it takes the system t res+n" (hen an e%ent ccurs.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9

Page 68: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 68/180

 

R ) ! - !/F0'R'RCH-CR )/!

%ource of stimulus!  he stimuli arri%e either *rm e=ternal +ssibly multi+le r internalsurces. -n ur e=am+le, the surce * the stimulus is a cllectin * users.

%timulus.  he stimuli are the e%ent arri%als. he arri%al +attern can be characterize" as+eri"ic, stchastic, r s+ra"ic. -n ur e=am+le, the stimulus is the stchastic initiatin * 1,777 transactins +er minute. Artifact ! he arti*act is al(ays the systems ser%ices, as it is

in ur e=am+le.Environment ! he system can be in %arius +eratinal m"es, such as nrmal, emergency,r %erla". -n ur e=am+le, the system is in nrmal m"e.

esponse!  he system must +rcess the arri%ing e%ents. his may cause a change in thesystem en%irnment e.g., *rm nrmal t %erla" m"e. -n ur e=am+le, the transactinsare +rcesse".

esponse measure!  he res+nse measures are the time it takes t +rcess the arri%inge%ents latency r a "ea"line by (hich the e%ent must be +rcesse", the %ariatin in thistime itter, the number * e%ents that can be +rcesse" (ithin a +articular time inter%althrugh+ut, r a characterizatin * the e%ents that cannt be +rcesse" miss rate, "atalss. -n ur e=am+le, the transactins shul" be +rcesse" (ith an a%erage latency * t(

secn"s.

SECURITY SCENARIO!ecurity is a measure * the systems ability t resist unauthrize" usage (hile still +r%i"ingits ser%ices t legitimate users. 'n attem+t t breach security is calle" an attack  an" cantake a number * *rms. -t may be an unauthrize" attem+t t access "ata r ser%ices r tm"i*y "ata, r it may be inten"e" t "eny ser%ices t legitimate users.

!ecurity can be characterize" as a system +r%i"ing nnEre+u"iatin, cnA"entiality,integrity, assurance, a%ailability, an" au"iting. Fr each term, (e +r%i"e a "eAnitin an" ane=am+le.

 N*-)&.$.* is the +r+erty that a transactin access t r m"iAcatin * "atar ser%ices cannt be "enie" by any * the +arties t it. his means yu cannt "enythat yu r"ere" that item %er the -nternet i*, in *act, yu "i".

 C*&*$..$ is the +r+erty that "ata r ser%ices are +rtecte" *rm unauthrize"access. his means that a hacker cannt access yur incme ta= returns n ag%ernment cm+uter.

  I*$&5).$ is the +r+erty that "ata r ser%ices are being "eli%ere" as inten"e". hismeans that yur gra"e has nt been change" since yur instructr assigne" it.

 A(()*/& is the +r+erty that the +arties t a transactin are (h they +ur+rt t be. his means that, (hen a custmer sen"s a cre"it car" number t an -nternet merchant,the merchant is (h the custmer thinks they are.

 A1...$ is the +r+erty that the system (ill be a%ailable *r legitimate use. hismeans that a "enialE*Eser%ice attack (nt +re%ent yur r"ering this bk.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9Q

Page 69: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 69/180

 

R ) ! - !/F0'R'RCH-CR )/!

 A.$.*5 is the +r+erty that the system tracks acti%ities (ithin it at le%els sucient trecnstruct them. his means that, i* yu trans*er mney ut * ne accunt t antheraccunt, in !(itzerlan", the system (ill maintain a recr" * that trans*er.

ach * these security categries gi%es rise t a cllectin * general scenaris.

%ource of stimulus! he surce * the attack may be either a human r anther system. -tmay ha%e been +re%iusly i"entiAe" either crrectly r incrrectly r may be currentlyunkn(n.

%timulus.  he stimulus is an attack r an attem+t t break security. 0e characterize this asan unauthrize" +ersn r system trying t "is+lay in*rmatin, change an"Sr "eletein*rmatin, access ser%ices * the system, r re"uce a%ailability * system ser%ices. -nFigure, the stimulus is an attem+t t m"i*y "ata.

 Artifact ! he target * the attack can be either the ser%ices * the system r the "ata (ithinit. -n ur e=am+le, the target is "ata (ithin the system.

Environment.  he attack can cme (hen the system is either nline r Wine, eithercnnecte" t r "iscnnecte" *rm a net(rk, either behin" a Are(all r +en t the

net(rk.esponse! sing ser%ices (ithut authrizatin r +re%enting legitimate users *rm usingser%ices is a "i?erent gal *rm seeing sensiti%e "ata r m"i*ying it. hus, the system mustauthrize legitimate users an" grant them access t "ata an" ser%ices, at the same timereecting unauthrize" users, "enying them access, an" re+rting unauthrize" access

esponse measure! Measures * a systems res+nse inclu"e the "iculty * munting%arius attacks an" the "iculty * rec%ering *rm an" sur%i%ing attacks. -n ur e=am+le,the au"it trail all(s the accunts *rm (hich mney (as embezzle" t be restre" t theirriginal state.

TESTABILITY SCENARIO:

!*t(are testability re*ers t the ease (ith (hich s*t(are can be ma"e t "emnstrate its*aults thrugh testing. -n +articular, testability re*ers t the +rbability, assuming that thes*t(are has at least ne *ault that it (ill *ail n its next test e=ecutin. esting is "ne by%arius "e%el+ers, testers, %eriAers, r users an" is the last ste+ * %arius +arts * thes*t(are li*e cycle. Prtins * the c"e, the "esign, r the cm+lete system may be teste".

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 98

Page 70: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 70/180

 

R ) ! - !/F0'R'RCH-CR )/!

%ource of stimulus!  he testing is +er*rme" by unit testers, integratin testers, systemtesters, r the client. ' test * the "esign may be +er*rme" by ther "e%el+ers r by ane=ternal gru+. -n ur e=am+le, the testing is +er*rme" by a tester.

%timulus.  he stimulus *r the testing is that a milestne in the "e%el+ment +rcess is met.

 his might be the cm+letin * an analysis r "esign increment, the cm+letin * a c"ingincrement such as a class, the cm+lete" integratin * a subsystem, r the cm+letin * the(hle system. -n ur e=am+le, the testing is triggere" by the cm+letin * a unit * c"e.

 Artifact ! ' "esign, a +iece * c"e, r the (hle system is the arti*act being teste". -n ure=am+le, a unit * c"e is t be teste".

Environment.  he test can ha++en at "esign time, at "e%el+ment time, at cm+ile time, rat "e+lyment time. -n Figure, the test ccurs "uring "e%el+ment.

esponse! !ince testability is relate" t bser%ability an" cntrllability, the "esire" res+nseis that the system can be cntrlle" t +er*rm the "esire" tests an" that the res+nse teach test can be bser%e". -n ur e=am+le, the unit can be cntrlle" an" its res+nsesca+ture".

esponse measure! Res+nse measures are the +ercentage * statements that ha%e beene=ecute" in sme test, the length * the lngest test chain a measure * the "iculty * +er*rming the tests, an" estimates * the +rbability * An"ing a""itinal *aults. -n Figure,the measurement is +ercentage c%erage * e=ecutable statements.

USABILITY SCENARIOsability is cncerne" (ith h( easy it is *r the user t accm+lish a "esire" task an" thekin" * user su++rt the system +r%i"es. -t can be brken "(n int the *ll(ing areas3 "earning system features! -* the user is un*amiliar (ith a +articular system r a +articular

as+ect * it, (hat can the system " t make the task * learning easierJ

 !sing a system e/ciently ! 0hat can the system " t make the user mre ecient in its

+eratinJ Minimi#ing the impact of errors. 0hat can the system " s that a user errr has minimalim+actJ  Adapting the system to user needs! H( can the user r the system itsel* a"a+t t makethe users task easierJ &ncreasing condence and satisfaction! 0hat "es the system " t gi%e the user cnA"ence

that the crrect actin is being takenJ

' user, (anting t minimize the im+act * an errr, (ishes t cancel a system +eratin atruntimeI cancellatin takes +lace in less than ne secn". he +rtins * the usabilitygeneral scenaris are3

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 7

Page 71: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 71/180

  

-* there is cm+etiti%e +ressure r a shrt (in"( * ++rtunity *r a system r +r"uct, "

 

 he "e%el+ment e?rt (illnaturally ha%e a bu"get that must nt be e=cee"e". $i?erent architec(ill yiel" "i?erent "e%el+ment csts. Fr instance, an architecture that relies n techn

e=+ertise (ith a technlgy nt resi"ent in the "e%el+ing rganizatin (ill bemre e=+ensi%e trealize than ne that takes a"%antage * assets alrea"y inhuse. 'n architecture that is hig

(ill ty+ically be mre cstly t buil" than ne that is rigi" althugh it (ill be less cstly t

 

-* the system is inten"e" t ha%e a lng li*etime, m"iAability, scalability, an" +rtabilityim+rtant. /n the ther han", a m"iAable, e=tensible +r"uct is mre likely t sur%i%e ln

 

Fr generalE +ur+se massE market s*t(are, the +lat*rms n (hich a system runs as (ell as*eature set (ill "etermine the size * the +tential market. hus, +rtability an" *unctinalit

 

-* a +r"uct is t be intr"uce" as base *unctinality (ith many *eatures release" later, thean" custmizability * the architecture are im+rtant. Particularly, the system must be cnstructe" (ith

 

-* the ne( system has tintegrate (ith e=isting systems, care must be taken t "eAne a++r+riaintegratin mechanisms. his +r+e rty is clearly * marketing im+rtance but has substantial

  C*/&$ .*$&5).$is the un"erlying theme r %isin that uniAes the "esign * the system at all

  C))&/$*&((* /'&$&*&(( are essential *r the architecture t all( *r all * the system

  B...$ all(s the system t be cm+lete" by the a%ailable team in a timely manner an" t be +en

 actics can reAne ther tactics. Fr each @uality attribute that (e "iscuss, (e rganize the tactics

R ) ! - !/F0'R'RCH-CR )/!

%ource of stimulus! he en" user is al(ays the surce * the stimulus.

%timulus! he stimulus is that the en" user (ishes t use a system eciently, learn t usethe system, minimize the im+act * errrs, a"a+t the system, r *eel cm*rtable (ith thesystem. -n ur e=am+le, the user (ishes t cancel an +eratin, (hich is an e=am+le * minimizing the im+act * errrs.

 Artifact ! he arti*act is al(ays the system.

Environment ! he user actins (ith (hich usability is cncerne" al(ays ccur at runtime rat system cnAguratin time. -n Figure, the cancellatin ccurs at runtime.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1

Page 72: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 72/180

R ) ! - !/F0'R'RCH-CR )/!

%timulus! he stimulus is that the en" user (ishes t use a system eciently, learn t usethe system, minimize the im+act * errrs, a"a+t the system, r *eel cm*rtable (ith thesystem. -n ur e=am+le, the user (ishes t cancel an +eratin, (hich is an e=am+le * minimizing the im+act * errrs.

 Artifact ! he arti*act is al(ays the system.

Environment ! he user actins (ith (hich usability is cncerne" al(ays ccur at runtime rat system cnAguratin time. -n Figure, the cancellatin ccurs at runtime.

esponse! he system shul" either +r%i"e the user (ith the *eatures nee"e" r antici+atethe users nee"s. -n ur e=am+le, the cancellatin ccurs as the user (ishes an" the systemis restre" t its +rir state.

esponse measure! he res+nse is measure" by task time, number * errrs, number * +rblems sl%e", user satis*actin, gain * user kn(le"ge, rati * success*ul +eratins tttal +eratins, r amunt * timeS"ata lst (hen an errr ccurs. -n Figure, the cancellatinshul" ccur in less than ne secn".

COMMUNICATING CONCEPTS USING GENERAL SCENARIOS/ne * the uses * general scenaris is t enable stakehl"ers t cmmunicate.  able G.gi%es the stimuli +ssible *r each * the attributes an" sh(s a number * "i?erentcnce+ts. !me stimuli ccur "uring runtime an" thers ccur be*re. he +rblem *r thearchitect is t un"erstan" (hich * these stimuli re+resent the same ccurrence, (hich areaggregates * ther stimuli, an" (hich are in"e+en"ent.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 2

Page 73: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 73/180

  

-* there is cm+etiti%e +ressure r a shrt (in"( * ++rtunity *r a system r +r"uct, "

 

 he "e%el+ment e?rt (illnaturally ha%e a bu"get that must nt be e=cee"e". $i?erent architec(ill yiel" "i?erent "e%el+ment csts. Fr instance, an architecture that relies n techn

e=+ertise (ith a technlgy nt resi"ent in the "e%el+ing rganizatin (ill bemre e=+ensi%e trealize than ne that takes a"%antage * assets alrea"y inhuse. 'n architecture that is hig(ill ty+ically be mre cstly t buil" than ne that is rigi" althugh it (ill be less cstly t

 -* the system is inten"e" t ha%e a lng li*etime, m"iAability, scalability, an" +rtability

im+rtant. /n the ther han", a m"iAable, e=tensible +r"uct is mre likely t sur%i%e ln

 

Fr generalE +ur+se massE market s*t(are, the +lat*rms n (hich a system runs as (ell as*eature set (ill "etermine the size * the +tential market. hus, +rtability an" *unctinalit

 

-* a +r"uct is t be intr"uce" as base *unctinality (ith many *eatures release" later, thean" custmizability * the architecture are im+rtant. Particularly, the system must be cnstructe" (ith

 

-* the ne( system has tintegrate (ith e=isting systems, care must be taken t "eAne a++r+riaintegratin mechanisms. his +r+e rty is clearly * marketing im+rtance but has substantial

  C*/&$ .*$&5).$is the un"erlying theme r %isin that uniAes the "esign * the system at all

  C))&/$*&((* /'&$&*&(( are essential *r the architecture t all( *r all * the system

  B...$ all(s the system t be cm+lete" by the a%ailable team in a timely manner an" t be +en

 actics can reAne ther tactics. Fr each @uality attribute that (e "iscuss, (e rganize the tactics

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page #

Page 74: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 74/180

R ) ! - !/F0'R'RCH-CR )/!

;3# OTHER SYSTEM <UALITY ATTRIBUTES !C'L'B-L-5

 P/R'B-L-5

;36 BUSINESS <UALITIESTime to market. 

time becmes im+rtant. his in turn lea"s t +ressure t buy r ther(ise reEuse

e=isting elements. Cost and benet. an" m"i*y.

$ro0ected lifetime of the system.

market+lace, e=ten"ing its li*etime.Targeted market.

market share. /ther @ualities, such as +er*rmance, reliability, an" usability als+lay a rle. ollout schedule.

ease * e=+ansin an" cntractin in

min". &ntegration ith legacy

systems. architectural im+licatins.

;37 ARCHITECTURE <UALITIES

 he architecture shul" " similar things in similar

(ays. re@uirements an" runtime resurce

cnstraints t be met. t certain changes as

"e%el+ment +rgresses.

#3" INTRODUCING TACTICS' $/$./ is a "esign "ecisin that in>uences the cntrl * a @uality attribute res+nse.

Figure 5.1. Tactics are intended to control responses to stimuli.

hierarchy.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page G

Page 75: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 75/180

 

R ) ! - !/F0'R'RCH-CR )/!

"atterns package tactics! ' +attern that su++rts a%ailability (ill likely use bth are"un"ancy tactic an" a synchrnizatin tactic.

#32 AAILABILITY TACTICS

 he ab%e Agure "e+icts gal * a%ailability tactics. 'll a++raches t maintaininga%ailability in%l%e sme ty+e * re"un"ancy, sme ty+e * health mnitring t "etecta *ailure, an" sme ty+e * rec%ery (hen a *ailure is "etecte". -n sme cases, themnitring r rec%ery is autmatic an" in thers it is manual.

FAULT DETECTION

$ing1echo! /ne cm+nent issues a +ing an" e=+ects t recei%e back an ech,(ithin a +re"eAne" time, *rm the cm+nent un"er scrutiny. his can be use"(ithin a gru+ * cm+nents mutually res+nsible *r ne task

2eartbeat 3dead man timer4. -n this case ne cm+nent emits a heartbeatmessage +eri"ically an" nther cm+nent listens *r it. -* the heartbeat *ails,the riginating cm+nent is assume" t ha%e *aile" an" a *ault crrectincm+nent is ntiAe". he heartbeat can als carry "ata.

E+ceptions! he e=ce+tin han"ler ty+ically e=ecutes in the same +rcess thatintr"uce" the e=ce+tin.

FAULT RECOERY

5oting. Prcesses running n re"un"ant +rcessrs each take e@ui%alent in+ut an"

cm+ute a sim+le ut+ut %alue that is sent t a %ter. -* the %ter "etects "e%iantbeha%ir *rm a single +rcessr, it *ails it.

 Active redundancy 3hot restart4. 'll re"un"ant cm+nents res+n" t e%entsin +arallel. he res+nse *rm nly ne cm+nent is use" usually the Arst tres+n", an" the rest are "iscar"e". 'cti%e re"un"ancy is *ten use" in aclientSser%er cnAguratin, such as "atabase management systems, (here @uickres+nses are necessary e%en (hen a *ault ccurs

$assive redundancy 3arm restart1dual redundancy1triple redundancy4!/ne cm+nent the +rimary res+n"s t e%ents an" in*rms the thercm+nents the stan"bys * state u+"ates they must make. 0hen a *aultccurs, the system must Arst ensure that the backu+ state is suciently *resh

be*re resuming ser%ices.%pare! ' stan"by s+are cm+uting +lat*rm is cnAgure" t re+lace many "i?erent*aile" cm+nents. -t must be rebte" t the a++r+riate s*t(are cnAguratinan" ha%e its state initialize" (hen a *ailure ccurs.

%hado operation! ' +re%iusly *aile" cm+nent may be run in Osha"( m"eO*r a shrt time t make sure that it mimics the beha%ir * the (rkingcm+nents be*re restring it t ser%ice.

%tate resynchroni#ation! he +assi%e an" acti%e re"un"ancy tactics re@uire thecm+nent being restre" t ha%e its state u+gra"e" be*re its return t ser%ice.

Checkpoint1rollback ! ' check+int is a recr"ing * a cnsistent state create"either +eri"ically r in res+nse t s+eciAc e%ents. !metimes a system *ails in

an unusual manner, (ith a "etectably incnsistent state. -n this case, the systemshul" be restre" using a +re%ius check+int * a cnsistent state an" a lg * the transactins that ccurre" since the sna+sht (as taken.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <

Page 76: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 76/180

 

R ) ! - !/F0'R'RCH-CR )/!

FAULT PREENTION

Removal from service!  his tactic rem%es a cm+nent * the system *rm+eratin t un"erg sme acti%ities t +re%ent antici+ate" *ailures.

Transactions! ' transactin is the bun"ling * se%eral se@uential ste+s such thatthe entire bun"le can be un"ne at nce. ransactins are use" t +re%ent any

"ata *rm being a?ecte" i* ne ste+ in a +rcess *ails an" als t +re%entcllisins amng se%eral simultaneus threa"s accessing the same "ata.

$rocess monitor ! /nce a *ault in a +rcess has been "etecte", a mnitring+rcess can "elete the nn+er*rming +rcess an" create a ne( instance * it,initialize" t sme a++r+riate state as in the s+are tactic.

Figure 5.3. Summary of availability tactics

#3 MODIFIABILITY TACTICS he Agure bel( re+resent gal * m"iAability tactics.

LOCALI@E MODIFICATIONS

Maintain semantic coherence! !emantic cherence re*ers t the relatinshi+samng res+nsibilities in a m"ule. he gal is t ensure that all * theseres+nsibilities (rk tgether (ithut e=cessi%e reliance n ther m"ules.

 Anticipate e+pected changes! Cnsi"ering the set * en%isine" changes+r%i"es a (ay t e%aluate a +articular assignment * res+nsibilities. -n realitythis tactic is "icult t use by itsel* since it is nt +ssible t antici+ate allchanges.

6enerali#e the module! Making a m"ule mre general all(s it t cm+ute abra"er range * *unctins base" n in+ut

"imit possible options! M"iAcatins, es+ecially (ithin a +r"uct line, may be *arranging an" hence a?ect many m"ules. Restricting the +ssible +tins (illre"uce the e?ect * these m"iAcatins

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 9

Page 77: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 77/180

#.

G. <. 

9. 

Q. 

0ith this un"erstan"ing * "e+en"ency ty+es, (e can n( "iscuss tactics a%ailable t the arc

  H.& .*+)'$.*. -n*rmatin hi"ing is the "ecm+sitin * theres+nsibilities *r an entityintsmaller +ieces an" chsing (hich in*rmatin t make +ri%ate an" (hich t make +ublic.

  M.*$.* &.($.*5 .*$&)+/&(it is "icult t mask "e+en"encies n @uality * "ata r @uality * ser%ic

resurce usage, r resurce (nershi+. -nter*ace stability can als be achie%e" by se+arinter*ace *rm the im+lementatin. his all(s the creatin * abstract inter*aces that masktins.  R&($)./$ /''*./$.* $%(. his (ill re"uce the ri++le e?ect since "ata +r"uctinScnsum+ti

  U(& * .*$&)'&.) -* B has any ty+e * "e+en"ency n ' ther than semantic, it is +ssible t

R*$.'& )&5.($)$.*su++rts +lugEan"E +lay +eratin at the cst * a""itinal %erhea" t manage

R ) ! - !/F0'R'RCH-CR )/!

PREENT RIPPLE EFFECTS

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page

Page 78: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 78/180

#.

G. <. 

9. 

Q. 

0ith this un"erstan"ing * "e+en"ency ty+es, (e can n( "iscuss tactics a%ailable t the arc

  H.& .*+)'$.*. -n*rmatin hi"ing is the "ecm+sitin * theres+nsibilities *r an entityintsmaller +ieces an" chsing (hich in*rmatin t make +ri%ate an" (hich t make +ublic.

  M.*$.* &.($.*5 .*$&)+/&(it is "icult t mask "e+en"encies n @uality * "ata r @uality * ser%ic

resurce usage, r resurce (nershi+. -nter*ace stability can als be achie%e" by se+arinter*ace *rm the im+lementatin. his all(s the creatin * abstract inter*aces that masktins.  R&($)./$ /''*./$.* $%(. his (ill re"uce the ri++le e?ect since "ata +r"uctinScnsum+ti

  U(& * .*$&)'&.) -* B has any ty+e * "e+en"ency n ' ther than semantic, it is +ssible t

R*$.'& )&5.($)$.*su++rts +lugEan"E +lay +eratin at the cst * a""itinal %erhea" t manage

R ) ! - !/F0'R'RCH-CR )/!

0e begin ur "iscussin * the ri++le e?ect by "iscussing the %arius ty+es * "e+en"enciesthat ne m"ule can ha%e n anther. 0e i"enti*y eight ty+es3

1. !ynta= *

E data!

E service! 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q

Page 79: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 79/180

#.

G. <. 

9. 

Q. 

0ith this un"erstan"ing * "e+en"ency ty+es, (e can n( "iscuss tactics a%ailable t the arc

  H.& .*+)'$.*. -n*rmatin hi"ing is the "ecm+sitin * theres+nsibilities *r an entityintsmaller +ieces an" chsing (hich in*rmatin t make +ri%ate an" (hich t make +ublic.

  M.*$.* &.($.*5 .*$&)+/&(it is "icult t mask "e+en"encies n @uality * "ata r @uality * ser%ic

resurce usage, r resurce (nershi+. -nter*ace stability can als be achie%e" by se+arinter*ace *rm the im+lementatin. his all(s the creatin * abstract inter*aces that masktins.  R&($)./$ /''*./$.* $%(. his (ill re"uce the ri++le e?ect since "ata +r"uctinScnsum+ti

  U(& * .*$&)'&.) -* B has any ty+e * "e+en"ency n ' ther than semantic, it is +ssible t

R*$.'& )&5.($)$.*su++rts +lugEan"E +lay +eratin at the cst * a""itinal %erhea" t manage

R ) ! - !/F0'R'RCH-CR )/!

1. !ynta= *

E data!

E service! 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8

Page 80: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 80/180

#.

G. <. 

9. 

Q. 

0ith this un"erstan"ing * "e+en"ency ty+es, (e can n( "iscuss tactics a%ailable t the arc

  H.& .*+)'$.*. -n*rmatin hi"ing is the "ecm+sitin * theres+nsibilities *r an entityintsmaller +ieces an" chsing (hich in*rmatin t make +ri%ate an" (hich t make +ublic.

  M.*$.* &.($.*5 .*$&)+/&(it is "icult t mask "e+en"encies n @uality * "ata r @uality * ser%ic

resurce usage, r resurce (nershi+. -nter*ace stability can als be achie%e" by se+arinter*ace *rm the im+lementatin. his all(s the creatin * abstract inter*aces that masktins.  R&($)./$ /''*./$.* $%(. his (ill re"uce the ri++le e?ect since "ata +r"uctinScnsum+ti

  U(& * .*$&)'&.) -* B has any ty+e * "e+en"ency n ' ther than semantic, it is +ssible t

R*$.'& )&5.($)$.*su++rts +lugEan"E +lay +eratin at the cst * a""itinal %erhea" t manage

R ) ! - !/F0'R'RCH-CR )/!

E data!

E service! 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q7

Page 81: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 81/180

#.

G. <. 

9. 

Q. 

0ith this un"erstan"ing * "e+en"ency ty+es, (e can n( "iscuss tactics a%ailable t the arc

  H.& .*+)'$.*. -n*rmatin hi"ing is the "ecm+sitin * theres+nsibilities *r an entityintsmaller +ieces an" chsing (hich in*rmatin t make +ri%ate an" (hich t make +ublic.

  M.*$.* &.($.*5 .*$&)+/&(it is "icult t mask "e+en"encies n @uality * "ata r @uality * ser%ic

resurce usage, r resurce (nershi+. -nter*ace stability can als be achie%e" by se+arinter*ace *rm the im+lementatin. his all(s the creatin * abstract inter*aces that masktins.  R&($)./$ /''*./$.* $%(. his (ill re"uce the ri++le e?ect since "ata +r"uctinScnsum+ti

  U(& * .*$&)'&.) -* B has any ty+e * "e+en"ency n ' ther than semantic, it is +ssible t

R*$.'& )&5.($)$.*su++rts +lugEan"E +lay +eratin at the cst * a""itinal %erhea" t manage

R ) ! - !/F0'R'RCH-CR )/!

E service! 

2. !emantics *

E data!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q1

Page 82: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 82/180

R ) ! - !/F0'R'RCH-CR )/!

2. !emantics *

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q2

Page 83: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 83/180

R ) ! - !/F0'R'RCH-CR )/!

E data!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q#

Page 84: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 84/180

R ) ! - !/F0'R'RCH-CR )/!

E service! 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page QG

Page 85: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 85/180

#.

G. 

<. 

9. . 

Q. 

0ith this un"erstan"ing * "e+en"ency ty+es, (e can n( "iscuss tactics a%ailable t the arc

  H.& .*+)'$.*. -n*rmatin hi"ing is the "ecm+sitin * theres+nsibilities *r an entityintsmaller +ieces an" chsing (hich in*rmatin t make +ri%ate an" (hich t make +ublic.

  M.*$.* &.($.*5 .*$&)+/&(it is "icult t mask "e+en"encies n @uality * "ata r @uality * ser%icresurce usage, r resurce (nershi+. -nter*ace stability can als be achie%e" by se+ar

inter*ace *rm the im+lementatin. his all(s the creatin * abstract inter*aces that masktins.  R&($)./$ /''*./$.* $%(. his (ill re"uce the ri++le e?ect since "ata +r"uctinScnsum+ti

  U(& * .*$&)'&.) -* B has any ty+e * "e+en"ency n ' ther than semantic, it is +ssible t

R*$.'& )&5.($)$.*su++rts +lugEan"E +lay +eratin at the cst * a""itinal %erhea" t manage

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q<

Page 86: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 86/180

R ) ! - !/F0'R'RCH-CR )/!

!e@uence* E 

data!

E control!

%dentity of an interface of +,ocation of + )runtime*!

uality of service.data provided by +!

/xistence of + 

0esource behaviour of +!

+re%enting the ri++le e?ect *r certain ty+es.

islate changes (ithin ne m"ule an" +re%ent changes *rm +r+agating t thers

intr"uces "e+en"encies that cause ri++les.

an interme"iary bet(een B an" ' that manages acti%ities assciate" (ith the"e+en"ency.

DEFER BINDING TIME

Many tactics are inten"e" t ha%e im+act at la"time r runtime, such as the *ll(ing.

the registratin.

Conguration les are inten"e" t set +arameters at startu+.$olymorphism all(s late bin"ing * meth" calls.

Component replacement  all(s la" time bin"ing.

 Adherence to dened protocols all(s runtime bin"ing * in"e+en"ent +rcesses.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q9

Page 87: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 87/180

 

 

R ) ! - !/F0'R'RCH-CR )/!

F.5)& #3#3 S'') + '...$ $/$./(

#3; PERFORMANCE TACTICSPer*rmance tactics cntrl the time (ithin (hich a res+nse is generate". &al * +er*rmance tactics is sh(n bel(3

'*ter an e%ent arri%es, either the system is +rcessing n that e%ent r the +rcessingis blcke" *r sme reasn. his lea"s t the t( basic cntributrs t the res+nsetime3 resurce cnsum+tin an" blcke" time. 0esource consumption! Fr e=am+le, amessage is generate" by ne cm+nent, is +lace" n the net(rk, an" arri%es atanther cm+nent. ach * these +hases cntributes t the %erall latency * the+rcessing * that e%ent.

$locked time! ' cm+utatin can be blcke" *rm using a resurce because * cntentin *r it, because the resurce is una%ailable, r because the cm+utatin"e+en"s n the result * ther cm+utatins that are nt yet a%ailable. E&ontention for resources

- +vailability of resources

- 'ependency on other computation!

RESOURCE DEMAND/ne tactic *r re"ucing latency is t re"uce the resurces re@uire" *r +rcessing ane%ent stream.

&ncrease computational e/ciency ! /ne ste+ in the +rcessing * an e%ent r

a message is a++lying sme algrithm. -m+r%ing the algrithms use" in criticalareas (ill "ecrease latency. his tactic is usually a++lie" t the +rcessr but isals e?ecti%e (hen a++lie" t ther resurces such as a "isk.

educe computational overhead ! -* there is n re@uest *r a resurce,+rcessing nee"s are re"uce". he use * interme"iaries increases theresurces cnsume" in +rcessing an e%ent stream, an" s rem%ing themim+r%es latency.

'nther tactic *r re"ucing latency is t re"uce the number * e%ents +rcesse". hiscan be "ne in ne * t( *ashins.

Manage event rate. -* it is +ssible t re"uce the sam+ling *re@uency at (hichen%irnmental %ariables are mnitre", "eman" can be re"uce".

Control fre)uency of sampling.  -* there is n cntrl %er the arri%al * e=ternally generate" e%ents, @ueue" re@uests can be sam+le" at a l(er*re@uency, +ssibly resulting in the lss * re@uests.

/ther tactics *r re"ucing r managing "eman" in%l%e cntrlling the use * resurces.

(ound e+ecution times! Place a limit n h( much e=ecutin time is use" tres+n" t an e%ent. !metimes this makes sense an" smetimes it "es nt.

(ound )ueue si#es! his cntrls the ma=imum number * @ueue" arri%als an"cnse@uently the resurces use" t +rcess the arri%als.

RESOURCE MANAGEMENT

&ntroduce concurrency ! -* re@uests can be +rcesse" in +arallel, the blcke"time can be re"uce".

Maintain multiple copies of either data or computations! Clients in aclientEser%er +attern are re+licas * the cm+utatin. he +ur+se * re+licas is

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q

Page 88: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 88/180

R ) ! - !/F0'R'RCH-CR )/!

t re"uce the cntentin that (ul" ccur i* all cm+utatins tk +lace n acentral ser%er.

&ncrease available resources! Faster +rcessrs, a""itinal +rcessrs,a""itinal memry, an" *aster net(rks all ha%e the +tential *r re"ucinglatency.

RESOURCE ARBITRATION7irst-in17irst-out ! F-F/ @ueues treat all re@uests *r resurces as e@uals an"

satis*y them in turn.

7i+ed-priority scheduling.  Fi=e"E+ririty sche"uling assigns each surce * resurce re@uests a +articular +ririty an" assigns the resurces in that +rirityr"er. hree cmmn +riritizatin strategies are

o semantic importance ! ach stream is assigne" a +ririty statically accr"ing t

sme "main characteristic * the task that generates it.

o deadline monotonic ! $ea"line mntnic is a static +ririty assignment that assigns

higher +ririty t streams (ith shrter "ea"lines.

o rate monotonic!  Rate mntnic is a static +ririty assignment *r +eri"ic streamsthat assigns higher +ririty t streams (ith shrter +eri"s.

Dynamic priority scheduling o  round robin! Run" rbin is a sche"uling

strategy that r"ers the re@uests an" then, at e%ery assignment +ssibility,assigns the resurce t the ne=t re@uest in that r"er.

o earliest deadline rst ! arliest "ea"line Arst assigns +ririties base" n the +en"ing

re@uests (ith the earliest "ea"line.

%tatic scheduling! ' cyclic e=ecuti%e sche"ule is a sche"uling strategy (here the+reEem+tin +ints an" the se@uence * assignment t the resurce are"etermine" Wine.

Figure 5.7. Summary of performance tactics

#3# SECURITY TACTICS actics *r achie%ing security can be "i%i"e" int thse cncerne" (ith resistingattacks, thse cncerne" (ith "etecting attacks, an" thse cncerne" (ith rec%ering*rm attacks.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page QQ

Page 89: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 89/180

R ) ! - !/F0'R'RCH-CR )/!

RESISTING ATTAC!S Authenticate users. 'uthenticatin is ensuring that a user r remte cm+uter is

actually (h it +ur+rts t be. Pass(r"s, neEtime +ass(r"s, "igital certiAcates,an" bimetric i"entiAcatins +r%i"e authenticatin.

 Authori#e users.  'uthrizatin is ensuring that an authenticate" user has the

rights t access an" m"i*y either "ata r ser%ices. 'ccess cntrl can be by userr by user class.

Maintain data condentiality ! $ata shul" be +rtecte" *rm unauthrize"access. CnA"entiality is usually achie%e" by a++lying sme *rm * encry+tin t"ata an" t cmmunicatin links. ncry+tin +r%i"es e=tra +rtectin t+ersistently maintaine" "ata beyn" that a%ailable *rm authrizatin.

Maintain integrity. $ata shul" be "eli%ere" as inten"e". -t can ha%e re"un"antin*rmatin enc"e" in it, such as checksums r hash results, (hich can beencry+te" either alng (ith r in"e+en"ently *rm the riginal "ata.

"imit e+posure.  'ttacks ty+ically "e+en" n e=+liting a single (eakness tattack all "ata an" ser%ices n a hst. he architect can "esign the allcatin * 

ser%ices t hsts s that limite" ser%ices are a%ailable n each hst."imit access.  Fire(alls restrict access base" n message surce r "estinatin+rt. Messages *rm unkn(n surces may be a *rm * an attack. -t is nt al(ays+ssible t limit access t kn(n surces.

DETECTING ATTAC!S he "etectin * an attack is usually thrugh an intrusion detection system.

!uch systems (rk by cm+aring net(rk trac +atterns t a "atabase.

-n the case * misuse "etectin, the trac +attern is cm+are" t histric +atterns* kn(n attacks.

-n the case * anmaly "etectin, the trac +attern is cm+are" t a histrical

baseline * itsel*. Fre@uently, the +ackets must be Altere" in r"er t makecm+arisns.

Filtering can be n the basis * +rtcl, CP >ags, +ayla" sizes, surce r"estinatin a""ress, r +rt number.

-ntrusin "etectrs must ha%e sme srt * sensr t "etect attacks, managers t" sensr *usin, "atabases *r string e%ents *r later analysis, tls *r Winere+rting an" analysis, an" a cntrl cnsle s that the analyst can m"i*yintrusin "etectin actins.

RECOERING FROM ATTAC!S actics in%l%e" in rec%ering *rm an attack can be "i%i"e" int thse cncerne"

(ith restring state an" thse cncerne" (ith attacker i"entiAcatin *r either

+re%enti%e r +uniti%e +ur+ses. he tactics use" in restring the system r "ata t a crrect state %erla+ (ith

thse use" *r a%ailability since they are bth cncerne" (ith rec%ering acnsistent state *rm an incnsistent state.

/ne "i?erence is that s+ecial attentin is +ai" t maintaining re"un"ant c+ies * system a"ministrati%e "ata such as +ass(r"s, access cntrl lists, "main nameser%ices, an" user +rAle "ata.

 he tactic *r i"enti*ying an attacker is t maintain an audit trail.

'n au"it trail is a c+y * each transactin a++lie" t the "ata in the systemtgether (ith i"enti*ying in*rmatin.

'u"it in*rmatin can be use" t trace the actins * an attacker, su++rt

nnre+u"iatin it +r%i"es e%i"ence that a +articular re@uest (as ma"e, an"su++rt system rec%ery.

'u"it trails are *ten attack targets themsel%es an" there*re shul" be maintaine"in a truste" *ashin.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q8

Page 90: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 90/180

R ) ! - !/F0'R'RCH-CR )/!

#36 TESTABILITY TACTICS he gal * tactics *r testability is t all( *r easier testing (hen an increment * s*t(are "e%el+ment is cm+lete". Figure <.17 "is+lays the use * tactics *rtestability.

INPUTOUTPUTecord1playback ! Recr"S+layback re*ers t bth ca+turing in*rmatin crssingan inter*ace an" using it as in+ut int the test harness. he in*rmatin crssingan inter*ace "uring nrmal +eratin is sa%e" in sme re+sitry. Recr"ing thisin*rmatin all(s test in+ut *r ne * the cm+nents t be generate" an" testut+ut *r later cm+arisn t be sa%e".

%eparate interface from implementation.  !e+arating the inter*ace *rm theim+lementatin all(s substitutin * im+lementatins *r %arius testing+ur+ses. !tubbing im+lementatins all(s the remain"er * the system t beteste" in the absence * the cm+nent being stubbe".

%peciali#e access routes1interfaces.  Ha%ing s+ecialize" testing inter*aces

all(s the ca+turing r s+eciAcatin * %ariable %alues *r a cm+nent thrugh atest harness as (ell as in"e+en"ently *rm its nrmal e=ecutin. !+ecialize"access rutes an" inter*aces shul" be ke+t se+arate *rm the access rutes an"inter*aces *r re@uire" *unctinality.

INTERNAL MONITORING(uilt-in monitors!  he cm+nent can maintain state, +er*rmance la",ca+acity, security, r ther in*rmatin accessible thrugh an inter*ace. hisinter*ace can be a +ermanent inter*ace * the cm+nent r it can be intr"uce"tem+rarily. ' cmmn techni@ue is t recr" e%ents (hen mnitring states ha%ebeen acti%ate". Mnitring states can actually increase the testing e?rt sincetests may ha%e t be re+eate" (ith the mnitring turne" ?. -ncrease" %isibility

int the acti%ities * the cm+nent usually mre than ut(eigh the cst * thea""itinal testing.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 87

Page 91: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 91/180

 

 

 

 

 

 

 

 

 

 

R ) ! - !/F0'R'RCH-CR )/!

Figure 5.11. Summary of testability tactics

#37 USABILITY TACTICS

RUNTIME TACTICSMaintain a model of the task. -n this case, the m"el maintaine" is that * thetask. he task m"el is use" t "etermine cnte=t s the system can ha%e smei"ea * (hat the user is attem+ting an" +r%i"e %arius kin"s * assistance. Fr

e=am+le, kn(ing that sentences usually start (ith ca+ital letters (ul" all( ana++licatin t crrect a l(erEcase letter in that +sitin.

Maintain a model of the user ! -n this case, the m"el maintaine" is * theuser. -t "etermines the users kn(le"ge * the system, the users beha%ir interms * e=+ecte" res+nse time, an" ther as+ects s+eciAc t a user r a class* users. Fr e=am+le, maintaining a user m"el all(s the system t +acescrlling s that +ages " nt >y +ast *aster than they can be rea".

Maintain a model of the system! -n this case, the m"el maintaine" is that * the system. -t "etermines the e=+ecte" system beha%ir s that a++r+riate*ee"back can be gi%en t the user. he system m"el +re"icts items such as thetime nee"e" t cm+lete current acti%ity.

DESIGN-TIME TACTICS%eparate the user interface from the rest of the application . Lcalizinge=+ecte" changes is the ratinale *r semantic cherence. !ince the userinter*ace is e=+ecte" t change *re@uently bth "uring the "e%el+ment an"a*ter "e+lyment, maintaining the user inter*ace c"e se+arately (ill lcalizechanges t it. he s*t(are architecture +atterns "e%el+e" t im+lement thistactic an" t su++rt the m"iAcatin * the user inter*ace are3

M"elE4ie(ECntrller

PresentatinE'bstractinECntrl

!eeheim

'rchS!linky

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 81

Page 92: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 92/180

R ) ! - !/F0'R'RCH-CR )/!

Figure 5.13. Summary of runtime usability tactics

#38 RELATIONSHIP OF TACTICS TO ARCHITECTURAL PATTERNS he +attern cnsists * si= elements3 a  pro+y , (hich +r%i"es an inter*ace that all(s

clients t in%ke +ublicly accessible meth"s n an acti%e bectI

a method re)uest , (hich "eAnes an inter*ace *r e=ecuting the meth"s * an

acti%e bectI an activation list , (hich maintains a bu?er * +en"ing meth"

re@uestsI a scheduler , (hich "eci"es (hat meth" re@uests t e=ecute ne=tI

a servant , (hich "eAnes the beha%ir an" state m"ele" as an acti%e bectI

an" a future, (hich all(s the client t btain the result * the meth"

in%catin.

 he tactics in%l%es the *ll(ing3

&nformation hiding  )modiability*! ach element chses the res+nsibilities it (illachie%e an" hi"es their achie%ement behin" an inter*ace.

&ntermediary   )modiability*! he +r=y acts as an interme"iary that (ill bu?er changest the meth" in%catin.

(inding time )modiability*! he acti%e bect +attern assumes that re@uests *r the

bect arri%e at the bect at runtime. he bin"ing * the client t the +r=y, h(e%er, is

le*t +en in terms * bin"ing time. %cheduling policy  )performance*! he sche"uler

im+lements sme sche"uling +licy.

#39 ARCHITECTURAL PATTERNS AND STYLES

'n architectural +attern is "etermine" by3 ' set of element types such as a "ata re+sitry r a cm+nent that cm+utes a

mathematical *unctin.

' $5./ $ * the elements in"icating their interrelatinEshi+s.

' (&$ + (&'*$./ /*($).*$( e.g., Alters in a +i+eEan"EAlter style are +ure "atatrans"ucersthey incrementally trans*rm their in+ut stream int an ut+ut stream,but " nt cntrl either u+stream r "(nstream elements.

' (&$ + .*$&)/$.* '&/%*.('(  e.g., subrutine call, e%entEsubscriber,blackbar" that "etermine h( the elements cr"inate thrugh the all(e" t+lgy.

 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 82

Page 93: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 93/180

R ) ! - !/F0'R'RCH-CR )/!

Figure 5.14. A small catalog of architectural patterns organi!ed by is"a relations 

R ) ! - !/F0'R'RCH-CR )/!

)- # E N!-/) B')K

N3 <UESTION YEAR MAR!S

1 0hat is a%ailabilityJ =+lain the general scenari *r a%ailability. $ec 78 17

2 Classi*y security tactics. 0hat are the "i?erent tactics *r resistingattacksJ

$ec 78 17

# 0hat are the @ualities * the systemJ =+lain the m"iAability generalscenari

 Tune17

17

G 0hat " yu mean by tacticsJ =+lain the a%ailability tactics, (ith a

neat "iagram

 Tune

17

17

< 0hat is a @uality attribute scenariJ List the +arts * such a scenari.$istinguish bet(een a%ailability scenaris an" m"iAability scenaris

$ec 17 Q

9 =+lain h( *aults are "etecte" an" +re%ente" $ec 17 Q

0rite a brie* nte n the "esign time tactics $ec 17 G

Q 0ith the hel+ * a++r+riate "iagrams, e=+lain the a%ailability scenarian" testability scenari in "etail

 Tune11

12

8 Brie>y "iscuss the %arius ty+es * "e+en"encies that ne m"ule can

ha%e n anther (hich *rms the basis *r +re%entin * ri++le e?ect

 Tune

11

Q

17 0hat are the @ualities that the architecture itsel* shul" +ssessJ $ec 11 9

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8#

Page 94: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 94/180

'rchitectural +atterns e=+ress *un"amental structural rganizatin schemas *r s*t(are systems.set * +re"eAne" subsystems, s+eci*y their res+nsibilities, an" inclu"e rules an" gui"elines *r

'rchitectural +atterns re+resent the highestE le%el +atterns in ur +attern system. hey hel+ yu t satis*y

  F)' M $ S$)/$)&3  he categry inclu"esthe Layers +attern, the Pi+es an" Filters +attern an" th

  D.($).$& (($&'(3  his categry inclu"es ne +attern, Brker an" re*ers t t( +atterns in

  I*$&)/$.1& (($&'(3 his cate gry cm+rises t( +atterns, the M"elE 4ie(E Cntrller +attern an" the

  A$& (($&'(3  he Re>ectin +attern an" the Micrkernel +attern strngly su++rt e=tens

Be*re (e start the "esign * a ne( system, (e cllect the re@uirements *rm the custmer an" trint s+eciAcatins. he ne=t mar technical task is t "eAne the architecture * the system. his means An"ing

 heL&)(+attern hel+s t structure a++licatins that can be"ecm+se" int gru+s * subtasks in

 heP.&(*F.$&)(+attern +r%i"es a structure *r systemsthat +rcess a stream * "ata. ach

+rcessing ste+ is enca+sulate" in a Alter cm+nent. $ata is +asse" thrugh +i+esbet(een a"acent

 he B/)+attern is use*ul *r +rblems *r(hich n "eterministic slutinstrategies arekn(n. -n Blackbar" se%eral s+ecialize" subsystems assemble theirkn(le"ge t buil" a +ssibly

 he layers architectural +attern hel+s t structure a++licatins that can be "ecm+se" int gru+s

E'&3 )et(rking +rtcls are best e=am+le * layere" architectures.!uch a +rtcl cnsists * a set *rules an" cn%entins that "escribes h( cm+uter +rgrammer cmmunicates acrss machine

 he *rmat, cntacts an" meaning * all messages are "eAne". he +rtcl s+eciAes agreements at a %ariety

 here*re the "esigners use secure" sub +rtcls an" arrange them in layers. ach layer "eals (ia s+eciAc

R ) ! - !/F0'R'RCH-CR )/!

11 List the +arts * @uality attribute scenari $ec 11 G

12 0hat is the gal * tactics *r testabilityJ $iscuss the t( categries * tactics *r testing

$ec 11 17

1# 0hat is @uality attribute scenariJ List the +arts * scenari (ith ane=am+le  Tune12 G

1G 0hat is a%ailabilityJ =+lain the general scenari *r a%ailability Tune12

Q

1< Classi*y security tactics. 0hat are the "i?erent tactics *r resisting attacksJ Tune 12 Q

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page GQ

)- G'RCH-CR'L P'R)!E1

relationships between them!

23" INTRODUCTION

*un"amental structure * an a++licatin. 0e gru+ ur +atterns int *ur categries3

Blackbar" +attern.

categries, Micrkernel an" Pi+es an" Filters.

PresentatinE'bstractinECntrl +attern.

a++licatins an" their a"a+tatin t e%l%ing technlgy an" changing *unctinalre@uirements.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8G

Page 95: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 95/180

R ) ! - !/F0'R'RCH-CR )/!

232 FROM MUD TO STRUCTURE

a high le%el sub"i%isin * the system int cnstitute +arts.

0e "escribe three architectural +atterns that +r%i"e high le%el system sub"i%isins * 

"i?erent kin"s3

(hich each gru+ * subtasks is at a +articular le%el * abstractin.

Alters. Recmbining Alters all(s yu t buil" *amilies * relate" systems.

+artial r a++r=imate slutin.

6-* mu" t structure @uestin is aske" *r 17 marks in e=am, summary * *ull unit abut layers, +i+es ; Alters an" blackbar"+attern shul" be (ritten:

LAYERS

which each group of subtasks is at a particular level of abstraction!

abstractin le%els, ranging *rm the "etails * bit transmissin t high le%el abstractin lgic.

as+ect * cmmunicatin an" users the ser%ices * the ne=t l(er layer. see "iagram ;

e=+lain mre

Conte+t : a large system that re@uires "ecm+sitin.

$roblem: THE SYSTEM WE ARE BUILDING IS DIIDED BY MI OF LOW AND HIGH LEEL ISSUES ,

WHERE HIGH-LEEL

OPERATIONS RELY ON THE LOWER-LEEL ONES3 FOR E, HIGH-LEEL WILL BE INTERACTIE TO USER

AND LOW-LEEL WILL BE CONCERNED WITH HARDWARE IMPLEMENTATION3 

-n such a case, (e nee" t balance the *ll(ing *rces3

Late surce c"e changes shul" nt ri++le thrugh the systems. hey shul" be

cnAne" t ne cm+nent an" nt a?ect thers.

-nter*aces shul" be stable, an" may e%en be im+resse" by a stan"ar"s b"y.

Parts * the system shul" be e=changeable i.e, a +articular layer can be change". -t may be necessary t buil" ther systems at a later "ate (ith the same l(Ele%el

issues as the system yu are currently "esigning.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8<

Page 96: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 96/180

R ) ! - !/F0'R'RCH-CR )/!

!imilar res+nsibilities shul" be gru+e" t hel+ un"erstan"ability an" maintainability.

 here is n Xstan"ar" cm+nent granularity.

Cm+le= cm+nents nee" *urther "ecm+sitin.

Crssing cm+nent bun"aries may im+e"e +er*rmance, *r e=am+le (hen a

substantial amunt * "ata must be trans*erre" %er se%eral bun"aries.

 he system (ill be built by a team * +rgrammers, an" (rks has t be sub"i%i"e"

alng clear bun"aries.

%olution

!tructure yur system int an a++r+riate number * layers an" +lace them n t+ * 

each ther.

L(est layer is calle" 1 base * ur system, the highest is calle" layer ). i.e, Layer 1,

YY. Layer TE1, Layer T, Y.. Layer ).

Mst * the ser%ices that layer T Pr%i"es are cm+se" * ser%ices +r%i"e" by layer TE

1. -n ther (r"s, the ser%ices * each layer im+lement a strategy *r cmbining the

ser%ices * the layer bel( in a meaning*ul (ay. -n a""itin, layer Ts ser%ices may"e+en" n ther ser%ices in layer T.

%tructure

• 'n in"i%i"ual layer can be "escribe" by the *ll(ing CRC car"3

•  he main structural characteristics * the layers +atterns is that ser%ices * layer T arenly use by layer TZ1Ethere are n *urther "irect "e+en"encies bet(een layers. hisstructure can be cm+are" (ith a stack, r e%en an nin. ach in"i%i"ual layer shiel"sall l(er *rm "irect access by higher layers.

• -n mre "etail, it might lk smething like this3

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 89

Page 97: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 97/180

R ) ! - !/F0'R'RCH-CR )/!

Dynamics

S/&*). I is +rbably the bestEkn(n ne. ' client -ssues a re@uest t Layer ). !ince

Layer ) cannt carry ut the re@uest n its (n. -t calls the ne=t Layer ) E 1   *r

su++rting subtasks. Layer ) - - +r%i"es these. -n the +rcess sen"ing *urther re@uestst Layer )E2 an" s n until Layer - is reache". Here, the l(estEle%el ser%ices areAnally +er*rme". -* necessary, re+lies t the "i?erent re@uests are +asse" back u+*rm Layer 1 t Layer 2, *rm Layer 2 t Layer #, an" s n until the Anal re+ly arri%esat Layer ).

S/&*). II illustrates bttmEu+ cmmunicatinEa chain * actins starts at Layer 1,

*r e=am+le (hen a "e%ice "ri%er "etects in+ut. he "ri%er translates the in+ut int aninternal *rmat an" re+rts it t Layer 2 (hich starts inter+reting it, an" s n. -n this(ay "ata m%es u+ thrugh the layers until it arri%es at the highest layer. 0hile t+E"(n in*rmatin an" cntrl >( are *ten "escribe" as re@uests. BttmEu+ callscan be terme" ntiAcatins.

S/&*). III "escribes the situatin (here re@uests nly tra%el thrugh a subset * 

the layers. ' t+le%el re@uest may nly g t the ne=t l(er le%el )E 1 i* this le%el cansatis*y the re@uest. 'n e=am+le * this is (here le%el )E 1 acts as a cache an" are@uest *rm le%el ) can be satisAe" (ithut being sent all the (ay "(n t Layer 1an" *rm here t a remte ser%er.

S/&*). I 'n e%ent is "etecte" in Layer 1, but st+s at Layer instea" * tra%elling

all the (ay u+ t Layer ). -n a cmmunicatin +rtcl, *r e=am+le, a resen" re@uestmay arri%e *rm an im+atient client (h re@ueste" "ata sme time ag. -n themeantime the ser%er has alrea"y sent the ans(er, an" the ans(er an" the reEsen"re@uest crss. -n this case, Layer * the ser%er si"e may ntice this an" interce+t thereEsen" re@uest (ithut *urther actin.

S/&*). in%l%es t( stacks * ) layers cmmunicating (ith each ther. his

scenari is (ellEkn(n *rm cmmunicatin +rtcls (here the stacks are kn(n as+rtcl stacks. -n the *ll(ing "iagram, Layer ) * the le*t stack issues a [email protected] re@uest m%es "(n thrugh the layers until it reaches Layer ", is sent t Layer 1* the right stack, an" there m%es u+ thrugh the layers * the right stack. heres+nse t the re@uest *ll(s the re%erse +ath until it arri%es at Layer ) * the le*tstack.

&mplementation

 he *ll(ing ste+s "escribe a ste+E(ise reAnement a++rach t the "eAnitin * a layere"architecture.

D&*& $%& ($)/$.* /).$&).* +) 5).*5 $(( .*$ &)(3

o  his criterin is *ten the cnce+tual "istance *rm the +lat*rm smetimes, (e

encunter ther abstractin +ara"igm as (ell.

o -n the real (rl" * s*t(are "e%el+ment (e *ten use a mi= * abstractin criterins. Fr

e=, the "istance *rm the har"(are can sha+e the l(er le%els, an" cnce+tualcm+le=ity g%erns the higher nes. o  =am+le layering btaine" using mi=e" m"el

layering +rinci+le is sh(n bel( serE%isible elements

 !+eciAc a++licatin m"ules

 Cmmn ser%ices le%el

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8

Page 98: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 98/180

R ) ! - !/F0'R'RCH-CR )/!

 /+erating system inter*ace le%el

 /+erating system

 Har"(are

D&$&)'.*& $%& *'&) + ($)/$.* &1&( //).*5 $ ) ($)/$.*

/).$&).*3 

o ach abstractin le%el crres+n"s t ne layer * the +attern.  

o Ha%ing t many layers may im+se unnecessary %erhea", (hile t *e( layers canresult in a +r structure.

N'& $%& &)( * ((.5* $%& $(( $ &/% + $%&'3  

o  he task * the highest layer is the %erall system task, as +ercei%e" by the client.

o  he tasks * all ther layers are t be hel+ers t higher layers.

S&/.+ $%& (&)1./&( o -t is *ten better t lcate mre ser%ices in higher layers than

in l(er layers.

o  he base layers shul" be ke+t Xslim (hile higher layers can e=+an" t c%er a s+ectrum

* a++licability.

o  his +henmenn is als calle" the Xinverted pyramid of reuse1 . R&*& $%& &).*5 o -terate %er ste+s 1 t G.

o -t is nt +ssible t "eAne an abstractin criterin +recisely be*re thinking abut the

im+lie" layers an" their ser%ices.

o 'lternati%ely it is (rng t "eAne cm+nents an" ser%ices Arst an" later im+se a

layere" structure. o  he slutin is t +er*rm the Arst *ur ste+s se%eral times until a

natural an" stable layering e%l%es.

S&/.+ * .*$&)+/& +) &/% &)3

o -* layer T shul" be a Xblack b= *r layer TZ1, "esign a >at inter*ace that ?ers all layer

 Ts ser%ices. o X0hite b= a++rach is that in (hich, layer TZ1 sees the internals * layer T.

o X&ray b= a++rach is a cm+rmise bet(een black an" (hite b= a++raches. Here

layer TZ1 is a(are * the *act that layer T cnsists * three cm+nents, an" a""ress themse+arately, but "es nt see the internal (rkings * in"i%i"ual cm+nents.

S$)/$)& .*.1. &)( o  0hen an in"i%i"ual layer is cm+le=, it shul" be

brken int se+arate cm+nents.

o  his sub"i%isin can be hel+e" by using AnerEgraine" +atterns.

S&/.+ $%& /''*./$.* &$&&* /&*$ &)(3 

o Push m"el mst *ten use"3 (hen layer T in%kes a ser%ice * layer TZ1, any re@uire"

in*rmatin is +asse" as +art * the ser%ice call.

o Pull m"el3 it is the re%erse * the +ush m"el. -t ccurs (hen the l(er layer *etches

a%ailable in*rmatin *rm the higher layer at its (n "iscretin.

D&/& /&*$ &)(3o Fr t+E"(n cmmunicatin, (here re@uests tra%el t+E"(n, (e can use neE(ay

cu+ling i.e, u++er layer is a(are * the ne=t l(er layer, but the l(er layer is una(are* the i"entity * its users here return %alues are sucient t trans+rt the results in there%erse "irectin.

o Fr bttmEu+ cmmunicatin, yu can use callbacks an" still +reser%e a t+E"(n ne

(ay cu+ling. Here the u++er layer registers callback *unctins (ith the l(er layer.

o 0e can als "ecu+le the u++er layer *rm the l(er layer t a certain "egree using

bect riente" techni@ues.

D&(.5* * &))) %*.*5 ($)$&5 o 'n errr can either be han"le" in the layer

(here it ccurre" r be +asse" t the ne=t higher layer.

o 's a rule * thumb, try t han"le the errrs at the l(est layer +ssible.

E+ample resolved

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8Q

Page 99: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 99/180

R ) ! - !/F0'R'RCH-CR )/!

 he mst (i"elyEuse" cmmunicatin +rtcl, CPS-P, "es nt strictly cn*rm t the /!-m"el an" cnsists * nly *ur layers3 CP an" -P cnstitute the mi""le layers, (ith thea++licatin at the t+ an" the trans+rt me"ium at the bttm. ' ty+ical cnAguratin, that*r the UNI *t+s utility, is sh(n bel(3

5ariants

R&& &)& (($&': o Less restricti%e abut relatinshi+ bet(een layers. Here

each layer may use the ser%ices * all layers bel( it, nt nly * the ne=t l(er layer.o ' layer may als be +artially +a@ue i.e. sme * its ser%ices are nly %isible t thene=t higher layer, (hile thers are %isible t all higher layers.

o '"%antage3 >e=ibility an" +er*rmance.o $isa"%antage3 maintainability.

L&).*5 $%)5% .*%&).$*/& o  his %ariant can be *un" in sme bect riente"

systems. o  Here, l(er layers are im+lemente" as base classes. ' higher layerre@uesting ser%ices *rm a l(er layer inherits *rm the l(er layers im+lementatinan" hence can issue re@uests t the base class ser%ices.

o '"%antage3 higher layers can m"i*y l(erElayer ser%ices accr"ing t their nee"s.

o $isa"%antage3 clsely ties the higher layer t the l(er layer.

*non uses

.)$ '/%.*&(3 (e can s+eak * l(er le%els as a %irtual machine that insulates

higher le%els *rm l(Ele%el "etails r %arying har"(are. .g. Ta%a %irtual machine.

APIKS3 'n 'P- is a layer that enca+sulates l(er layers * *re@uentlyEuse" *unctinality.

'n 'P- is usually a >at cllectin !+eciAcatins, such as the )-U system calls.

I*+)'$.* (($&' =IS>: -! *rm the business s*t(are "main *ten use a t(Elayer

architecture. he bttm layer is a "atabase that hl"s cm+anyEs+eciAc "ata. hisarchitecture can be s+lit int *urlayer architecture. hese are, *rm highest t l(est3

 Presentatin

 '++licatin lgic

 $main layer

 $atabase

W.*( NT:  his /! is structure" accr"ing t the micrkernel +attern. -t has the*ll(ing layers3

 !ystem ser%ices

 Resurce management layer

 Kernel

 H'Lhar"(are abstractin layer

 Har"(are

Conse)uences

 he layers +attern has se%eral benets3

R&(& + &)( o -* an in"i%i"ual layer emb"ies a (ellE"eAne" abstractin an" has a

(ellE"eAne" an" "cumente" inter*ace, the layer can be reuse" in multi+le cnte=ts.o  H(e%er, "e%el+ers *ten +re*er t re(rite its *unctinality in r"er t a%i"

higher csts * reusing e=isting layers.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 88

Page 100: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 100/180

R ) ! - !/F0'R'RCH-CR )/!

S)$ +) ($*).$.*  o  ClearlyE"eAne" an" cmmnlyEacce+te" le%els * 

abstractin enable the "e%el+ment * stan"ar"ize" tasks an" inter*aces.

o  $i?erent im+lementatins * the same inter*ace can then be use"

interchangeably. his all(s yu t use +r"ucts *rm "i?erent %en"rs in"i?erent layers.

D&&*&*/.&( )& &$ /  o  !tan"ar"ize" inter*aces bet(een layers usuallycnAne the e?ect * c"e changes t the layer that is change".

E/%*5&..$ o -n"i%i"ual layer im+lementatins can be re+lace" by semanticallyE

e@ui%alent im+lementatins (ithut t great an e?rt.

 he layers +attern has se%eral liabilities 

C(/&( + /%*5.*5 &%1.) o ' se%ere +rblem can ccur (hen the beha%ir * 

the layer changes. o  he layering becmes a "isa"%antage i* yu ha%e t " a

substantial amunt * re(rk n many layers t incr+rate an a++arently lcalchange.

L&) &/.&*/ o -* highEle%el ser%ices in the u++er layers rely hea%ily n the l(estlayers, all rele%ant "ata must be trans*erre" thrugh a number * interme"iate layers,

an" may be trans*rme" se%eral times. here*re, layere" architecture is less ecient

than a mnlithic structure r a Xsea * bects.

U**&/&(() )  o -* sme ser%ices +er*rme" by l(er layers +er*rm e=cessi%e r

"u+licate (rk nt actually re@uire" by the higher layer this has a negati%e im+act n+er*rmance.

o $eEmulti+le=ing in a cmmunicatin +rtcl stack is an e=am+le * this +henmenn.

D./$ + &($.(%.*5 $%& /))&/$ 5)*).$ + &)( o  he "ecisin abut

the granularity * layers an" the assignment * task t layers is "icult, but is critical*r the architecture.

PIPES AND FILTERSThe pipes and lter1s architectural pattern provides a structure for systems that process astream of data! /ach processing step is encapsulated in a lter component! 'ata is passedthrough pipes between ad2acent lters! 0ecombining lters allows you to build families of related systems!

E+ample

!u++se (e ha%e "eAne" a ne( +rgramming language calle" M/% 6Modular 3b2ect &omputation with 4ypothetical +lgorithms:. /ur task is t buil" a +rtable cm+iler *r this

language. su++rt e=isting an" *uture har"(are +lat*rms (e "eAne an interme"iatelanguage AL.$  6 +nother 5niversal ,anguage for %ntermediate Translation: running n a%irtual machine Cu+ Cncurrent ni*rm Prcessr.

Cnce+tually, translatin *rm Mcha t 'uLait cnsists * the +hases le=ical analysis, synta=analysis, semantic analysis, interme"iateEc"e generatin 'uLait, an" +tinallyinterme"iateEc"e +timizatin. ach stage has (ellE"eAne" in+ut an" ut+ut "ata.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 177

Page 101: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 101/180

R ) ! - !/F0'R'RCH-CR )/!

Conte+t

Prcessing "ata streams.

$roblem

-magine yu are buil"ing a system that must +rcess r trans*rm a stream * in+ut

"ata. -m+lementing such a system as a single cm+nent may nt be *easible *rse%eral reasns3 the system has t be built by se%eral "e%el+ers, the glbal systemtask "ecm+ses naturally int se%eral +rcessing stages, an" the re@uirements arelikely t change.

 he "esign * the systemEes+ecially the intercnnectin * the +rcessing ste+sEhas t

cnsi"er the *ll(ing *rces3

 Future system enhancements shul" be +ssible by e=changing +rcessing ste+s rby recmbinatin * ste+s, e%en by users.

 !mall +rcessing ste+s are easier t reuse in "i?erent cnte=ts than larger cnte=ts. )nEa"acent +rcessing ste+s " nt share in*rmatin.

 $i?erent surces * in+ut "ata e=ists, such as a net(rk cnnectin r a har"(aresensr +r%i"ing tem+erature rea"ings, *r e=am+le.

 -t shul" be +ssible t +resent r stre the Anal results in %arius (ays.

 =+licit strage * interme"iate results *r *urther +rcessing the ste+s, *r e=am+lerunning them in +arallel r @uasiE+arallel.

  5u may nt (ant t rule ut multiE+rcessing the ste+s

%olution

 he +i+es an" Alters architectural +attern "i%i"es the task * a system int se%eral

se@uential +rcessing ste+s cnnecte" by the "ata>( thrugh the system. ach ste+ is im+lemente" by a Alter cm+nent, (hich cnsumes an" "eli%ers "ata

incrementally t achie%e l( battery an" +arallel +rcessing.

 he in+ut t a system is +r%i"e" by a "ata surce such as a te=t Ale.

 he ut+ut >(s int a "ata sink such as a Ale, terminal, an" s n.

 he "ata surce, the Alters, an" the "ata sink are cnnecte" se@uentially by +i+es.

ach +i+e im+lements the "ata >( bet(een a"acent +rcessing ste+s.

 he se@uence * Alters cmbine" by +i+es is calle" a +rcessing +i+eline.

%tructure

F.$&) /'*&*$:

o Filter cm+nents are the +rcessing units * the +i+eline.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 171

Page 102: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 102/180

R ) ! - !/F0'R'RCH-CR )/!

o ' Alter enriches, reAnes r trans*rms its in+ut "ata. -t enriches "ata by cm+uting an"

a""ing in*rmatin, reAnes "ata by cncentrating r e=tracting in*rmatin, an"trans*rms "ata by "eli%ering the "ata in sme ther re+resentatin.

o -t is res+nsible *r the *ll(ing acti%ities3

 The subsequent pipeline element pulls output data from the filter. (passive filter)

 The previous pipeline element pushes new input data to the filter. (passive filter)

 Most commonly, the filter is active in a loop, pulling its input from and pushing its output down

the pipeline. (active filter) 

P.& /'*&*$:

o Pi+es "ente the cnnectin bet(een Alters, bet(een the "ata surce an" the Arst Alter,

an" bet(een the last Alter an" the "ata sink.

o -* t( acti%e cm+nents are ine", the +i+e synchrnizes them. o  his synchrnizatin

is "ne (ith a ArstEinE ArstEut bu?er.

D$ ()/& /'*&*$:

o  he "ata surce re+resents the in+ut t the system, an" +r%i"es a se@uence * "ata

%alues * the same structure r ty+e.

o -t is res+nsible *r "eli%ering in+ut t the +rcessing +i+eline.

D$ (.* /'*&*$: o  he "ata sink cllects the result *rm the en" * the +i+eline

i.e, it cnsumes ut+ut.

o  ( %ariants * "ata sink3

 'n acti%e "ata sink +ulls results ut * the +rece"ing +rcessing stage.

 'n +assi%e "ata sink all(s the +rece"ing Alter t +ush r (rite the results int it.

 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 172

Page 103: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 103/180

R ) ! - !/F0'R'RCH-CR )/!

-n ur Mcha cm+iler (e use the )-U tls le= an" yacc t im+lement the Arst t( stages* the cm+iler. he cnnectin t the ther *rnten" stages cnsists * many +rce"urecalls embe""e" in the grammar actin rules, an" nt ust sim+le "ata >(. he backen"san" inter+reter run as se+arate +rgrams t all( e=changeability. hey are cnnecte" %ia a)-U +i+e t the *rnten".

Dynamics

 he *ll(ing scenaris sh( "i?erent +tins *r cntrl >( bet(eena"acent Alters.  S/&*). " sh(s a +ush +i+eline in (hich acti%itystarts (ith the "ata surce.

S/&*). 2 sh(s a +ull +i+eline in (hich cntrl >( starts (ith the "ata sink.

S/&*).  sh(s a mi=e" +ushE+ull +i+eline (ith +assi%e "ata surce an" sink. Here

secn" Alter +lays the acti%e rle an" starts the +rcessing.

S/&*). ; sh(s a mre cm+le= but ty+ical beha%ir * +i+es an" Alter system. 'll

Alters acti%ely +ull, cm+ute, an" +ush "ata in a l+.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17#

Page 104: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 104/180

R ) ! - !/F0'R'RCH-CR )/!

The following steps occur in this scenario:

 Filter 2 tries t get ne( "ata by rea"ing *rm the +i+e. Because n "ata is a%ailablethe "ata re@uest sus+en"s the acti%ity * Filter 2Ethe bu?er is em+ty.

 Filter 1 +ulls "ata *rm the "ata surce an" +er*rms *unctin * 1.

 Filter 1 then +ushes the result t the +i+e.

 Filter 2 can n( cntinue, because ne( in+ut "ata is a%ailable.

 Filter l can als cntinue, because it is nt blcke" by a *ull bu?er (ithin the +i+e.

 Filter 2 cm+utes * 2 an" (rites its result t the "ata sink.

 -n +arallel (ith Filter 2s acti%ity, Filter 1 cm+utes the ne=t result an" tries t +ush it"(n the +i+e. his call is blcke" because Filter 2 is nt (aiting *r "ataEthe bu?eris *ull.

  Filter 2 n( rea"s ne( in+ut "ata that is alrea"y a%ailable *rm the +i+e. hisreleases Filter 1 s that it can n( cntinue its +rcessing.

&mplementation

D.1.& $%& (($&'K( $(( .*$ (&&*/& + )/&((.*5 ($5&(3

o ach stage must "e+en" nly n the ut+ut * its "irect +re"ecessr.

o 'll stages are cnce+tually cnnecte" by the "ata >(.

D&*& $%& $ +)'$ $ & ((& *5 &/% .&3

o $eAning a uni*rm *rmat results in the highest >e=ibility because it makes recmbinatin

* its Alters easy.

o  5u must als "eAne h( the en" * in+ut is marke".

D&/.& % $ .'&'&*$ &/% .& /**&/$.*3

o  his "ecisin "irectly "etermines (hether yu im+lement the Alters as acti%e r +assi%e

cm+nents.o '"acent +i+es *urther "eAne (hether a +assi%e Alter is triggere" by +ush r +ull * "ata.

D&(.5* * .'&'&*$ $%& $&)(3o $esign * a Alter cm+nent is base" bth n the task it must +er*rm an" n the

a"acent +i+es.

o  5u can im+lement +assi%e Alters as a *unctin, *r +ull acti%atin, r as a +rce"ure *r

+ush acti%atin.

o 'cti%e Alters can be im+lemente" either as +rcesses r as threa"s in the +i+eline

+rgram.

D&(.5* $%& &))) %*.*53

o Because the +i+eline cm+nents " nt share any glbal state, errr han"ling is har" t

a""ress an" is *ten neglecte". o 's a minimum, errr "etectin shul" be +ssible. )-U

"eAnes s+eciAc ut+ut channel *r errr messages, stan"ar" errr.o -* a Alter "etects errr in its in+ut "ata, it can ignre in+ut until sme clearly marke"

se+aratin ccurs. o -t is har" t gi%e a general strategy *r errr han"ling (ith a systembase" n the +i+es an" Alter +attern.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17G

Page 105: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 105/180

R ) ! - !/F0'R'RCH-CR )/!

S&$ $%& )/&((.*5 .&.*&3

o -* yur system han"les a single task yu can use a stan"ar"ize" main +rgram that sets u+

the +i+eline an" starts +rcessing.

o  5u can increase the >e=ibility by +r%i"ing a shell r ther en"Euser *acility t set u+%arius +i+elines *rm yur set * Alter cm+nents.

E+ample resolved

0e "i" nt *ll( the Pi+es an" Filters +attern strictly in ur Mcha cm+iler by im+lementingall +hases * the cm+iler as se+arate Alter +rgrams cnnecte" by +i+es. 0e cmbine" theArst *ur cm+iler +hases int a

R ) ! - !/F0'R

'RCH-CR )/!

single +rgram because they all access an" m"i*y the symbl table. his all(s us tim+lement the +i+e cnnectin bet(een thescanner an" the +arser as a sim+le *unctin call.

5ariants

•  ee an" in +i+eline systems3

•  he singleEin+ut singleEut+ut Alter s+eciAcatin * the Pi+es an" Filters +attern can be%arie" t all( Alters (ith mre than ne in+ut an"Sr mre than ne ut+ut.

• Fr e=am+le, t buil" a srte" list * all lines that ccur mre than nce -n a te=t Ale. (ecan cnstruct the *ll(ing shell +rgram3

# first create two auxiliary named pipes to be used

 mknod pipeA p mknod pipeB p

# now do the processing using available UNIX filters

# start side fork of processing in background:

sort pipeA > pipeB & 

# the main pipeline 

cat file tee pipeA sort -u comm -13 -  pipeB 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17<

Page 106: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 106/180

R ) ! - !/F0'R'RCH-CR )/!

 

*non uses

UNI 6BacQ9: ++ularize" the Pi+es an" Filters +ara"igm. he >e=ibility * )-U +i+esma"e the +erating system a suitable +la?rm *r the binary reuse * Alter +rgramsan" *r a++licatin integratin.CMS P.&.*&( 6HR48<: is an e=tensin t the +erating system * -BM main*rames tsu++rt Pi+es an" Filters architectures. -t +r%i"es a reuse an" integratin +lat*rm in the

same (ay as )-U.LASSPT( 6!et8<: is a tlset t su++rt numerical analysis an" gra+hics. he tlsetcnsists mainly * Alter +rgrams that can be cmbine" using )-U +i+es.

Conse)uences

 he Pi+es an" Filters architectural +attern has the *ll(ing&*&$( N .*$&)'&.$& &( *&/&((), $((.&3

o  Cm+uting results using se+arate +rgrams is +ssible (ithut +i+es, by string

interme"iate results in +i+es.F&...$ $%& $&) /%*5& o Filters ha%e sim+le inter*ace that all(s their

easy e=change (ithin a +rcessing +i+eline.F&...$ )&/'.*$.* o  his beneAt cmbine" (ith reusability * Alter

cm+nent all(s yu t create ne( +rcessing +i+elines by rearranging Alters rby a""ing ne( nes.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page <8

R&(& + $&) /'*&*$(3 o !u++rt *r recmbinatin lea"s t easy reuse * Alter

cm+nents.

R. )$$.*5 + .&.*&(3 o asy t +rtty+e a "ata +rcessing system *rm

e=isting Alters.

E/.&*/ )& )/&((.*5.

o -t is +ssible t start acti%e Alter cm+nents in +arallel in a multi+rcessr systemr a net(rk.

 he Pi+es an" Filters architectural +attern has the *ll(ing L...$.&(

S%).*5 ($$& .*+)'$.* .( &&*(.1& ) .*&.& o  his +attern is inecient i*

yur +rcessing stage nee"s t share a large amunt * glbal "ata.

E/.&*/ 5.* )& )/&((.*5 .( +$&* * .(.* , because3 o  he cst *r

trans*erring "ata bet(een Alters is relati%ely high cm+are" t the cst * thecm+utatin carrie" ut by a single Alter.

o !me Alter cnsumes all their in+ut be*re +r"ucing any ut+ut.

oCnte=tEs(itching bet(een threa"s r +rcesses is e=+ensi%e n a single +rcessrmachine.

o !ynchrnizatin * Alters %ia +i+es may start an" st+ Alters *ten.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 179

Page 107: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 107/180

R ) ! - !/F0'R'RCH-CR )/!

D$ $)*(+)'$.* 1&)%& o sing a single "ata ty+e *r all Alter in+ut an"

ut+ut t achie%e highest >e=ibility results in "ata cn%ersin %erhea"s.

E))) %*.*5 o -s "icult. ' cncrete errrErec%ery r errrEhan"ling strategy

"e+en"s n the task yu nee" t sl%e.

BLAC!BOARDThe blackboard architectural pattern is useful for problems for which no deterministicsolution strategies are known! %n blackboard several speciali6ed subsystems assemble their knowledge to build a possibly partial or approximate solution!

E+ample

Cnsi"er a s*t(are system *r s+eech recgnitin. he in+ut t the system is s+eechrecr"e" as a (a%e*rm. he system nt nly acce+ts single (r"s, but als (hlesentences that are restricte" t the synta= an" %cabulary nee"e" *r a s+eciAc a++licatin,such as a "atabase @uery. he "esire" ut+ut is a machine re+resentatin * thecrres+n"ing nglish +hrases.

Conte+t

'n imme"iate "main in (hich n clse" a++rach t a slutin is kn(n r *easible

$roblem

' blackbar" +attern tackle +rblems that " nt ha%e a *easible "eterministic slutin

*r the trans*rmatin * ra( "ata int high le%el "ata structures, such as "iagrams,tables, r nglish +hrases.

=am+les * "mains in (hich such +rblems ccur are3E %isin, image recgnitin, an"

s+eech recgnitin.

 hey are characterize" by +rblems that (hen "ecm+se" int sub +rblems, s+ans

se%eral Ael"s * e=+ertise.

 he !lutin t the +artial +rblems re@uires "i?erent re+resentatins an" +ara"igm.

 he *ll(ing forces in>uence slutins t +rblems * this kin"3 ' cm+lete search * the slutin s+ace is nt *easible in a reasnable time.

!ince the "main is immature, (e may nee" t e=+eriment (ith "i?erent algrithms *r

the same subtask. Hence, in"i%i"ual m"ules shul" be easily e=changeable.

 here are "i?erent algrithms that sl%e +artial +rblems.

-n+ut as (ell as interme"iate an" Anal results, ha%e "i?erent re+resentatin, an" the

algrithms are im+lemente" accr"ing t "i?erent +ara"igms.

'n algrithm usually (rks n the results * ther algrithms.

ncertain "ata an" a++r=imate slutins are in%l%e".

m+lying "is *act algrithms in"uces +tential +arallelism.

%olution

 he i"ea behin" the blackbar" architecture is a cllectin * in"e+en"ent +rgrams

that (rk c +erati%ely n a cmmn "ata structure.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17

Page 108: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 108/180

R ) ! - !/F0'R'RCH-CR )/!

ach +rgram is meant *r sl%ing a +articular +art * %erall task.

 hese +rgrams are in"e+en"ent * each ther they " nt call each ther, nr there is

a +re"eAne" se@uence *r their acti%atin. -nstea", the "irectin taken by the system ismainly "etermine" by the current state * +rgress.

' central cntrl cm+nent e%aluates the current state * +rcessing an" cr"inates

these +rgrams.  hese "ata "irecte" cntrl regime is re*erre" t as opportunistic problem solving! 

 he set * all +ssible slutins is calle" solution space an" is rganize" int le%els * 

abstractin.

 he name blackbar" (as chsen because it is reminiscent * the situatin in (hich

human e=+erts sit in *rnt * a real blackbar" an" (rk tgether t sl%e a +rblem.

ach e=+ert se+arately e%aluates the current state * the slutin, an" may g u+ t

the blackbar" at any time an" a"", change r "elete in*rmatin.

Humans usually "eci"e themsel%es (h has the ne=t access t the blackbar".

%tructure$i%i"e yur system int a cm+nent calle" a blackboard, a cllectin * knowledge sources,an" a control component!

B/): o Blackbar" is the central "ata stre. o lements * the slutin s+ace

an" cntrl "ata are stre" here.

o !et * all "ata elements that can a++ear n the blackbar" are re*erre" t as %cabulary.

o Blackbar" +r%i"es an inter*ace that enables all kn(le"ge surces t rea" *rm an"

(rite t it.

o 0e use the terms hy+thesis r blackbar" entry *r slutins that are cnstructe" "uring

the +rblem sl%ing +rcess an" +ut n the blackbar".

o ' hy+thesis has se%eral attributes, e=3 its abstractin le%el.

!*&5& ()/&3

o Kn(le"ge surces are se+arate, in"e+en"ent subsystem that sl%e s+eciAc as+ects * 

the %erall +rblem.o Kn(le"ge surces " nt cmmunicate "irectly they nly rea" *rm an" (rite t the

blackbar". o /*ten a kn(le"ge surce +erates n t( le%els * abstractin.

o ach kn(le"ge surce is res+nsible *r kn(ing the cn"itins un"er (hich it can

cntribute t a slutin. Hence, kn(le"ge surces are s+lit int.o &ondition part 3 e%aluates the current state * the slutin +rcess, as (ritten n the

blackbar", t "etermine i* it can make a cntributin.

o  +ction part 3 +r"uces a result that may causes a change t the blackbar"s cntent.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17Q

Page 109: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 109/180

R ) ! - !/F0'R'RCH-CR )/!

C*$) /'*&*$: 

o Runs a l+ that mnitrs the changes n the blackbar" an" "eci"es (hat actin t take

ne=t.

o -t sche"ules kn(le"ge surce e%aluatins an" acti%atins accr"ing t the kn(le"ge

a++licatins strategy. he basis *r this strategy is the "ata n the blackbar".

o   he *ll(ing Agureillustrates the relatinshi+ bet(een the three cm+nents * the blackbar"architecture.

 Kn(le"ge surce calls inspect!" t check the current slutins n the blackbar"

 Update!" is use" t make changes t the "ata n the blackbar"

  Cntrl cm+nent runs a l+ that mnitrs changes n the blackbar" an"

"eci"es (hat actins t take ne=t. nextource!"  is res+nsible *r this"ecisin.

Dynamics

 he *ll(ing scenari illustrates the beha%ir * the Blackbar" architecture. -t is base" nur s+eech recgnitin e=am+le3

  he main l+ * the Cntrl cm+nent is starte".

 Cntrl calls the nextsource ( ) +rce"ure t select the ne=t kn(le"ge surce.

 nextsource ( ) Arst "etermines (hich kn(le"ge surces are +tential cntributrs by

bser%ing the blackbar".

 nextsource() in%kes the cn"itinE+art * each can"i"ate kn(le"ge surce.

  he Cntrl cm+nent chses a kn(le"ge surce t in%ke, an" a hy+thesis r aset * hy+theses t be (rke" n.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 178

Page 110: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 110/180

R ) ! - !/F0'R'RCH-CR )/!

&mplementation D&*& $%& )&'

!+eci*y the "main * the +rblem

!crutinize the in+ut t the system

$eAne the S+ * the system

$etail h( the user interacts (ith the system.

D&*& $%& ($.* (/& +) $%& )&'

!+eci*y e=actly (hat cnstitutes a t+ le%el slutin

List the "i?erent abstractin le%els * slutins

/rganize slutins int ne r mre abstractin hierarchy.

Fin" sub"i%isins * cm+lete slutins that can be (rke" n in"e+en"ently. D.1.& $%& ($.* )/&(( .*$ ($&(3

$eAne h( slutins are trans*rme" int higher le%el slutins.

$escribe h( t +re"ict hy+thesis at the same abstractin le%els.

$etail h( t %eri*y +re"icte" hy+thesis by An"ing su++rt *r them in ther le%els.

!+eci*y the kin" * kn(le"ge that can be uses t e=clu"e +arts * the slutin s+ace.

D.1.& $%& *&5& .*$ (&/..& *&5&

 hese subtasks *ten crres+n" t areas * s+ecializatin.

D&*& $%& 1/) + $%& /)

labrate yur Arst "eAnitin * the slutin s+ace an" the abstractin le%els * yur

slutin.

Fin" a re+resentatin *r slutins that all(s all kn(le"ge surces t rea" *rm an"

cntribute t the blackbar".

 he %cabulary * the blackbar" cannt be "eAne" * kn(le"ge surces an" the

cntrl cm+nent.

S&/.+ $%& /*$) + $%& (($&'3

Cntrl cm+nent im+lements an ++rtunistic +rblemEsl%ing strategy that

"etermines (hich kn(le"ge surces are all(e" t make changes t the blackbar".

 he aim * this strategy is t cnstruct a hy+thesis that is acce+table as a result.

 he *ll(ing mechanisms +timizes the e%aluatin * kn(le"ge surces, an" s

increase the e?ecti%eness an" +er*rmance * cntrl strategy.

Classi*ying changes t the blackbar" int t( ty+es. /ne ty+e s+eci*y all blackbar"change that may im+ly ne( set * a++licable kn(le"ge surces, an" the ther s+eciAesall blackbar" changes that " nt.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 117

Page 111: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 111/180

R ) ! - !/F0'R'RCH-CR )/!

'ssciating categries * blackbar" changes (ith sets * +ssibly a++licable kn(le"ge

surces.

Fcusing * cntrl. he *cus cntains either +artial results n the blackbar" r

kn(le"ge surces that shul" be +re*erre" %er thers.

Creating n @ueue in (hich kn(le"ge surces classiAe" as a++licable (ait *r their

e=ecutin. I'&'&*$ $%& *&5& ()/&(

!+lit the kn(le"ge surces int cn"itin +arts an" actinE+arts accr"ing t the nee"s

* the cntrl cm+nent.

0e can im+lement "i?erent kn(le"ge surces in the same system using "i?erent

technlgies

5ariants 

P)/$.* (($&'(: use" in +s language. Here the subrutines are re+resente" as

cn"itinEactin rules, an" "ata is glbally a%ailable in (rking.

R&(.$): it is a generalizatin * blackbar" +attern the central "ata structure * this %ariant is calle" a re+sitry.

*non uses

HEARSAY-II  he Arst Blackbar" system (as the H'R!'5E-- s+eech recgnitin

system *rm the early 187s. -t (as "e%el+e" as a natural language inter*ace t aliterature "atabase. -ts task (as t ans(er @ueries abut "cuments an" t retrie%e"cuments *rm a cllectin * abstracts * 'rtiAcial -ntelligence +ublicatins. hein+uts t the system (ere acustic signals that (ere semantically inter+rete" an" thentrans*rme" t a "atabase @uery. he cntrl cm+nent * H'R!'5E-1 cnsists * the*ll(ing3

•  he *cus * cntrl "atabase, (hich cntains a table * +rimiti%e change ty+es * blackbar" changes, an" thse cn"itinE+arts that can be e=ecute" *r each changety+e.

•  he sche"uling @ueue, (hich cntains +inters t cn"itinE r actinE+arts * kn(le"gesurce.

•  he mnitr, (hich kee+s track * each change ma"e t the blackbar".

•  he sche"uler, (hich uses e=+erimentallyE"eri%e" heuristics t calculate +ririties *r thecn"itinE an" actinE +arts (aiting in the sche"uling @ueue.  H'!PS!-'P

CR5!'L-!  R-CR/

!!6Re*er te=t i* yu nee" mre"etails:

E+ample resolved

RP/L runs as a highE+ririty task ; calculates %erall rating *r the ne( hy+thesis

PR$-C (rks n a +hrase an" generates +re"ictins * all (r"s

4R-F5 %eri*y the e=istence *, r reect, a +re"icte" (r"

C/)C' generates a +hrase *rm %eriAe" (r" ; its +re"icting +hrase.6Re*er te=t i* yu nee" mre"etails:

Conse)uencesBlackbar" a++rach has the *ll(ing B&*&$(:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 111

Page 112: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 112/180

R ) ! - !/F0'R'RCH-CR )/!

E&).'&*$$.* o ' blackbar" +attern makes e=+erimentatin "i?erent algrithms

+ssible.

S)$ +) /%*5&..$ * '.*$.*..$ o  Kn(le"ge surces, cntrl

algrithm an" central "ata structure are strictly se+arate".

R&(& *&5& ()/&( o  Kn(le"ge surce an" un"erlying blackbar"

system un"erstan" the same +rtcl an" "ata.o  his means kn(le"ge surces reusable.

S)$ +) +$ $&)*/& * )($*&(( o  /nly thse that are strngly

su++rte" by "ata an" ther hy+theses sur%i%e

Blackbar" a++rach has the *ll(ing L...$.&(:

D./$ + $&($.*5 o Because it "es nt *ll( a "eterministic algrithm

N 5 ($.* .( 5)*$&&

D./$ + &($.(%.*5 5 /*$) ($)$&5 o  0e re@uire an e=+erimental

a++rach.

L &/.&*/ o Cm+utatinal %erhea"s in reecting (rng hy+thesis. H.5% &1&'&*$ &Q)$ o Mst blackbar" systems take years t e%l%e.

N ()$ +) )&.('3

R ) ! - !/F0'R'RCH-CR )/!

)- G N!-/) B')K

N

3

<UESTION YEAR MAR! 

S

1 0ith neat "iagrams, "e+ict the "ynamic beha%iur * +i+es an" Alters+attern

$ec78

17

2 0hat are the beneAts * a layere" +atternJ $ec78

G

# &i%e the structure * blackbar" (ith CRC car"s $ec78 9

G 0hat " yu mean by architectural +atternsJ H( is it categrize"J=+lain the structure +art * the slutin *r -!/ layere" architecture

 Tune17

17

< =+lain (ith a neat "iagram, the "ynamic scenari * +assi%e Alters Tune17

17

9 List the cm+nents * a +i+e an" Alters architectural +attern. 0ithsketches, e=+lain the CRC car"s *r the same

$ec17

Q

=+lain the *rces that in>uence the slutins t +rblems base" n

blackbar" +attern

$ec

17

Q 0rite a nte n the H'R!'5 -- system $ec17

<

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 112

Page 113: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 113/180

R ) ! - !/F0'R'RCH-CR )/!

8 $iscuss the #E+art schema (hich un"erlies the layers architectural+atterns, (ith re*erence t net(rking +rtcls

 Tune11

1G

17 Brie>y e=+lain the beneAts ?ere" by the +i+es an" Alters +attern Tune11

9

11 $iscuss the ste+s in%l%e" in the im+lementatin * +i+es an" Altersarchitecture

$ec11

12

12 0rite the cnte=t, +rblem an" slutin +art * blackbar" architectural+attern

$ec11

Q

1# List the cm+nents * a +i+e an" Alters architectural +attern. 0ithsketches, e=+lain the CRC car"s *r the same

 Tune12

Q

1G $eAne blackbar" architectural +attern. Brie>y e=+lain the ste+s tim+lement the blackbar" +attern

 Tune12

Q

1< 0rite a nte n the H'R!'5 -- system Tune12 G

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 99

)- <'RCH-CR'L P'R)!E2

DISTRIBUTED SYSTEMS0hat are the a"%antages * "istribute" systems that make them s interestingJ  

$istribute" systems all( better sharing an" utilizatin * the resurces a%ailable (ithin thenet(rk.

cnmics3 cm+uter net(rk that incr+rates bth +cs an" (rkstatins ?er a

better +riceS+er*rmance rati than main*rame cm+uter. Per*rmance an" scalability3 a huge increase in +er*rmance can be gaine" by using the

cmbine cm+uting +(er * se%eral net(rk n"es.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11#

Page 114: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 114/180

R ) ! - !/F0'R'RCH-CR )/!

-nherent "istributin 3 sme a++licatins are inherently "istribute". =3 "atabasea++licatins that *ll( a clientEser%er m"el.

Reliability 3 ' machine n a net(rk in a multi+rcessr system can crash (ithuta?ecting the rest * the system.

$isa"%antages hey nee" ra"ically "i?erent s*t(are than " centralize" systems.

0e intr"uce three +atterns relate" t "istribute" systems in this categry3

 he P.&( * F.$&)( $$&)* +r%i"es a structure *r systems that +rcess a stream* "ata. ach +rcessing ste+ is enca+sulate" in a Alter cm+nent. $ata is +asse"thrugh +i+es bet(een a"acent Alters.

 he M./)&)*& $$&)* a++lies t s*t(are systems that must be able t a"a+t tchanging system re@uirements. -t se+arates a minimal *unctinal cre *rm e=ten"e"*unctinality an" custmerEs+eciAc +arts

 he B)&) $$&)*  can be use" t structure "istribute" s*t(are systems (ith"ecu+le" cm+nents that interact by remte ser%ice in%catins.

BRO!ERThe broker architectural pattern can be used to structure distributed software systems withdecoupled components that interact by remote service invocations! + broker component isresponsible for coordinating communication such as re7uests as well as for transmittingresults and exceptions!

E+ample

!u++se (e are "e%el+ing a city in*rmatin system C-! "esigne" t run n a (i"e area

net(rk. !me cm+uters in the net(rk hst ne r mre ser%ices that maintainin*rmatin abut e%ents, restaurants, htels, histrical mnuments r +ublic trans+rtatin.Cm+uter terminals are cnnecte" t the net(rk. urists thrughut the city can retrie%ein*rmatin in (hich they are intereste" *rm the terminals using a 0rl" 0i"e 0eb 000br(ser. his *rntEen" s*t(are su++rts the nEline retrie%al * in*rmatin *rm thea++r+riate ser%ers an" its "is+lay n the screen. he "ata is "istribute" acrss the net(rk,an" is nt all maintaine" in the terminals.

Conte+t

 5ur en%irnment is a "istribute" an" +ssibly hetergeneus system (ith in"e+en"ent c+erating cm+nents.

$roblem

Buil"ing a cm+le= s*t(are system as a set * "ecu+le" an" inter+erating cm+nents,rather than as a mnlithic a++licatin, results in greater >e=ibility, maintainability an"

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11G

Page 115: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 115/180

R ) ! - !/F0'R'RCH-CR )/!

changeability. By +artitining *unctinality int in"e+en"ent cm+nents the systembecmes +tentially "istributable an" scalable. !er%ices *r a""ing, rem%ing, e=changing,acti%ating an" lcating cm+nents are als nee"e". Frm a "e%el+ers %ie(+int, thereshul" essentially be n "i?erence bet(een "e%el+ing s*t(are *r centralize" systems an""e%el+ing *r "istribute" nes.

0e ha%e t balance the *ll(ing *rces3• Cm+nents shul" be able t access ser%ices +r%i"e" by ther thrugh remte,

lcatinEtrans+arent ser%ice in%catins.

•  5u nee" t e=change, a"" r rem%e cm+nents at run time.

•  he architecture shul" hi"e system an" im+lementatinEs+eciAc "etails *rm theusers * cm+nent an" ser%ices.

%olution

• -ntr"uce a brker cm+nent t achie%e better "ecu+ling * clients an" ser%ers.

• !er%ers registers themsel%es (ith the brker make their ser%ices a%ailable t clientsthrugh meth" inter*aces.

• Clients access the *unctinality * ser%ers by sen"ing re@uests %ia the brker.• ' brkers tasks inclu"e lcating the a++r+riate ser%er, *r(ar"ing the re@uest t the

ser%er, an" transmitting results an" e=ce+tins back t the client.

•  he Brker +attern re"uces the cm+le=ity in%l%e" in "e%el+ing "istribute"a++licatins, because it makes "istributin trans+arent t the "e%el+er.

%tructure

 he brker architectural +attern cm+rises si= ty+es * +artici+ating cm+nents.

  S&)1&): o  -m+lements bects that e=+se their *unctinality thrugh inter*aces that

cnsists * +eratins an" attributes.

o  hese inter*aces are ma"e a%ailable either thrugh an inter*ace "eAnitin language

-$L r thrugh a binary stan"ar".

o  here are t( kin" * ser%ers3

 !er%ers ?ering cmmn ser%ices t many a++licatin "mains.

 !er%ers im+lementing s+eciAc *unctinality *r a single a++licatin "main r task.

 C.&*$:

o Clients are a++licatins that access the ser%ices * at least ne ser%er. 

o   call remte ser%ices, clients *r(ar" re@uests t the brker. '*ter an +eratin has

e=ecute" they recei%e res+nses r e=ce+tins *rm the brker. 

o -nteractin bS( ser%ers an" clients is base" n a "ynamic m"el, (hich means that

ser%ers may als act as clients. 

 B)&)(:

o -t is a messenger that is res+nsible *r transmissin * re@uests *rm clients tser%ers, as (ell as the transmissin * res+nses an" e=ce+tins back t the client.

o -t ?ers 'P-! t clients an" ser%ers that inclu"e +eratins *r registering ser%ers an"*r in%king ser%er meth"s.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11<

Page 116: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 116/180

R ) ! - !/F0'R'RCH-CR )/!

o 0hen a re@uest arri%es *rm ser%er that is maintaine" *rm lcal brker, the brker

+asses the re@uest "irectly t the ser%er. -* the ser%er is currently inacti%e, the brkeracti%ates it.

o -* the s+eciAe" ser%er is hste" by anther brker, the lcal brker An"s a rute t the

remte brker an" *r(ar"s the re@uest this rute.

o  here*re there is a nee" *r brkers t inter+erate thrugh bri"ges.

 C.&*$ (.& ): o  hey re+resent a layer bS( client an" the brker. o  he

+r=ies all( the hi"ing * im+lementatin "etails *rm the clients such as o  he inter+rcess cmmunicatin mechanism use" *r message trans*ers bS( clients an"

brkers. o  he creatin an" "eletin * blcks.

o  he marshalling * +arameters an" results.

 S&)1&) (.& ):

o  'nalgus t client si"e +r=y. he "i?erence that they are res+nsible *r recei%ing

re@uests, un+acking incming messages, un marshalling the +arameters, an" callingthe a++r+riate ser%ice.

  B).5&(: o  hese are +tinal cm+nents use" *r hi"ing im+lementatin "etails

(hen t( brkers inter+erate.

 he *ll(ing "iagram sh(s the bects in%l%e" in a brker system.

Dynamics

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 119

Page 117: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 117/180

R ) ! - !/F0'R'RCH-CR )/!

 S/&*). "3 illustrates the beha%iur (hen a ser%er registers itsel* (ith the lcal brker

cm+nent3

 S/&*). II illustrates the beha%iur (hen a client sen"s a re@uest t a lcal ser%er. -nthis scenari (e "escribe a synchrnus in%catin, in (hich the client blcks until it

gets a res+nse *rm the ser%er. he brker may als su++rt asynchrnusin%catins, all(ing clients t e=ecute *urther tasks (ithut ha%ing t (ait *r ares+nse.

 S/&*). III illustrates the interactin * "i?erent brkers %ia bri"ge cm+nents3

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11

Page 118: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 118/180

R ) ! - !/F0'R'RCH-CR )/!

6Please re*er te=t bk i* yu nee" "etaile" e=+lanatin* scenaris:

&mplementation

"> D&*& * &/$ &.($.*5 '&, ) (& * &.($.*5 '&3

ach bect m"el must s+eci*y entities such as bect names, re@uests, bects, %alues,

e=ce+tins, su++rte" ty+es, inter*aces an" +eratins.2> D&/.& %./% .* + /'*&*$-.*$&)&)..$ $%& (($&' (% Q&)3

•  5u can "esign *r inter+erability either by s+eci*ying a binary stan"ar" r byintr"ucing a highEle%el -$L.

• -$L Ale cntains a te=tual "escri+tin * the inter*aces a ser%er ?ers t its clients.

•  he binary a++rach nee"s su++rt *rm yur +rgramming language.

> S&/.+ $%& APIKS $%& )&) /'*&*$ )1.&( +) /)$.*5 .$% /.&*$(* (&)1&)(3  $eci"e (hether clients shul" nly be able t in%ke ser%er +eratinsstatically, all(ing clients t bin" the in%catins at cm+lete time, r yu (ant t all("ynamic in%catins * ser%ers as (ell.

  his has a "irect im+act n size an" n. * 'P-!.

;> U(& ) &/$( $ %.& .'&'&*$$.* &$.( +)' /.&*$( * (&)1&)(.• Client si"e +r=ies +ackage +rce"ure calls int message an" *r(ar" these messages t

the lcal brker cm+nent.

• !er%er si"e +r=ies recei%e re@uests *rm the lcal brker an" call the meth"s in theinter*ace im+lementatin * the crres+n"ing ser%er.

#> D&(.5* $%& )&) /'*&*$ .* )& .$% ($&( * ;

$uring "esign an" im+lementatins, iterate systematically thrugh the *ll(ing ste+s

<.1!+eci*y a "etaile" nEtheE(ire +rtcl *r interacting (ith client si"e an" ser%er si"e+r=ies.

<.2' lcal brker must be a%ailable *r e%ery +artici+ating machine in the net(rk.

<.#0hen a client in%kes a meth" * a ser%er the brker system is res+nsible *r

returning all results an" e=ce+tins back t the riginal client.<.G-* the +r%i"es " nt +r%i"e mechanisms *r marshalling an" un marshalling

+arameters results, yu must inclu"e *unctinality in the brker cm+nent.

<.<-* yur system su++rts asynchrnus cmmunicatin bS( clients an" ser%ers, yunee" t +r%i"e message bu?ers (ithin the brker r (ithin the +r=ies *r tem+rarystrage * messages.

<.9-nclu"e a "irectry ser%ice *r assciating lcal ser%er i"entiAers (ith the +hysicallcatin * the crres+n"ing ser%ers in the brker.

<.0hen yur architecture re@uires systemEuni@ue i"entiAers t be generate" "ynamically"uring ser%er registratin, the brker must ?er a name ser%ice *r instantiating suchnames.

<.Q-* yur system su++rts "ynamic meth" in%catin the brker nee"s sme means *rmaintaining ty+e in*rmatin abut e=isting ser%ers.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11Q

Page 119: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 119/180

R ) ! - !/F0'R'RCH-CR )/!

<.8Plan the brkers actin (hen the cmmunicatin (ith clients, ther brkers, r ser%ers*ails.

6> D&1& IDL /'.&)(

'n  -$L cm+iler translates the ser%er inter*ace "eAnitins t +rgramming languagec"e. 0hen many +rgramming languages are in use, it is best t "e%el+ the cm+iler

as a*rarne(rk that all(s the "e%el+er t a"" his (n c"e generatrs.

E+ample resolved

/ur e=am+le C-! system ?ers "i?erent kin"s * ser%ices. Fr e=am+le, a se+arate ser%er(rkstatin +r%i"es all the in*rmatin relate" t +ublic trans+rt. 'nther ser%er isres+nsible *r cllecting an" +ublishing in*rmatin n %acant htel rms. ' turist may beintereste" in retrie%ing in*rmatin *rm se%eral htels, s (e "eci"e t +r%i"e this "ata na single (rkstatin. %ery htel can cnnect t the (rkstatin an" +er*rm u+"ates.

5ariants

• D.)&/$ /''*./$.* )&) (($&':

0e may smetime chse t rela= the restrictin that clients can nly *r(ar"re@uests thrugh the lcal brkers *r eciency reasns

-n this %ariant, clients can cmmunicate (ith ser%er "irectly.

Brker tells the clients (hich cmmunicatin channel the ser%er +r%i"es.

 he client can then establish a "irect link t the re@ueste" ser%er   M&((5&

((.*5 )&) (($&': 

 his %ariant is suitable *r systems that *cus n the transmissin * "ata, instea" * 

im+lementing a remte +r"uce call abstractin.

-n this cnte=t, a message is a se@uence * ra( "ata tgether (ith a""itinal

in*rmatin that s+eciAes the ty+e * a message, its structure an" ther rele%ant

attributes. Here ser%ers use the ty+e * a message t "etermine (hat they must ", rather than

?ering ser%ices that clients can in%ke.

• T)&) (($&'3

' client re@uest is usually *r(ar"e" t e=actly ne uni@uely i"entiAe" ser%ers.

-n a tra"er system, the brker must kn( (hich ser%ers can +r%i"e the ser%ice an"

*r(ar" the re@uest t an a++r+riate ser%er.

Here client si"e +r=ies use ser%ice i"entiAers instea" * ser%er i"entiAers t access

ser%er *unctinality.

 he same re@uest might be *r(ar"e" t mre than ne ser%er im+lementing the same

ser%ice.

• A$&) )&) (($&':  '"a+ter layer is use" t hi"e the inter*aces * the brker cm+nent t the ser%ers

using a""itinal layer t enhance >e=ibility

 his a"a+ter layer is a +art * the brker an" is res+nsible *r registering ser%ers an"

interacting (ith ser%ers.

By su++lying mre than ne a"a+ter, su++rt "i?erent strategies *r ser%er granularity

an" ser%er lcatin.

=am+le3 use * an bect riente" "atabase *r maintaining bects.

• C/ )&) (($&':

-nstea" * im+lementing an acti%e cmmunicatin m"el in (hich clients +r"uce

re@uests an" ser%ers cnsume then an" als use a reacti%e m"el.

-ts a reacti%e m"el r e%ent "ri%en, an" makes n "istinctin bS( clients an" ser%ers.

0hene%er an e%ent arri%es, the brker in%kes the call back meth" * the cm+nent

that is registere" t react t the e%ent

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 118

Page 120: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 120/180

R ) ! - !/F0'R'RCH-CR )/!

 he e=ecutin * the meth" may generate ne( e%ents that in turn cause the brker t

trigger ne( call back meth" in%catins.

*non uses

 C/RB'

 !/MS$!/M /L 2.=

 000

 'MEP6Please re*er te=t bk i* yu nee" "etaile" e=+lanatin * these uses: 

Conse)uences

 he brker architectural +attern has sme im+rtant $enets3 

• L/$.* $)*()&*/:

'chie%e" using the a""itinal Xbrker cm+nent

• C%*5&..$ * &$&*(...$ + /'*&*$

-* ser%ers change but their inter*aces remain the same, it has n *unctinal im+act nclients.

• P)$..$ + )&) (($&':

Pssible because brker system hi"es +erating system an" net(rk system "etails *rmclients an" ser%ers by using in"irectin layers such as 'P-!, +r=ies an" bri"ges.

• I*$&)&)..$ &$&&* .Q&)&*$ )&) (($&'(3

$i?erent Brker systems may inter+erate i* they un"erstan" a cmmn +rtcl *r thee=change * messages.

• R&(..$

0hen buil"ing ne( client a++licatins, yu can *ten base the *unctinality * yura++licatin n e=isting ser%ices.

 he brker architectural +attern has sme im+rtant ,iabilities#

 R&($)./$& &/.&*/:

Brker system is @uite sl(er in e=ecutin.

 L&) +$ $&)*/&:

Cm+are" (ith a nnE"istribute" s*t(are system, a Brker system may ?er l(er *aulttlerance.

Fll(ing as+ect gi%es beneAts as (ell as liabilities.

 T&($.*5 * &55.*5:

 esting is mre rbust an" easier itsel* t test. H(e%er it is a te"ius b because * many cm+nents in%l%e".

INTERACTIE SYSTEMS hese systems all( a high "egree * user interactin, mainly achie%e" (ith the hel+ * gra+hical user inter*aces.

 ( +atterns that +r%i"e a *un"amental structural rganizatin *r interacti%e s*t(aresystems are3

M"elE%ie(Ecntrller +attern

PresentatinEabstractinEcntrl +attern

MODEL-IEW-CONTROLLER =MC> M8& architectural pattern divides an interactive application into three components!

The model contains the core functionality and data!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 127

Page 121: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 121/180

R ) ! - !/F0'R'RCH-CR )/!

8iews display information to the user!

&ontrollers handle user input!

8iews and controllers together comprise the user interface!

 + change propagation mechanism ensures consistence between the user interface and

the model!

E+ample

Cnsi"er a sim+le in*rmatin system *r +litical electins (ith +r+rtinal re+resentatin. his ?ers a s+rea"sheet *r entering "ata an" se%eral kin"s * tables an" charts *r+resenting the current results. sers can interact (ith the system %ia a gra+hical inter*ace.'ll in*rmatin "is+lays must re>ect changes t the %ting "ata immediately.

Conte+t

-nteracti%e a++licatins (ith a >e=ible humanEcm+uter inter*ace

$roblem

$i?erent users +lace cn>icting re@uirements n the user inter*ace. ' ty+ist enters

in*rmatin int *rms %ia the keybar". ' manager (ants t use the same system mainly byclicking icns an" buttns. Cnse@uently, su++rt *r se%eral user inter*ace +ara"igmsshul" be easily incr+rate". H( " yu m"ularize the user inter*ace *unctinality * a(eb a++licatin s that yu can easily m"i*y the in"i%i"ual +artsJ

 he *ll(ing *rces in>uence the slutin3

!ame in*rmatin is +resente" "i?erently in "i?erent (in"(s. Fr e=3 -n a bar r +ie

chart.

 he "is+lay an" beha%ir * the a++licatin must re>ect "ata mani+ulatins

imme"iately.

Changes t the user inter*ace shul" be easy, an" e%en +ssible at runEtime.

!u++rting "i?erent Xlk an" *eel stan"ar"s r +rting the user inter*ace shul" nt

a?ect c"e in the cre * the a++licatin.

%olution

M4C "i%i"es an interacti%e a++licatin int the three areas3 +rcessing, ut+ut an"

in+ut.

M"el cm+nent enca+sulates cre "ata an" *unctinality an" is in"e+en"ent * S+

an" iS+.

4ie( cm+nents "is+lay user in*rmatin t user a %ie( btains the "ata *rm the

m"el. here can be multi+le %ie(s * the m"el.

ach %ie( has an assciate" cntrller cm+nent cntrllers recei%e in+ut usually as

muse e%ents e%ents are translate" t ser%ice re@uests *r the m"el r the %ie(. he

user interacts (ith the system slely thrugh cntrllers.  he se+aratin * the m"el *rm %ie( an" cntrller cm+nents all(s multi+le

%ie(s * the same m"el.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 121

Page 122: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 122/180

R ) ! - !/F0'R'RCH-CR )/!

%tructure

M& /'*&*$: o Cntains the *unctinal cre * the a++licatin.

o Registers "e+en"ent %ie(s an" cntrllers

o )tiAes "e+en"ent cm+nents abut "ata changes change +r+agatin mechanism

.& /'*&*$:

o Presents in*rmatin t the user o Retrie%es "ata *rm the m"el

o Creates an" initializes its assciate" cntrllero -m+lements the u+"ate +rce"ure

C*$)&) /'*&*$:

o 'cce+ts user in+ut as e%ents muse e%ent, keybar" e%ent etc o  ranslates e%ents t

ser%ice re@uests *r the m"el r "is+lay re@uests *r the %ie(. o  he cntrller registers

itsel* (ith the changeE+r+agatin mechanism an" im+lements an u+"ate +rce"ure.

'n bectEriente" im+lementatin * M4C (ul" "eAne a se+arate class *r eachcm+nent. -n a CZZ im+lementatin, %ie( an" cntrller classes share a cmmn +arentthat "eAnes the u+"ate inter*ace. his is sh(n in the *ll(ing "iagram.

Dynamics

 he *ll(ing scenaris "e+ict the "ynamic beha%ir * M4C. Fr sim+licity nly ne %ie(Ecntrller +air is sh(n in the "iagrams.

S/&*). - sh(s h( user in+ut that results in changes t the m"el triggers thechangeE+r+agatin mechanism3

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 122

Page 123: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 123/180

R ) ! - !/F0'R'RCH-CR )/!

 he cntrller acce+ts user in+ut in its e%entEhan"ling +rce"ure, inter+rets the e%ent,an" acti%ates a ser%ice +rce"ure * the m"el.

 he m"el +er*rms the re@ueste" ser%ice. his results in a change t its internal "ata.

 he m"el ntiAes all %ie(s an" cntrllers registere" (ith the changeE+r+agatinmechanism * the change by calling their u+"ate +rce"ures.

ach %ie( re@uests the change" "ata *rm the m"el an" re"is+lays itsel* n the screen. ach registere" cntrller retrie%es "ata *rm the m"el t enable r "isable certain user

*unctins..   he riginal cntrller regains cntrl an" returns *rm its e%ent han"ling+rce"ure.

S/&*). II sh(s h( the M4C tria" is initialize". he *ll(ing ste+s ccur3

 he m"el instance is create", (hich then initializes its internal "ata structures.

A %ie( bect is create". his takes a re*erence t the m"el as a +arameter *r itsinitializatin.

 he %ie( subscribes t the changeE+r+agatin mechanism * the m"el by calling theattach +rce"ure.

 he %ie( cntinues initializatin by creating its cntrller. -t +asses re*erences bth t the

m"el an" t itsel* t the cntrllers initializatin +rce"ure.  he cntrller als subscribes t the changeE+r+agatin mechanism by calling the attach

+rce"ure.

'*ter initializatin, the a++licatin begins t +rcess e%ents.

&mplementation

"> S&)$& %'*-/'$&) .*$&)/$.* +)' /)& +*/$.*.$

'nalysis the a++licatin "main an" se+arate cre *unctinality *rm the "esire" in+ut

an" ut+ut beha%ir

2> I'&'&*$ $%& /%*5&-)5$.* '&/%*.('

Fll( the +ublisher subscriber "esign +attern *r this, an" assign the rle * the

+ublisher t the m"el.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12#

Page 124: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 124/180

R ) ! - !/F0'R'RCH-CR )/!

> D&(.5* * .'&'&*$ $%& 1.&(

"esign the a++earance * each %ie(

-m+lement all the +rce"ures assciate" (ith %ie(s.

;> D&(.5* * .'&'&*$ $%& /*$)&)(

Fr each %ie( * a++licatin, s+eci*y the beha%ir * the system in res+nse t user

actins.

0e assume that the un"erlying +attern "eli%ers e%ery actin * an" user as an e%ent. '

cntrller recei%es an" inter+rets these e%ents using a "e"icate" +rce"ure.

#> D&(.5* * .'&'&*$ $%& 1.& /*$)&) )&$.*(%.3

' %ie( ty+ically creates its assciate" cntrller "uring its initializatin.

6> I'&'&*$ $%& (&$ + MC3

 he setu+ c"e Arst initializes the m"el, then creates an" initializes the %ie(s.

'*ter initializatin, e%ent +rcessing is starte".

Because the m"el shul" remain in"e+en"ent * s+eciAc %ie(s an" cntrllers, this set

u+ c"e shul" be +lace" e=ternally. 7> D*'./ 1.& /)&$.*

-* the a++licatin all(s "ynamic +ening an" clsing * %ie(s, it is a g" i"ea t +r%i"ea cm+nent *r managing +en %ie(s.

8> 55&K /*$)&)(

 he se+aratin * cntrl as+ects *rm %ie(s su++rts the cmbinatin * "i?erent

cntrllers (ith a %ie(.

 his >e=ibility can be use" t im+lement "i?erent m"es * +eratin.

9> I*+)($)/$)& +) %.&))/%./ 1.&( * /*$)&)(

'++ly the cm+site +attern t create hierarchically cm+se" %ie(s.

-* multi+le %ie(s are acti%e simultaneusly, se%eral cntrllers may be intereste" in e%ents

at the same time.

"0> F)$%&) &/.*5 +)' (($&' &&*&*/.&(3

 Buil"ing a *rame(rk (ith an elabrate cllectin * %ie( an" cntrller classes ise=+ensi%e. 5u may (ant t make these classes +lat*rm in"e+en"ent. his is "nein sme !malltalk systems

5ariants

D/'&*$ .& - his %ariant rela=es the se+aratin * %ie( an" cntrller. -n se%eral &-+lat*rms, (in"( "is+lay an" e%ent han"ling are clsely inter(%en. 5u can cmbine theres+nsibilities * the %ie( an" the cntrller *rm M4C in a single cm+nent by sacriAcinge=changeability * cntrllers. his kin" * structure is *ten calle" $cumentE4ie(architecture. he %ie( cm+nent * $cumentE4ie( cmbines the res+nsibilities * cntrller an" %ie( in M4C, an" im+lements the user inter*ace * the system.

*non uses

S'$  E he bestEkn(n e=am+le * the use * the M"elE4ie(ECntrller +attern is

the userinter*ace *rame(rk in the !malltalk en%irnment

MFC E he $cumentE4ie( %ariant * the M"elE4ie(ECntrller +attern is integrate" in

the 4isual CZZ en%irnmentEthe Micrs*t Fun"atin Class LibraryE*r "e%el+ing0in"(s a++licatins.

ET E ZZ establishes lk an" *eel in"e+en"ence by "eAning a class Windowport

that enca+sulates the user inter*ace +lat*rm "e+en"encies.

Conse)uences$enets#

• M$.& 1.&( + $%& ('& '&:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12G

Page 125: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 125/180

R ) ! - !/F0'R'RCH-CR )/!

-t is +ssible because M4C strictly se+arates the m"el *rm user inter*acescm+nents.

• S*/%)*.& 1.&(:

-t is +ssible because * changeE+r+agatin mechanism * the m"el.

• 55& 1.&( * /*$)&):

-t is +ssible because * cnce+tual se+aratin * M4C.• E/%*5&..$ + * +&&K

Because the m"el is in"e+en"ent * all userEinter*ace c"e, a +rt * M4C a++licatint a ne( +lat*rm "es nt a?ect the *unctinal cre * the a++licatin.

• F)'&) $&*$.

-t is +ssible t base an a++licatin *rame(rk n this +attern.

,iabilities#

• I*/)&(& /'&.$

Fll(ing the M"elE4ie(ECntrller structure strictly is nt al(ays the best (ay tbuil" an interacti%e a++licatin 

• P$&*$. +) &/&((.1& *'&) + $&(

-* a single user actin results in many u+"ates, the m"el shul" ski+ unnecessarychange ntiAcatins. 

• I*$.'$& /**&/$.* 1.& * /*$)&)

Cntrller an" %ie( are se+arate but clselyErelate" cm+nents, (hich hin"ers theirin"i%i"ual reuse.

• C(& /.*5 + 1.&( * /*$)&)( $ '&

Bth %ie( an" cntrller cm+nents make "irect calls t the m"el. his im+lies thatchanges t the m"els inter*ace are likely t break the c"e * bth %ie( an"cntrller.

• I*&1.$..$ + /%*5& $ 1.& * /*$)&) %&* )$&) his is because all "e+en"encies n the userEinter*ace +lat*rm are enca+sulate"(ithin %ie( an" cntrller.

 D./$ + (.*5 MC .$% '&)* (&) .*$&)+/& $(

-* +rtability is nt an issue, using highEle%el tlkits r user inter*ace buil"ers can ruleut the use * M4C.

PRESENTATION-ABSTRACTION-CONTROL"+& denes a structure for interactive s.w systems in the form of a hierarchy of cooperatingagents!

/very agent is responsible for a specic aspect of te applications functionality and consistsof three components  "resentation

  +bstraction &ontrol

The subdivision separates the human-computer interaction aspects of the agent from itsfunctional core and its communication with other agents!

E+ample

Cnsi"er a sim+le in*rmatin system *r +litical electins (ith +r+rtinal re+resentatin. his ?ers a s+rea"sheet *r entering "ata an" se%eral kin"s * tables an" charts *r+resenting current stan"ings. sers interact (ith the s*t(are thrugh a gra+hical inter*ace.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12<

Page 126: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 126/180

R ) ! - !/F0'R'RCH-CR )/!

Conte+t

$e%el+ment * an interacti%e a++licatin (ith the hel+ * agents

$roblem

'gents s+ecialize" in humanEcm+ interactin acce+t user in+ut an" "is+lay "ata. /theragents maintain the "ata m"el * the system an" ?er *unctinality that +erates n this"ata. '""itinal agents are res+nsible *r errr han"ling r cmmunicatin (ith ther

s*t(are systems he *ll(ing *rces a?ect slutin3 'gents *ten maintain their (n state an" "ata h(e%er, in"i%i"ual agents must

e?ecti%ely c +erate t +r%i"e the %erall task * the a++licatin. achie%e thisthey nee" a mechanism *r e=changing "ata, messages an" e%ents.

-nteracti%e agents +r%i"e their (n user inter*ace, since their res+ecti%e humanEcm+

interactins *ten "i?er (i"ely

!ystems e%l%e %er time. heir +resentatin as+ect is +articularly +rne t change.

 he use * gra+hics, an" mre recently, multime"ia *eatures are e=3 * +er%asi%echanges t user inter*aces. Changes t in"i%i"ual agents, r the e=tensin * thesystem (ith ne( agents, shul" nt a?ect the (hle system.

%olution !tructure the interacti%e a++licatin as a treeElike hierarchy * P'C agents e%ery agent is

res+nsible *r a s+eciAc agent * the a++licatins *unctinality an" cnsists * threecm+nents3 Presentatin

'bstractin Cntrl

 he agents +resentatin cm+nent +r%i"es the %isible beha%ir * the P'C agent

  -ts abstractin cm+nent maintains the "ata m"el that un"erlies the agent, an"+r%i"es *unctinality that +erates n this "ata.

  -ts cntrl cm+nent cnnects the +resentatin an" abstractin cm+nents an"+r%i"es the *unctinality that all( agent t cmmunicate (ith ther P'C agents.

  he t+Ele%el P'C agent +r%i"es the *unctinal cre * the system. Mst ther P'Cagents "e+en" r +erate n its cre.

  he bttmEle%el P'C agents re+resent sel* cntaine" semantic cnce+ts n (hichusers * the system can act, such as s+rea"sheets an" charts.

  he interme"iateEle%el P'C agents re+resent either cmbinatin *, r relatinshi+ bS(.l(er le%el agent.

%tructure

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 129

Page 127: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 127/180

R ) ! - !/F0'R'RCH-CR )/!

T &1& PAC 5&*$:

o Main res+nsibility is t +r%i"e the glbal "ata m"el * the s*t(are. his is maintaine"

in the abstractin cm+nent * t+ le%el agent.

o  he +resentatin cm+nent * the t+ le%el agent may inclu"e userEinter*ace elementscmmn t (hle a++licatin.

o  he cntrl cm+nent has three res+nsibilities

'll(s l(er le%el agents t make use * the ser%ices * mani+ulate the glbal "ata

m"el.

-t c r"inates the hierarchy * P'C agents. -t maintains in*rmatin abut cnnectins

bS( t+ le%el agent an" l(erEle%el agents.

-t maintains in*rmatin abut the interactin * the user (ith system.

B$$' &1& PAC 5&*$:

o Re+resents a s+eciAc semantic cnce+t * the a++licatin "main, such as mail b= in a

nS( management system.

o  he +resentatin cm+nent * bttm le%el P'C agents +resents a s+eciAc %ie( * thecrres+n"ing semantic cnce+t, an" +r%i"es access t all the *unctins users can a++lyt it.

o  he abstractin cm+nent has a similar res+nsibility as that * t+ le%el P'C agentmaintaining agent s+eciAc "ata.

o  he cntrl cm+nent maintains cnsistency bS( the abstractin an" +resentatin

cm+nents, by a%i"ing "irect "e+en"encies bS( them. -t ser%es as an a"a+ter an"+er*rms bth inter*ace an" "ata a"a+tin.

I*$&)'&.$& &1& PAC 5&*$ o Can *ulAll t( "i?erent rles3 cm+sitin an" c

r"inatin.

o -t "eAnes a ne( abstractin, (hse beha%ir encm+asses bth the beha%ir * itscm+nent, an" the ne( characteristics that are a""e" t the cm+site bect.

o 'bstractin cm+nent maintains the s+eciAc "ata * the interme"iate le%el P'C agent.

o Presentatin cm+nent im+lements its user inter*ace. o  Cntrl cm+nent has same

res+nsibilities * thse * bttm le%el an" t+ le%el P'C agents.

 he *ll(ing /M "iagram illustrates the P'C hierarchy * the in*rmatin system *r+litical electins

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12

Page 128: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 128/180

R ) ! - !/F0'R'RCH-CR )/!

Dynamics

S/&*). I "escribes the c+eratin bet(een "i?erent P'C agents (hen +ening a ne(

barEchart %ie( * the electin "ata. -t is "i%i"e" int A%e +hases3 ' user asks the +resentatin cm+nent * the %ie( cr"inatr agent t +en a ne( bar

chart.

 he cntrl * the %ie( cr"inatr agent instantiates the "esire" barEchart agent.

 he %ie( cr"inatr agent sen"s an +en e%ent t the cntrl cm+nent * the ne(barEchart agent.

 he cntrl cm+nent * the barEchart agent Arst retrie%es "ata *rm the t+Ele%el P'Cagent. he %ie( cr"inatr agent me"iates bet(een bttm an" t+Ele%el agents. he"ata returne" t the barEchart agent is sa%e" in its abstractin cm+nent. -ts cntrlcm+nent then calls the +resentatin cm+nent t "is+lay the chart.

 he +resentatin cm+nent creates a ne( (in"( n the screen, retrie%es "ata *rm the

abstractin cm+nent by re@uesting it *rm the cntrl cm+nent, an" Anally "is+laysit (ithin the ne( (in"(.

S/&*). II  sh(s the beha%ir * the system a*ter ne( electin "ata is entere",+r%i"ing a clser lk at the internal beha%ir * the t+le%el P'C agent. -t has A%e+hases3

 he user enters ne( "ata int a s+rea"sheet. he cntrl cm+nent * the s+rea"sheetagent *r(ar"s this "ata t the t+le%el P'C agent.

 he cntrl cm+nent * the t+Ele%el P'C agent recei%es the "ata an" tells the t+Ele%elabstractin t change the "ata re+sitry accr"ingly. he abstractin cm+nent * thet+Ele%el agent asks its cntrl cm+nent t u+"ate all agents that "e+en" n the ne("ata. he cntrl cm+nent * the t+Ele%el P'C agent there*re ntiAes the %ie(

cr"inatr agent.  he cntrl cm+nent * the %ie( cr"inatr agent *r(ar"s the change ntiAcatin t

all %ie( P'C agents it is res+nsible *r cr"inating.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12Q

Page 129: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 129/180

R ) ! - !/F0'R'RCH-CR )/!

's in the +re%ius scenari, all %ie( P'C agents then u+"ate their "ata an" re*resh theimage they "is+lay.

&mplementation

"> D&*& '& + $%& ./$.*

'nalyze the +rblem "main an" ma+ it nt an a++r+riate sS( structure.

2> D&*& 5&*&) ($)$&5 +) )5*..*5 $%& PAC %.&))/%!+eci*y general gui"elines *r rganizing the hierarchy * c +erating agents.

/ne rule t *ll( is that * l(est cmmn ancestrD. 0hen a gru+ * l(er le%elagents "e+en"s n the ser%ices r "ata +r%i"e" by anther agent, (e try t s+eci*ythis agent as the rt * the sub tree *rme" by the l(er le%el agents. 's acnse@uence, nly agents that +r%i"e glbal ser%ices rise t the t+ * the hierarchy.

> S&/.+ $%& $-&1& PAC 5&*$

-"enti*y thse +arts * the analysis m"el that re+resent the *unctinal cre * thesystem.

;> S&/.+ $%& $$'-&1& PAC 5&*$

-"enti*y thse cm+nents * the analysis m"el that re+resent the smallest sel*E

cntaine" units * the system n (hich the user can +er*rm +eratins r %ie(+resentatins.

#> S&/.+ $$'-&1& PAC 5&*$( +) (($&' (&)1./&

/*ten an a++licatin inclu"es a""itinal ser%ices that are nt "irectly relate" t its+rimary subect. -n ur e=am+le system (e "eAne an errr han"ler.

6> S&/.+ .*$&)'&.$& &1& PAC 5&*$( $ /'(& &) &1& PAC 5&*$(

/*ten, se%eral l(erEle%el agents tgether *rm a higherEle%el semantic cnce+t n(hich users can +erate.

7> S&/.+ .*$&)'&.$& &1& PAC 5&*$( $ / ).*$& &) &1& PAC 5&*$(

Many systems ?er multi+le %ie(s * the same semantic cnce+t. Fr e=am+le, in te=te"itrs yu An" layut an" e"itO %ie(s * a te=t "cument. 0hen the "ata in ne

%ie( changes, all ther %ie(s must be u+"ate".8> S&)$& /)& +*/$.*.$ +)' %'*-/' .*$&)/$.*3

Fr e%ery P'C agent, intr"uce +resentatin an" abstractin cm+nent.

9> P)1.& $%& &$&)* .*$&)+/& $ &)$& .$% $%&) 5&*$( -m+lement this as+art * cntrl cm+nent.

"0> L.* $%& %.&))/% $5&$%&)

Cnnect e%ery P'C agent (ith thse l(er le%el P'C agents (ith (hich it "irectly c+erates

PAC 5&*$( ( /$.1& &/$( E %ery P'C agent can be im+lemente" as an acti%e

bect that li%es in its (n threa" * cntrl.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 128

Page 130: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 130/180

 

).*$(:

 

 

 

 

Liabilities3 

 

 

 

R ) ! - !/F0'R'RCH-CR )/!

PAC 5&*$( ( )/&((&( E su++rt P'C agents lcate" in "i?erent

+rcesses r n remte machines, use +r=ies t lcally re+resent theseP'C agents an" t a%i" "irect "e+en"encies n their +hysical lcatin.  

*non uses

N&$) $)/ '*5&'&*$• &athering trac "ata *rm s(itching units.

•  hreshl" checking an" generatin * %er>( e=ce+tins.

• Lgging an" ruting * net(rk e=ce+tins.

• 4isualizatin * trac >( an" net(rk e=ce+tins.

• $is+laying %arius userEcnAgurable %ie(s * the (hle net(rk.

• !tatistical e%aluatins * trac "ata.

• 'ccess t histric trac "ata.

• !ystem a"ministratin an" cnAguratin. 

M.& )$

• Pr%i"e the rbt (ith a "escri+tin * the en%irnment it (ill (rk in, +lacesin this en%irnment, an" rutes bet(een +laces.

• !ubse@uently m"i*y the en%irnment.

• !+eci*y missins *r the rbt.

• Cntrl the e=ecutin * missins.   /bser%e the +rgress * missins. 

Conse)uences

$enets#- (&)$.* + /*/&)*( o $i?erent semantic cnce+ts in the

a++licatin "main are re+resente" by se+arate agents.

S)$ +) /%*5& * &$&*(.* o Changes (ithin the +resentatin

r abstractin cm+nents * a P'C agent " nt a?ect ther agents inthe system.

S)$ +) '$. $(.*5 o P'C agents can be "istribute"

easily t "i?erent threa"s, +rcesses r machines. o Multi

tasking als *acilitates multi user a++licatins.

I*/)&(& (($&' /'&.$

-m+lementatin * e%ery semantic cnce+t (ithin an a++licatin as its (nP'C agent may result in a cm+le= system structure.

C'& /*$) /'*&*$

• -n"i%i"ual rles * cntrl cm+nents shul" be strngly se+arate" *rmeach ther. he im+lementatins * these rles shul" nt "e+en" n s+eciAc"etails * ther agents.

•  he inter*ace * cntrl cm+nents shul" be in"e+en"ent * internal"etails.

• -t is the res+nsibility * the cntrl cm+nent t +er*rm any necessaryinter*ace an" "ata a"a+tatin.

E/.&*/:

• /%erhea" in cmmunicatin bet(een P'C agents may im+act systemeciency.

• =am+le3 'll interme"iateEle%el agents are in%l%e" in "ata e=change. i* a

bttmEle%el agent retrie%e "ata *rm t+Ele%el agent.A./..$:

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#7

Page 131: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 131/180

R ) ! - !/F0'R'RCH-CR )/!

•  he smaller the atmic semantic cnce+ts * an a++licatins are, an" the greater thesimilarly * their user inter*aces, the less a++licable this +attern is.

R ) ! - !/F0'R

'RCH-CR )/!

)- < N!-/) B')K

N

3

<UESTION YEAR MAR! 

S

1 =+lain the %ariants * brker architecture $ec78

17

2 $e+ict the "ynamic beha%ir * M4C, (ith any ne scenari $ec78

<

# &i%e the CRC car"s *r t+ le%el, interme"iate le%el an" bttm le%elP'CEagents

$ec78

<

G 0hat " yu mean by brker architectureJ 0hat are the ste+s in%l%e"in im+lementing "istribute" brker architecture +atternsJ

 Tune17

17

< =+lain (ith a neat "iagram, the "ynamic scenaris * M4C Tune

17

17

9 0hat is the necessity * +r=ies an" bri"ge cm+nents in a brkersystemJ =+lain

$ec17

9

=+lain the +ssible "ynamic beha%ir * M4C +attern, (ith suitablesketches

$ec17

8

Q Highlight the limitatins * P'C +attern $ec17

<

8 &i%e "etaile" e=+lanatin n the "i?erent ste+s in%l%e" in theim+lementatin * the brker +attern

 Tune11

1<

17 Pr+se the "escri+tin * a scenari that "e+icts the "ynamic beha%ir

* M4C in "etail. !u++rt the "escri+tin (ith a++r+riate +ictrialre+resentatin

 Tune

11

<

11 $iscuss the mst rele%ant scenari, illustrating the "ynamic beha%ir * a brker system

$ec11

17

12 $iscuss the cnse@uences * P'C architectural +attern $ec11

17

1# $eAne brker architectural +attern. =+lain (ith a "iagram the bectsin%l%e" in a brker system

 Tune12

1G $e+ict the "ynamic beha%ir * M4C, (ith any ne scenari Tune12

1< &i%e the CRC car"s *r t+ le%el, interme"iate le%el an" bttm le%elP'CEagents

 Tune12

9

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#1

Page 132: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 132/180

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page Q#

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#2

Page 133: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 133/180

)- 9'RCH-CR'L P'R)!E#

ADAPTABLE SYSTEMS he systems that e%l%e %er timeE ne( *unctinality is a""e" an" e=isting ser%ices are change"

a"a+ti%e systems. heymust su++rt ne( %ersins * /!, userE inter*ace +lat*rms r thir"E +arty cm+nents an" libraries.$esign *r change is a mar cncern (hen s+eci*ying the architecture * a s*t(are system.

0e "iscuss t( +atterns that hel+s (hen "esigning *r change.

  M./)&)*& $$&)*  a++lies t s*t(are systems that must be able t a"a+t t changire@uirements.

  R&&/$.* $$&)*  +r%i"es a mechanism *r changing structure an" beha%ir * s*t("ynamically.

MICRO!ERNEL he micrkernel architectural +atterna++lies t s*t(are systems that must be able t a"a+t t chan

re@uirements. -t se+arates a minimal *unctinal cre *rm e=ten"e" *unctinality an" custmE s+eciAc +arts themicrkernel als ser%es as a scket *r +lugging in these e=tensinsan" cr"inating their cllabratin.

 E'&:

!u++se (e inten" t "e%el+ a ne( +erating system *r "eskt+ cm+uters calle" Hy"ra.that this inn%ati%e +erating system must be easily +rtable t the rele%ant har"(are +lat* must beable t accmm"ate *uture "e%el+ments easily. -t must als be able t run a++licatins

++ular +erating systems such as Micrs*t 0in"(s an")-U!ystem4. ' user shul" be able t ch(hich +erating system he (ants *rm a ++E u+ menu be*re starting an a++licatin. Hy"ra(ill "is+lay allthe a++licatins currently running (ithin its main (in"(3

 C*$&$:

 he "e%el+ment * se%eral a++licatins that usesimilar +rgramming inter*aces that buil" n the sa*unctinality.

 

P)&':$e%el+ing s*t(are *r an a++licatin "main that nee"s t c+e (ith a bra" s+ectrum

an" technlgy is a nntri%ial task (ell kn(n. =3 are a++licatin +lat*rm such as /! an" &-!. he *ll(ing *rces are t be cnsi"ere" (hen "esigning such systems.

   he a++licatin +lat*rm must c+e (ith cntinuus har"(are an" s*t(are e%lutin.

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1##

Page 134: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 134/180

R ) ! - !/F0'R'RCH-CR )/!

  he a++licatin +lat*rm shul" be +rtable, e=tensible an" a"a+table t all( easyintegratin * emerging technlgies.

'++licatin +lat*rm such as an /! shul" als be able t emulate ther a++licatin+lat*rms that belng t the same a++licatin "main. his lea"s t *ll(ing *rces.

  he a++licatins in yur "main nee" t su++rt "i?erent but, similar a++licatin

+lat*rms.  he a++licatins may be categrize" int gru+s that use the same *unctinal cre in

"i?erent (ays, re@uiring the un"erlying a++licatin +lat*rm t emulate e=istingstan"ar"s.

'""itinal *rce must be taken t a%i" +er*rmance +rblem an" t guarantee scalability.

•  he *unctinal cre * the a++licatin +lat*rm shul" be se+arate" int a cm+nent(ith minimal memry size, an" ser%ices that cnsume as little +rcessing +(er as+ssible.

%olution

• nca+sulates the *un"amental ser%ices * yur a++licatins +lat*rm in a micrkernel

cm+nent.• -t inclu"es *unctinality that enables ther cm+nents running in "i?erent +rcess t

cmmunicate (ith each ther.

• -t +r%i"es inter*aces that enable ther cm+nents t access its *unctinality. o  Cre

*unctinality shul" be inclu"e" in internal servers.  o  E+ternal servers  im+lement

their (n %ie( * the un"erlying micrkernel.

o  Clients cmmunicate (ith e=ternal ser%ers by using the cmmunicatin *acilities+r%i"e" by micrkernel.

%tructure

Micrkernel +attern "eAnes < kin"s * +artici+ating cm+nents. -nternal ser%ers

 =ternal ser%ers

 '"a+ters

 Clients

 Micrkernel

M./)&)*& o  he micrkernel re+resents the main cm+nent * the +attern. o  -t

im+lements central ser%ices such as cmmunicatin *acilities r resurce han"ling. o

 he micrkernel is als res+nsible *r maintaining system resurces such as +rcesses

r Ales.

o -t cntrls an" cr"inates the access t these resurces. o  ' micrkernel im+lementsatmic ser%ices, (hich (e re*er t as mechanisms.

o  hese mechanisms ser%e as a *un"amental base n (hich mre cm+le= *unctinality

calle" +licies are cnstructe".

A* .*$&)* (&)1&) =((($&'> o =ten"s the *unctinality +r%i"e" by micrkernel.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#G

Page 135: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 135/180

R ) ! - !/F0'R'RCH-CR )/!

o -t re+resents a se+arate cm+nent that ?ers a""itinal *unctinality.

o Micrkernel in%kes the *unctinality * internal ser%ices %ia ser%ice re@uests.

o  here*re internal ser%ers can enca+sulates sme "e+en"encies n the un"erlying

har"(are r s*t(are system.

A* &$&)* (&)1&) =&)(*.$> o ses the micrkernel *r im+lementing its (n

%ie( * the un"erlying a++licatin "main. o  ach e=ternal ser%er runs in se+arate

+rcess. o  -t recei%es ser%ice re@uests *rm client a++licatins using the

cmmunicatin *acilities +r%i"e" by the micrkernel, inter+rets these re@uests,e=ecutes the a++r+riate ser%ices, an" returns its results t clients.

o $i?erent e=ternal ser%ers im+lement "i?erent +licies *r s+eciAc a++licatin "mains.

C.&*$:

o -t is an a++licatin that is assciate" (ith e=actly ne e=ternal ser%er. -t nly accesses the

+rgramming inter*aces +r%i"e" by the e=ternal ser%er.

o Prblem arises i* a client accesses the inter*aces * its e=ternal ser%er "irectly "irect

"e+en"ency

!uch a system "es nt su++rt changeability

-* e=t ser%ers emulate e=isting a++licatin +lat*rms clients (ill nt run (ithut

m"iAcatins.

A$&) emulatr o Re+resents the inter*aces bS( clients an" their e=ternal ser%ersan" all( clients t access the ser%ices * their e=ternal ser%er in a +rtable (ay.

o  hey are +art * the clients a""ress s+ace. o  he *ll(ing /M "iagram sh(s the staticstructure * a micrkernel system.

 he *ll(ing /M "iagram sh(s the static structure * a Micrkernel system.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#<

Page 136: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 136/180

R ) ! - !/F0'R'RCH-CR )/!

Dynamics

S/&*). I "emnstrates the beha%ir (hen a client calls a ser%ice * its e=ternal ser%er3

't a certain +int in its cntrl >( the client re@uests a ser%ice *rm an e=ternal

ser%er by calling the a"a+ter.

 he a"a+ter cnstructs a re@uest an" asks the micrkernel *r a cmmunicatin link(ith the e=ternal ser%er.

 he micrkernel "etermines the +hysical a""ress * the e=ternal ser%er an" returns it

t the a"a+ter.

'*ter retrie%ing this in*rmatin, the a"a+ter establishes a "irect cmmunicatin link t

the e=ternal ser%er.

 he a"a+ter sen"s the re@uest t the e=ternal ser%er using a remte +rce"ure call.

 he e=ternal ser%er recei%es the re@uest, un+acks the message an" "elegates the task

t ne * its (n meth"s. '*ter cm+leting the re@ueste" ser%ice, the e=ternal ser%ersen"s all results an" status in*rmatin back t the a"a+ter.

 he a"a+ter returns t the client, (hich in turn cntinues (ith its cntrl >(.

S/&*). II  illustrates the beha%ir * a Micrkernel architecture (hen an e=ternal ser%erre@uests a ser%ice that is +r%i"e" by an internal ser%er

 he e=ternal ser%er sen"s a ser%ice re@uest t the micrkernel.

' +rce"ure * the +rgramming inter*ace * the micrkernel is calle" t han"le the

ser%ice re@uest. $uring meth" e=ecutin the micrkernel sen"s a re@uest t aninternal ser%er.

'*ter recei%ing the re@uest, the internal ser%er e=ecutes the re@ueste" ser%ice an"

sen"s all results back t the micrkernel.

 he micrkernel returns the results back t the e=ternal ser%er. Finally, the e=ternal ser%er retrie%es the results an" cntinues (ith its cntrl >(.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#9

Page 137: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 137/180

R ) ! - !/F0'R'RCH-CR )/!

&mplementation

"3 A*& $%& ./$.* '.*:

Per*rm a "main analysis an" i"enti*y the cre *unctinality necessary *rim+lementing e=t ser%ers.

23 A*& &$&)* (&)1&)(

 hat is +lices e=t ser%ers are ging t +r%i"e3 C$&5).& $%& (&)1./&(

&ru+ all *unctinality int semantically in"e+en"ent categries.

;3 P)$.$.* $%& /$&5).&(

!e+arate the categries int ser%ices that shul" be +art * the micrkernel, an" thsethat shul" be a%ailable as internal ser%ers.

#3 F.* /*(.($&*$ * /'&$& (&$ + &)$.*( * ($)/$.*(  *r e%erycategry yu i"entiAe" in ste+ 1.

63 D&$&)'.*& $%& ($)$&5.&( +) )&&($ $)*('.((.* * )&$).&13

• !+eci*y the *acilities the micrkernel shul" +r%i"e *r cmmunicatin bS(cm+nents.

• Cmmunicatin strategies yu integrate "e+en" n the re@uirements * thea++licatin "main. 73 S$)/$)& $%& './)&)*& /'*&*$

$esign the micrkernel using the layers +attern t se+arate systemEs+eciAc +arts *rmsystemin"e+en"ent +arts * the kernel.

83 S&/.+ $%& )5)''.*5 .*$&)+/&( + './)&)*&

  " s, yu nee" t "eci"e h( these inter*aces shul" be accessible e=ternally.

 5u must take int an accunt (hether the micrkernel is im+lemente" as a se+arate+rcess r as a m"ule that is +hysically share" by ther cm+nent in the latter case,yu can use cn%entinal meth" calls t in%ke the meth"s * the micrkernel.

93  he micrkernel is res+nsible *r '*5.*5 (($&' )&()/&( such as memryblcks, "e%ices r &1./& /*$&$( E a han"le t an ut+ut area in a &-

im+lementatin."03 D&(.5* * .'&'&*$ $%& .*$&)* (&)1&)( ( (&)$& )/&((&( )

(%)& .)).&(

• Per*rm this in +arallel (ith ste+s E8, because sme * the micrkernel ser%ices nee" taccess internal ser%ers.

• -t is hel+*ul t "istinguish bS( acti%e an" +assi%e ser%ers   'cti%e ser%ers are

im+lemente" as +rcesses  Passi%e ser%ers as share" libraries.

• Passi%e ser%ers are al(ays in%ke" by "irectly calling their inter*ace meth"s, (here asacti%e ser%er +rcess (aits in an e%ent l+ *r incming re@uests.  

"" I'&'&*$ $%& &$&)* (&)1&)(

  ach e=ternal ser%er is im+lemente" as a se+arate +rcess that +r%i"e its

(n ser%ice inter*ace    he internal architecture * an e=ternal ser%er "e+en"s n

the +licies it cm+rises  !+eci*y h( e=ternal ser%ers "is+atch re@uests t

their internal +rce"ures.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#

Page 138: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 138/180

 

).*$(:

 

 

 

R ) ! - !/F0'R'RCH-CR )/!

"23 I'&'&*$ $%& $&)(

• Primary task * an a"a+ter is t +r%i"e +eratins t its clients that are *r(ar"e" t ane=ternal ser%er.

•  5u can "esign the a"a+ter either as a cn%entinal library that is statically linke" t client"uring cm+licatin r as a share" library "ynamically linke" t the client n "eman".

"3 D&1& /.&*$ ./$.*(  r usee=isting nes *r the rea"yEtErun micrkernelsystem.

E+ample resolved

!hrtly a*ter the "e%el+ment * Hy"ra has been cm+lete", (e are aske" t integrate ane=ternal ser%er that emulates the '++le Mac/! +erating system. +r%i"e a Mac/!emulatin n t+ * Hy"ra, the *ll(ing acti%ities are necessary3

$uilding an external server   n t+ * the Hy"ra micrkernel that

im+lements all the +rgramming inter*aces +r%i"e" by Mac/!,inclu"ing the +licies * the Macintsh user inter*ace.

"roviding an adapter   that is "esigne" as a library, "ynamicallylinke" t clients.   %mplementing the internal servers  re@uire" *rMac/!.

Microkernel system with indirect client-server communications!

-n this %ariant, a client that (ants t sen" a re@uest r message t an e=ternal ser%er asksthe micrkernel *r a cmmunicatin channel. 'istributed microkernel systems!

-n this %ariant a micrkernel can als act as a message backbne res+nsible *r sen"ingmessages t remte machines r recei%ing messages *rm them.

*non uses he M/% micrkernel is inten"e" t *rm a base n (hich ther +erating systems can

be emulate". /ne * the cmmercially a%ailable +erating systems that use Mach asits system kernel is )eU!P.

 he +erating system A'& cnsists * t( basic elements3 the micrkernel itsel* an" a cllectin * ser%ers subsystems that are use" t im+lement the marity * 'mebas *unctinality. he kernel +r%i"es *ur basic ser%ices3 the management * +rcesses an" threa"s, the l(Ele%elEmanagement * system memry, cmmunicatinser%ices, bth *r +intEtE+int cmmunicatin as (ell as gru+cmmunicatin, an"l(Ele%el -S/ ser%ices.

C%)( is a cmmerciallyEa%ailable Micrkernel system that (as riginally "e%el+e"

s+eciAcally *r realEtime a++licatins.W.*( NT (as "e%el+e" by Micrs*t as an +erating system *r highE+er*rmanceser%ers.

M!DE Micrkernel $atenbank ngine system intr"uces an architecture *r "atabaseengines that *ll(s the Micrkernel +attern.

Conse)uences

 he micrkernel +attern ?ers sme im+rtant $enets#

P)$..$:

High "egree * +rtability

F&...$ * &$&*(...$:

-* yu nee" t im+lement an a""itinal %ie(, all yu nee" t " is a"" a ne( e=ternalser%er.

=ten"ing the system (ith a""itinal ca+abilities nly re@uires the a""itinal r e=tensin

* internal ser%ers.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#Q

Page 139: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 139/180

R ) ! - !/F0'R'RCH-CR )/!

S&)$.* + ./ * '&/%*.('

 he micrkernel cm+nent +r%i"es all the mechanisms necessary t enable e=ternalser%ers t im+lement their +licies.

$istribute" micrkernel has *urther beneAts3

S/..$'  "istribute" Micrkernel system is a++licable t the "e%el+ment * +eratingsystems r "atabase systems *r cm+uter net(rks, r multi+rcessrs (ith lcalmemry R&...$

' "istribute" Micrkernel architecture su++rts a%ailability, because it all(s yu t runthe same ser%er n mre than ne machine, increasing a%ailability. Fault tlerance maybe easily su++rte" because "istribute" systems all( yu t hi"e *ailures *rm a user.

T)*()&*/

-n a "istribute" system cm+nents can be "istribute" %er a net(rk * machines. -nsuch a cnAguratin, the Micrkernel architecture all(s each cm+nent t accessther cm+nents (ithut nee"ing t kn( their lcatin.

 he micrkernel +attern als has ,iabilities#

 P&)+)'*/&:

Lesser than mnlithic s*t(are system there*re (e ha%e t +ay a +rice *r >e=ibility

an" e=tensibility.   C'&.$ + &(.5* * .'&'&*$$.*: $e%el+ a

micrkernel is a nnEtri%ial task.

REFLECTIONThe re9ection architectural pattern provides a mechanism for changing structure andbehavior of software systems dynamically! %t supports the modication of fundamentalaspects such as the type structures and function call mechanisms! %n this pattern anapplication is split into two parts#

  + Meta level provides information about selected system properties and makes the s.wself aware!

  + base level includes application logic changes to information kept in the Meta levela(ect subse7uent base-level behavior!

E+ample

Cnsi"er a CZZ a++licatin that nee"s t (rite bects t "isk an" rea" them in again. Manyslutins t this +rblem, such as im+lementing ty+eEs+eciAc stre an" rea" meth"s, aree=+ensi%e an" errrE+rne. Persistence an" a++licatin *unctinality are strngly inter(%en.-nstea" (e (ant t "e%el+ a +ersistence cm+nent that is in"e+en"ent * s+eciAc ty+estructures

Conte+t

Buil"ing systems that su++rt their (n m"iAcatin a +rir

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#8

Page 140: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 140/180

R ) ! - !/F0'R'RCH-CR )/!

$roblem

• $esigning a system that meets a (i"e range * "i?erent re@uirements a +rir can be an%er(helming task.

• ' better slutin is t s+eci*y an architecture that is +en t m"iAcatin an" e=tensini.e., (e ha%e t "esign *r change an" e%lutin.

• !e%eral *rces are assciate" (ith the +rblem3 Changing s*t(are is te"ius, errr +rne an" *ten e=+ensi%e.

'"a+table s*t(are systems usually ha%e a cm+le= inner structure. 's+ects that are

subect t change are enca+sulate" (ithin se+arate cm+nents.

 he mre techni@ues that are necessary *r kee+ in a system changeable the mre

a(k(ar" an" cm+le= its m"iAcatins becmes.

Changes can be * any scale, *rm +r%i"ing shrtcuts *r cmmnly use" cmman"s t

a"a+ting an a++licatin *rame(rk *r a s+eciAc custmer.

%en *un"amental as+ects * s*t(are systems can change *r e=. cmmunicatin

mechanisms bS( cm+nents.

%olution

Make the s*t(are sel*Ea(are, an" make select as+ects * its structure an" beha%ir

accessible *r a"a+tatin an" change. o  his lea"s t an architecture that is s+lit int

t( mar +arts3 ' Meta le%el o ' base le%el

Meta le%el +r%i"es a sel* re+resentatin * the sS( t gi%e it kn(le"ge * its (n

structure an" beha%ir an" cnsists * s calle" Meta ob2ects they enca+sulate an"re+resent in*rmatin abut the s*t(are. =3 ty+e structures algrithms r *unctincall mechanisms.

Base le%el "eAnes the a++licatin lgic. -ts im+lementatin uses the Meta bects t

remain in"e+en"ent * thse as+ects that are likely t change.

'n inter*ace is s+eciAe" *r mani+ulating the Meta bects. -t is calle" the Meta ob2ect  protocol M/P an" all(s clients t s+eci*y +articular changes.

%tructure

 Meta le%el

 Meta bects +rtclM/P

 Base le%el

 M&$ &1&

  Meta le%el cnsists * a set * Meta bects. ach Meta bect enca+sulates selecte"in*rmatin abut a single as+ect * a structure, beha%ir, r state * the base le%el.

 here are three surces *r such in*rmatin.• -t can be +r%i"e" by run time en%irnment * the system, such as CZZ ty+e

i"entiAcatin bects.

• -t can be user "eAne" such as *unctin call mechanism   -t can be retrie%e" *rm thebase le%el at run time.

'll Meta bects tgether +r%i"e a sel* re+resentatin * an a++licatin.

0hat yu re+resent (ith Meta bects "e+en"s n (hat shul" be a"a+table nly

system "etails that are likely t change r (hich %ary *rm custmer t custmer shul"be enca+sulate" by Meta bects.

 he inter*ace * a Meta bects all(s the base le%el t access the in*rmatin it

maintains r the ser%ices it ?ers.

 B(& &1&

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G7

Page 141: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 141/180

R ) ! - !/F0'R'RCH-CR )/!

-t m"els an" im+lements the a++licatin lgic * the s*t(are. -ts cm+nent

re+resents the %arius ser%ices the system ?ers as (ell as their un"erlying "atam"el.

-t uses the in* an" ser%ices +r%i"e" by the Meta bects such as lcatin in*rmatin

abut cm+nents an" *unctin call mechanisms. his all(s the base le%el t remain

>e=ible. Base le%el cm+nents are either "irectly cnnecte" t the Meta bects an" (hich

they "e+en" r submit re@uests t them thrugh s+ecial retrie%al *unctins.

 M&$ &/$ )$/ =MOP>

!er%es an e=ternal inter*ace t the Meta le%el, an" makes the im+lementatin * a

re>ecti%e system accessible in a "eAne" (ay.

Clients * the M/P can s+eci*y m"iAcatins t Meta bects r their relatinshi+s using

the base le%el

M/P itsel* is res+nsible *r +er*rming these changes. his +r%i"es a re>ecti%e

a++licatin (ith e=+licit cntrl %er its (n m"iAcatin.

Meta bect +rtcl is usually "esigne" as a se+arate cm+nent. his su++rts the

im+lementatin * *unctins that +erate n se%eral Meta bects.   +er*rm changes, the M/P nee"s access t the internals * Meta bects, an" als t

base le%el cm+nents smetimes.

/ne (ay * +r%i"ing this access is t all( the M/P t "irectly +erate n theirinternal states.

'nther (ay sa*er, inecient is t +r%i"e s+ecial inter*ace *r their mani+ulatin,nly accessible by M/P.

 he general structure * a re>ecti%e architecture is %ery much like a Layere" system

Dynamics-ntereste" stu"ents can re*er te=t bk *r scenaris since the "iagrams are t hectic ; cant be memrize"

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G1

Page 142: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 142/180

R ) ! - !/F0'R'RCH-CR )/!

&mplementation 

-terate thrugh any subse@uence i* necessary.

"3 D&*& '& + $%& ./$.*

'nalyze the +rblem "main an" "ecm+se it int an a++r+riate sS( structure.

23 I&*$.+ 1).*5 &%1.)

'nalyze the "e%el+e" m"el an" "etermine (hich * the a++licatin ser%ices may %ary

an" (hich remain stable.

Fll(ing are e=3 * system as+ects that *ten %ary o Real time cnstraints o  ransactin

+rtcls

o -nter Prcess Cmmunicatinmechanism

o Beha%ir in case *  

e=ce+tins o  'lgrithm *r

a++licatin ser%ices.

3 I&*$.+ ($)/$) (&/$( * the system, (hich (hen change", shul" nt a?ect theim+lementatin * the base le%el.

;3 I&*$.+ (($&' (&)1./&( $%$ ()$ $% $%& 1).$.* + ./$.* (&)1./&(

.&*$.& -n ste+ 2 an" the in"e+en"ence * structural "etails i"entiAe" in ste+ # g3 *r

system ser%ices are

Resurce allcatin

&arbage allcatin  Page s(a++ing

/bect creatin.

#3 D&*& $%& '&$ &/$(

Fr e%ery as+ect i"entiAe" in # +re%ius ste+s, "eAne a++r+riate Meta bects.

nca+sulating beha%ir is su++rte" by se%eral "main in"e+en"ent "esign +atterns, such

as bectiAer strategy, bri"ge, %isitr an" abstract *actry.

63 D&*& $%& MOP

 here are t( +tins *r im+lementing the M/P.

• -ntegrate it (ith Meta bects. %ery Meta bect +r%i"es thse *unctins * the M/P that+erate n it.

• -m+lement the M/P as a se+arate cm+nent.

Rbustness is a mar cncern (hen im+lementing the M/P. rrrs in change

s+eciAcatins shul" be "etecte" (here%er +ssible.

73 D&*& $%& (& &1&

-m+lement the *unctinal cre an" user inter*ace * the system accr"ing t the analysis

m"el "e%el+e" in ste+ 1. se Meta bects t kee+ the base le%el e=tensible an" a"a+table. Cnnect e%ery base

le%el cm+nent (ith Meta bects that +r%i"e system in*rmatin n (hich they "e+en",such as ty+e in*rmatin etc.

Pr%i"e base le%el cm+nents (ith *unctins *r maintaining the relatinshi+s (ith their

assciate" Meta bects. he M/P must be able t m"i*y e%ery relatinshi+ bS( basele%el an" Meta le%el.

E+ample resolved

nlike languages like CL/! r !malltalk. CZZ "es nt su++rt re>ectin %ery (ellEnly thestan"ar" class ty+e[in*  +r%i"es re>ecti%e ca+abilities3 (e can i"enti*y an" cm+are ty+es.

/ne slutin *r +r%i"ing e=ten"e" ty+e in*rmatin is t inclu"e a s+ecial ste+ in thecm+ilatin +rcess. -n this, (e cllect ty+e in*rmatin *rm the surce Ales * thea++licatin, generate c"e *r instantiating the metabects, an" link this c"e (ith thea++licatin. !imilarly, the bect creatr metabect is generate". sers s+eci*y c"e *r

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G2

Page 143: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 143/180

R ) ! - !/F0'R'RCH-CR )/!

instantiating an em+ty bect * e%ery ty+e, an" the tlkit generates the c"e *r themetabect. !me +arts * the system are cm+ilerE"e+en"ent, such as ?set an" sizecalculatin.

5ariants

 0e9ection with several Meta levels!metimes metabects "e+en" n each ther. !uch a s*t(are system has an inAnitenumber * meta le%els in (hich each meta le%el is cntrlle" by a higher ne, an"(here each meta le%el has its (n metabect +rtcl. -n +ractice, mst e=istingre>ecti%e s*t(are cm+rises nly ne r t( meta le%els.

*non uses

CLOS3 

 his is the classic e=am+le * a re>ecti%e +rgramming language 6KeeQ8:. -n CL/!,+eratins "eAne" *r bects are calle" generic *unctins, an" their +rcessing isre*erre" t as generic *unctin in%catin. &eneric *unctin in%catin is "i%i"e" int

three +hases3  he system Arst "etermines the meth"s that are a++licable t a gi%en in%catin.

-t then srts the a++licable meth"s in "ecreasing r"er * +rece"ence.

 he system Anally se@uences the e=ecutin * the list * a++licable meth"s.

MIP 

-t is a runEtime ty+e in*rmatin system *r CZZ. he *unctinality * M-P is se+arate"int *ur layers3

 he Arst layer inclu"es in*rmatin an" *unctinality that all(s s*t(are t i"enti*y an"cm+are ty+es.

 he secn" layer +r%i"es mre "etaile" in*rmatin abut the ty+e system * ana++licatin.

 he thir" layer +r%i"es in*rmatin abut relati%e a""resses * "ata members, an" ?ers*unctins *r creating em+ty bects * userE"eAne" ty+es.

 he *urth layer +r%i"es *ull ty+e in*rmatin, such as that abut *rien"s * a class,+rtectin * "ata members, r argument an" return ty+es * *unctin members.

PG&* 

-t all(s an a++licatin t stre an" rea" arbitrary CZZ bect structures.

NEDIS 

)$-! inclu"es a meta le%el calle" runEtime "ata "ictinary. -t +r%i"es the *ll(ingser%ices an" system in*rmatin3

Pr+erties *r certain attributes * classes, such as their all(e" %alue ranges.

Functins *r checking attribute %alues against their re@uire" +r+erties.   $e*ault%alues *r attributes * classes, use" t initialize ne( bects.  Functins s+eci*ying the

beha%ir * the system in the e%ent * errrs  CuntryEs+eciAc *unctinality, *r e=am+le

*r ta= calculatin.

-n*rmatin abut the lk an" *eel * the s*t(are, such as the layut * in+ut masks rthe language t be use" in the user inter*ace.

OLE 230 

-t +r%i"es *unctinality *r e=+sing an" accessing ty+e in*rmatin abut /L bectsan" their inter*aces.

Conse)uences

 he re>ectin architecture +r%i"es the *ll(ing $enets#o N &./.$ './$.* + ()/& /&:

 5u ust s+eci*y a change by calling *unctin * the M/P.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G#

Page 144: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 144/180

R ) ! - !/F0'R'RCH-CR )/!

o C%*5.*5 (+$)& (($&' .( &(

M/P +r%i"es a sa*e an" uni*rm mechanism *r changing sS(. it hi"es all s+eciActechni@ues such as use * %isitrs, *actries *rm user.

o S)$ +) '* .* + /%*5&:

Because Meta bects can enca+sulate e%ery as+ect * system beha%ir, state an"structure.

 he re>ectin architecture als has ,iabilities#

o M./$.*( $ '&$ &1& ' /(& '5&:

  -ncrrect m"iAcatins *rm users cause serius "amage t the sS( r itsen%irnment. =3

changing a "atabase schema (ithut sus+en"ing the e=ecutin * bects in thea++licatins that use it r +assing c"e t the M/P that inclu"es semantic errrs Rbustness * M/P is there*re * great im+rtance.

o I*/)&(& *'&) + /'*&*$(:

-t inclu"es mre Meta bects than base le%el cm+nents.

o L&) &/.&*/:

!l(er than nn re>ecti%e systems because * cm+le= reln+ bS( base an" meta le%el.

o N$ ((.& /%*5&( $ $%& (+$)& )& ()$& =3 changes re=tensins t base le%el c"e.

o N$ *55&( ()$ )&&/$.*

$icult t im+lement in C ZZ

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1GG

Page 145: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 145/180

R ) ! - !/F0'R'RCH-CR )/!

)- 9 N!-/) B')K

N3 <UESTION YEAR MAR!S

1 =+lain the beneAts an" liabilities * micrkernel +attern $ec 78 17

2 numerate the im+lementatin ste+s * re>ectin +attern $ec 78 17

# 0hat are the ste+s in%l%e" in im+lementing the micrkernel systemJ Tune17

12

G 0hat are the beneAts an" liabilities * re>ectin architecture +atternJ Tune17 Q

< List an" e=+lain the +artici+ating cm+nents * a micrkernel +attern $ec 17 17

9 =+lain the kn(n uses * re>ectin +attern $ec 17 17

$iscuss the beneAts an" liabilities * micrkernel +attern Tune11

17

Q &i%e the "etaile" e=+lanatin n the "i?erent kn(n a++licatins ?ere"by the re>ectin +attern

 Tune11

17

8 =+lain in brie*, the cm+nents cm+rising the structure * micrkernel

architectural +attern

$ec 11 17

17 0ith an e=am+le, e=+lain (hen the re>ectin architectural +attern isuse". 0hat are its beneAtsJ

$ec 11 17

11 0hat are the ste+s in%l%e" in im+lementing the micrkernel systemJ Tune12

Q

12 =+lain the kn(n uses * re>ectin +attern Tune12

9

Page 146: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 146/180

1# =+lain the a"%antages an" "isa"%antages * re>ectin architectural +attern Tune 12 9

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 8<

Page 147: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 147/180

R ) ! - !/F0'R'RCH-CR )/!

)-

!/M $!-&) P'R)!

INTRODUCTION:$esign +atterns are me"ium scale +atterns. hey are smaller in scale than architectural+atterns, but are at a higher le%el than the +rgramming language s+eciAc i"ims.

0e gru+ "esign +atterns int categries * relate" +atterns, in the same (ay as (e "i" *rarchitectural +atterns3

 S$)/$) D&/'(.$.*

 his categry inclu"es +atterns that su++rt a suitable "ecm+sitin * subsystems an"cm+le= cm+nents int cE+erating +arts. he 0hleEPart +attern is the mst general+attern (e are a(are * in this categry.

 O)5*.$.* + W)3 his categry cm+rises +atterns that "eAne h( cm+nents cllabrate tgether tsl%e a cm+le= +rblem. 0e "escribe the MasterE!la%e +attern, (hich hel+s yu trganize the cm+utatin * ser%ices *r (hich *ault tlerance r cm+utatinal accuracyis re@uire".

 A//&(( C*$)3

!uch +atterns guar" an" cntrl access t ser%ices r cm+nents. 0e "escribe the Pr=y+attern here.

 M*5&'&*$3

 his categry inclu"es +atterns *r han"ling hmgenus cllectins * bects, ser%icesan" cm+nents in their entirety. 0e "escribe t( +atterns3 the Cmman" Prcessr+attern a""resses the management an" sche"uling * user cmman"s, (hile the 4ie(Han"ler +attern "escribes h( t manage %ie(s in a s*t(are system.

 C''*./$.*3

Patterns in this categry hel+ t rganize cmmunicatin bet(een cm+nents. (+atterns a""ress issues * interE+rcess cmmunicatin3 the Fr(ar"erERecei%er +attern"eals (ith +eerEtE+eer cmmunicatin, (hile the Client $is+atcherE!er%er +attern"escribes lcatinEtrans+arent cmmunicatin in a ClientE!er%er structure.

STRUCTURAL DECOMPOSITION:!ubsystems an" cm+le= cm+nents are han"le" mre easily i* structure" int smaller

in"e+en"ent cm+nents, rather than remaining as mnlithic blck * c"e.0e "iscuss (hleE+art "esign +attern that su++rts the structural "ecm+sitin * thecm+nent.

WHOLE-PARTWhole-part design pattern helps with the aggregation of components that together form asemantic unit!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G

Page 148: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 148/180

R ) ! - !/F0'R'RCH-CR )/!

 +n aggregate component the whole encapsulates its constituent components the partsorgani6es their collaboration and provides a common interface to its functionality! 'irect access to the parts is not possible!

E+ample

' cm+uterEai"e" "esign C'$ system *r 2E$ an" #E$ m"elling all(s engineers t "esigngra+hical bects interacti%ely. Fr e=am+le, a car bect aggregates se%eral smaller bectssuch as (heels an" (in"(s, (hich themsel%es may be cm+se" * e%en smaller bects suchas circles an" +lygns. -t is the res+nsibility * the car bect t im+lement *unctinality that+erates n the car as a (hle, such as rtating r "ra(ing.

Conte+t

-m+lementing aggregate bects

$roblem

• -n almst e%ery s*t(are system bects that are cm+se" * ther bects e=ists. !uchaggregate bects " nt re+resent lselyEcu+le" set * cm+nents. -nstea", they *rmunits that are mre than ust a mere cllectin * their +arts.

•  he cmbinatin * the +arts makes ne( beha%ir emergeE such beha%ir is calle" emergentbeha%ir.

• 0e nee" t balance *ll(ing *rces (hen m"eling such structuresI

' cm+le= bect shul" either be "ecm+se" int smaller bects, r cm+se" * e=isting

bects, t su++rt reusability, changeability an" the recmbinatin * the cnstituentbects in ther ty+es * aggregate.

Clients shul" see the aggregate bect as an atmic bect that "es nt all( any "irect

access t its cnstituent +arts.

%olution

• -ntr"uce a cm+nent that enca+sulates smaller bects an" +re%ents clients *rmaccessing theses cnstitutes +arts "irectly.

• $eAne an inter*ace *r the aggregate that is the nly means * access t the*unctinalities * the enca+sulate" bects all(ing the aggregate t a++ear as semantic

unit.•  he +rinci+le * (hleE+art +attern is a++licable t the rganizatin * three ty+es * 

relatinshi+  'n assembly-parts relatinshi+ (hich "i?erentiatin bS( a +r"uct an" its+arts r subassemblies.

' container-contents relatinshi+, in (hich the aggregate" bect re+resents a cntainer.

 he collection-members relatinshi+, (hich hel+s t gru+ similar bects.

%tructure

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1GQ

Page 149: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 149/180

D*'./(:

 

R ) ! - !/F0'R'RCH-CR )/!

 he 0hleEPart +attern intr"uces t( ty+es * +artici+ant3

W%&

0hle bect re+resents an aggregatin * smaller bects, (hich (e call+arts.

-t *rms a semantic gru+ing * its +arts in that it c r"inates an"

rganizes their cllabratin.!me meth"s * (hle may be ust +lace hl"er *r s+eciAc +art ser%ices(hen such a meth" is in%ke" the (hle nly calls the rele%ant +artser%ices, an" returns the result t the client.

P)$

ach +art bect is embe""e" in e=actly ne (hle. ( r mre +artscannt share the same +art.

ach +art is create" an" "estrye" (ithin the li*e s+an * the (hle.

!tatic relatinshi+ bet(een (hle an" its +art are illustrate" in the /M "iagrambel(

 he *ll(ing scenari illustrates the beha%ir * a 0hleEPart structure. 0e use

the t(E"imensinal rtatin * a line (ithin a C'$ system as an e=am+le. he line

acts as a 0hle bect that cntains t( +ints + an" as Parts. ' client asks the

line bect t rtate arun" the +int c an" +asses the rtatin angle as an

argument. he rtatin * a +int arun" a center c with an angle a can be

calculate" using the *ll(ing *rmula3

-n the "iagram bel( the rtatin * the line gi%en by the +ints + an" @ isillustrate".

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G8

Page 150: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 150/180

R ) ! - !/F0'R'RCH-CR )/!

 he scenari cnsists * *ur +hases3

' client in%kes the rtate meth" * the line L an" +asses the angle a an" the rtatincenter c as arguments.

 he line L calls the rtate meth" * the+int +.  he line L calls the rtate meth"* the +int @.

 he line L re"ra(s itsel* using the ne( +sitins * + # an" @ # as en"+ints.

&mplementation

23 D&(.5* $%& ./ .*$&)+/& + $%& %&

'nalyze the *unctinality the (hle must ?er t its clients.

/nly cnsi"er the clients %ie( +int in this ste+.

 hink * the (hle as an atmic cm+nent that is nt structure" int +arts.

3 S&)$& $%& %& .*$ )$(, ) (*$%&(.& .$ +)' &.($.*5 *&(3

 here are t( a++raches t assembling the +arts either assemble a (hle XbttmEu+ *rm

e=isting +arts, r "ecm+se it Xt+E"(n int smaller +arts.

Mi=tures * bth a++raches is *ten a++lie"

;3 I+ + $$' )/%, use e=isting +arts *rm cm+nent libraries rclass libraries an" s+eci*y their cllabratin.

#3 I+ + $ * )/%, )$.$.* $%& W%&( (&)1./&( .*$ ('&)/)$.*5 (&)1./&( an" ma+ these cllabrating ser%ices t se+arate +arts.

63 S&/.+ $%& (&)1./&( + $%& %& .* $&)'( + (&)1./&( + $%& )$(3$eci"e (hether all +art ser%ices are calle" nly by their (hle, r i* +arts may als calleach ther.

 ( are t( +ssible (ays t call a Part ser%ice3

\ -* a client re@uest is *r(ar"e" t a Part ser%ice, the Part "es nt use any kn(le"geabut the e=ecutin cnte=t * the 0hle, relying n its (n en%irnment instea".

\ ' "elegatin a++rach re@uires the 0hle t +ass its (n cnte=t in*rmatin t thePart.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<7

Page 151: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 151/180

R ) ! - !/F0'R'RCH-CR )/!

73 I'&'&*$ $%& )$(

-* +arts are (hleE+art structures themsel%es, "esign them recursi%ely starting (ithste+1 . i* nt reuse e=isting +arts *rm a library.

83 I'&'&*$ $%& %&

-m+lement ser%ices that "e+en" n +art bects by in%king their ser%ices *rm the (hle.

 5ariants

S%)& )$(:

 his %ariant rela=es the restrictin that each Part must be assciate" (ith e=actly ne0hle by all(ing se%eral 0hles t share the same Part.

A((&' )$(

-n this %ariant the 0hle may be an bect that re+resents an assembly * smallerbects. 

C*$.*&) /*$&*$(

-n this %ariant a cntainer is res+nsible *r maintaining "i?ering cntents 

C&/$.* '&'&)(

 his %ariant is a s+ecializatin * CntainerECntents, in that the Part bects all ha%e thesame ty+e.

C'(.$& $$&)* 

-t is a++licable t 0hleEPart hierarchies in (hich the 0hles an" their Parts can betreate" uni*rmlyEthat is, in (hich bth im+lement the same abstract inter*ace.

E+ample resolved

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<1

Page 152: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 152/180

 

R ) ! - !/F0'R'RCH-CR )/!

-n ur C'$ system (e "eci"e t "eAne a Ta%a +ackage that +r%i"es the basic *unctinality *rgra+hical bects. he class library cnsists * atmic bects such as circles r lines that the

user can cmbine t *rm mre cm+le= entities. 0e im+lement these classes "irectly instea"* using the stan"ar" Ta%a +ackage a(t 'bstract 0in"(ing lkit because a(t "es nt?er all the *unctinality (e nee".

*non uses

 he key abstractins * many &/$-).&*$& ./$.*( *ll( the 0hleEPart

+attern.

Mst &/$-).&*$& /(( .)).&( +r%i"e cllectin classes such as lists, sets an"

ma+s. hese classes im+lement the CllectinE Member an" CntainerECntents %ariants.

G)%./ (&) .*$&)+/& $.$( such as Fresc r ET use the Cm+site %ariant * 

the 0hleEPart +attern.

Conse)uences

 he (hleE+art +attern ?ers se%eral $enets#

C%*5&..$ + )$(:

Part im+lementatins may e%en be cm+letely e=change" (ithut any nee" t m"i*yther +arts r clients.

S&)$.* + /*/&)*(:

ach cncern is im+lemente" by a se+arate +art.

R&(..$ .* $ (&/$(:

• Parts * a (hle can be reuse" in ther aggregate bects

• nca+sulatin * +arts (ithin a (hle +re%ents clients *rm Xscattering the use * +art bects all %er its surce c"e.

 he (hleE+art +attern su?ers *rm the *ll(ing ,iabilities#

• L&) &/.&*/ $%)5% .*.)&/$.*

!ince the 0hle buil"s a (ra++er arun" its Parts, it intr"uces an a""itinal le%el * in"irectin bet(een a client re@uest an" the Part that *ulAls it.

• C'&.$ + &/'(.$.* .*$ )$(3

'n a++r+riate cm+sitin * a 0hle *rm "i?erent Parts is *ten har" t An", es+ecially(hen a bttmu+ a++rach is a++lie".

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<2

Page 153: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 153/180

R ) ! - !/F0'R'RCH-CR )/!

ORGANI@ATION OF WOR! he im+lementatin * cm+le= ser%ices is *ten sl%e" by se%eral cm+nents in c +eratin.  rganize (rk +timally (ithin such structures yu nee" t cnsi"er se%eral as+ects.

0e "escribe ne +attern *r rganizing (rk (ithin a system maserEsla%e +attern.

MASTER-SLAEThe Master-%lave design pattern supports fault tolerance parallel computation andcomputational accuracy! + master component distributes work to identical slave componentsand computes a nal result from the results these slaves return!

E+ample

 ra%elling salesman +rblem

Conte+t

Prtining (rk int semantically i"entical subtasks

$roblem 

$i%i"e an" cn@uer3 here (rk is +artitine" int se%eral e@ual subtasks that are +rcesse"in"e+en"ently. he result * the (hle calculatin is cm+ute" *rm the results +r%i"e" byeach +artial +rcess.

!e%eral *rces arise (hen im+lementing such a structure

  Clients shul" nt be a(are that the calculatin is base" n the X"i%i"e an" cn@uer+rinci+le.

  )either clients nr the +rcessing * subtasks shul" "e+en" n the algrithms *r+artitining (rk an" assembling the Anal result.

 -t can be hel+*ul t use "i?erent but semantically i"entical im+lementatins *r +rcessingsubtasks.

  Prcessing * subtasks smetimes nee" c r"inatin *r e=. -n simulatin a++licatins

using the Anite element meth".

%olution

-ntr"uce a c r"inatin instance bS( clients * the ser%ice an" the +rcessing * 

in"i%i"ual subtasks.

' master cm+nent "i%i"es (rk int e@ual subtasks, "elegates these subtasks t

se%eral in"e+en"ent but semantically i"entical sla%e cm+nents an" cm+utes a Analresult *rm the +artial results the sla%es return.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<#

Page 154: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 154/180

R ) ! - !/F0'R'RCH-CR )/!

 he general +rinci+le is *un" in three a++licatin areas

• Fault tlerance Failure * ser%ice e=ecutins can be "etecte" an" han"le"

• Parallel cm+uting  ' cm+le= task is "i%i"e" int a A=e" number * i"entical subEtasksthat are e=ecute" in +arallel.

• Cm+utatinal accuracy -naccurate results can be "etecte" an" han"le".

%tructure

 M($&) /'*&*$:

Pr%i"es the ser%ice that can be sl%e" by a++lying the X"i%i"e an" cn@uer +rinci+le.

-t im+lements *unctins *r +artitining (rk int se%eral e@ual subtasks, starting an"

cntrlling their +rcessing an" cm+uting a Anal result *rm all the results btaine".

-t als maintains re*erences t all sla%es instances t (hich it "elegates the +rcessing * 

subtasks.

 S1& /'*&*$:

 Pr%i"es a subEser%ice that can +rcess the subtasks "eAne" by the

master   here are at least t( instances * the sla%e cm+nentcnnecte" t the master.

 he structure "eAne" by the MasterE!la%e +attern is illustrate" by the *ll(ing /M "iagram.

Dynamics

 he scenari cm+rises si= +hases3

 ' client re@uests a ser%ice *rm the master.

  he master +artitins the task int se%eral e@ual subEtasks.

  he master "elegates the e=ecutin * these subEtasks t se%eral sla%e instances, startstheir e=ecutin an" (aits *r the results they return.

  he sla%es +er*rm the +rcessing * the subEtasks an" return the results * theircm+utatin back t the master.

  he master cm+utes a Anal result *r the (hle task *rm the +artial results recei%e"*rm the sla%es.  The master returns this result to the client.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<G

Page 155: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 155/180

R ) ! - !/F0'R'RCH-CR )/!

&mplementation

"3 D.1.& ):

!+eci*y h( the cm+utatin * the task can be s+lit int a set e@ual subtasks. -"enti*y the sub ser%ices that are necessary t +rcess a subtask.

23 C'.*& (-$( )&($(

!+eci*y h( the Anal result * the (hle ser%ice can be cm+ute" (ith the hel+ * theresults btaine" *rm +rcessing in"i%i"ual subEtasks.

3 S&/.+ / &)$.* &$&&* '($&) * (1&(

• $eAne an inter*ace *r the subser%ice i"entiAe" in ste+1 it (ill be im+lemente" by the sla%ean" use" by the master t "elegate the +rcessing * in"i%i"ual subtask.

• /ne +tin *r +assing subtasks *rm the master t the sla%es is t inclu"e them as a+arameter (hen in%king the subser%ice.

'nther +tin is t "eAne a re+sitry (here the master +uts sub tasks an" the sla%es*etch them.

;3 I'&'&*$ $%& (1& /'*&*$s accr"ing t the s+eciAcatins "e%el+e" in +re%iusste+.

#3 I'&'&*$ $%& '($&) accr"ing t the s+eciAcatins "e%el+e" in ste+ 1 t #   here

are t( +tins *r "i%i"ing a task int subtasks.  he Arst is t s+lit (rk int a A=e" number * subtasks.

 he secn" +tin is t "eAne as many subtasks as necessary r +ssible.

• se strategy +attern t su++rt "ynamic e=change an" %ariatins * algrithms *rsub"i%i"ing a task.

5ariants

•  here are # a++licatin areas *r master sla%e +attern.

M($&)-(1& +) +$ $&)*/&

-n this %ariant the master ust "elegates the e=ecutin * a ser%ice t a A=e" number * re+licate" im+lementatins, each re+resente" by a sla%e.

M($&)-(1& +) )& /'$$.*

-n this %ariant the master "i%i"es a cm+le= task int a number * i"entical subEtasks,each * (hich is e=ecute" in +arallel by a se+arate sla%e.

M($&)-(1& +) /'$$.* /*/))&*/3

-n this %ariant the e=ecutin * a ser%ice is "elegate" t at least three "i?erentim+lementatins, each * (hich is a se+arate sla%e.

 /ther %ariants

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<<

Page 156: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 156/180

R ) ! - !/F0'R'RCH-CR )/!

S1&( ( )/&((&(

  han"le sla%es lcate" in se+arate +rcesses, yu can e=ten" the riginal MasterE!la%e structure (ith t( a""itinal cm+nents  S1&( ( $%)&(

-n this %ariant the master creates the threa"s, launches the sla%es, an" (aits *r allthrea"s t cm+lete be*re cntinuing (ith its (n cm+utatin. 

M($&)-(1& .$% (1& / ).*$.*-n this case the cm+utatin * all sla%es must be regularly sus+en"e" *r each sla%et cr"inate itsel* (ith the sla%es n (hich it "e+en"s, a*ter (hich the sla%es resumetheir in"i%i"ual cm+utatin.

*non uses

 M$). '$../$.*. ach r( in the +r"uct matri= can be cm+ute" by a se+aratesla%e.

  T)*(+)'-/.*5 an image, *r e=am+le in cm+uting the "iscrete csine trans*rm$C * e%ery Q = Q +i=el blck in an image. ach blck can be cm+ute" by a se+aratesla%e.

 Cm+uting the /)((-/))&$.* * t( signals  he W) '& a++lies the masterEsla%e +attern t im+lement +rcess cntrl *r

+arallel cm+uting

  he cnce+t * G55&( buil"s u+n the +rinci+les * the MasterE!la%e +attern t han"le+lurality in an bectEriente" s*t(are system. A gaggle re+resents a set * re+licate"ser%ice bects.

Conse)uences

 he MasterE!la%e "esign +attern +r%i"es se%eral $enets#

E/%*5&..$ * &$&*(...$

By +r%i"ing an abstract sla%e class, it is +ssible t e=change e=isting sla%e

im+lementatins r a"" ne( nes (ithut mar changes t the master. S&)$.* + 

/*/&)*(

 he intr"uctin * the master se+arates sla%e an" client c"e *rm the c"e *r+artitining (rk, "elegating (rk t sla%es, cllecting the results *rm the sla%es,cm+uting the Anal result an" han"ling sla%e *ailure r inaccurate sla%e results.

E/.&*/

 he MasterE!la%e +attern *r +arallel cm+utatin enables yu t s+ee" u+ the+er*rmance * cm+uting a +articular ser%ice (hen im+lemente" care*ully

 he MasterE!la%e "esign +attern has certain ,iabilities#

F&(...$

-t is nt al(ays *easible

M/%.*& &&*&*/

-t "e+en"s n the architecture * the mSc n (hich the +rgram runs. his may "ecreasethe changeability an" +rtability.

H) $ .'&'&*$ 

-m+lementing MasterE!la%e is nt easy, es+ecially *r +arallel cm+utatin.

P)$..$

MasterE!la%e structures are "icult r im+ssible t trans*er t ther machines 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<9

Page 157: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 157/180

R ) ! - !/F0'R'RCH-CR )/!

ACCESS CONTROL!metimes a cm+nent r e%en a (hle subsystem cannt r shul" nt be accessible "irectlyby its clients. Here (e "escribe ne "esign +attern that hel+s t +rtect access t a +articularcm+nent3 The proxy design pattern 

PROY"roxy design pattern makes the clients of a component communicate with a representativerather than to the component itself! %ntroducing such a place holder can serve many purposesincluding enhanced e:ciency easier access and protection from unauthori6ed access!

E+ample

Cm+any engineering sta? regularly cnsults "atabases *r in*rmatin abut material+r%i"ers, a%ailable +arts, blue+rints, an" s n. %ery remte access may be cstly, (hilemany accesses are similar r i"entical an" are re+eate" *ten. his situatin clearly ?ers sc+e*r +timizatin * access time an" cst.

Conte+t

' client nee"s access t the ser%ices * anther cm+nent "irect access is technically+ssible, but may nt be the best a++rach.

$roblem

-t is *ten ina++r+riate t access a cm+nent "irectly.

' slutin t such a "esign +rblem has t balance the *ll(ing *rces.

'ccessing the cm+nent shul" be runtime ecient, cst e?ecti%e an" sa*e *r bth the

client an" the cm+nent

'ccess t cm+nent shul" be trans+arent an" sim+le *r the client. he client shul"

+articularly nt ha%e t change its calling beha%ir an" synta= *rm that use" t call anyther "irect access cm+nent.

 he client shul" be (ell a(are * +ssible +er*rmance r Anancial +enalties *r

accessing remte clients. Full trans+arency can bscure cst "i?erences bet(een

ser%ices.

%olution

Let the client cmmunicate (ith a re+resentati%e rather than the cm+nent itsel*.

 his re+resentati%e calle" a X+r=y ?ers the inter*ace * the cm+nent but +er*rms

a""itinal +re an" +st +rcessing such as access cntrl checking r making rea" nlyc+ies * the Xriginal.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<

Page 158: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 158/180

R ) ! - !/F0'R'RCH-CR )/!

%tructure 

 O).5.*

-m+lements a +articular ser%ice

 C.&*$

Res+nsible *r s+eciAc task   " this, it in%l%es the *unctinality * the riginal in an in"irect (ay by accessing the

+r=y.

 P)

/?ers same inter*ace as the riginal, an" ensures crrect access t the riginal.

  achie%e this, the +r=y maintains a re*erence t the riginal it re+resents.

sually there is neEtEne relatinshi+ bS( the +r=y an" the riginal.

 A($)/$ ).5.*

Pr%i"es the inter*ace im+lemente" by the +r=y an" the riginal. i.e, ser%es as abstract

base class *r the +r=y an" the riginal.

 he *ll(ing OMT "iagram sh(s the relatinshi+s bet(een the classes gra+hically3

Dynamics he *ll(ing "iagram sh(s a ty+ical "ynamic scenari * a Pr=y structure.

0hile (rking n its task the client asks the +r=y t carry ut a ser%ice.

 he +r=y recei%es the incming ser%ice re@uest an" +reE+rcesses it.

-* the +r=y has t cnsult the riginal t *ulAll the re@uest, it *r(ar"s the re@uest t theriginal using the +r+er cmmunicatin +rtcls an" security measures.

 he riginal acce+ts the re@uest an" *ulAlls it. -t sen"s the res+nse back t the +r=y.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<Q

Page 159: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 159/180

R ) ! - !/F0'R'RCH-CR )/!

 he +r=y recei%es the res+nse. Be*re r a*ter trans*erring it t the client it may carryut a""itinal +stE+rcessing actins such as caching the result, calling the "estructr * the riginal r releasing a lck n a resurce.

&mplementation

"3 I&*$.+ )&(*(...$.&( +) &.*5 .$% //&(( /*$) $ /'*&*$'ttach these res+nsibilities t a se+arate cm+nent the +r=y.

23 I+ ((.& .*$)/& * ($)/$ (& /(( $%$ (&/.&( $%& /''* )$( + $%& .*$&)+/&( + $% $%& ) * $%& ).5.*3

$eri%e the +r=y an" the riginal *rm this abstract base. 

3 I'&'&*$ $%& )K( +*/$.*(

  this en" check the rles s+eciAe" in the Arst ste+ 

;3 F)&& $%& ).5.* * .$( /.&*$ *rm res+nsibilities that ha%e migrate" int the +r=y.

#3 A((/.$& $%& ) * $%& ).5.* by gi%ing the +r=y a han"le t the riginal. hishan"le may be a +inter a re*erence an a""ress an i"entiAer, a scket, a +rt, an" s n.

63 R&'1& .)&/$ )&$.*(%.( &$&&* $%& ).5.* * .$( /.&*$ Re+lace themby analgus relatinshi+s t the +r=y.

5ariants  R&'$& ):

Clients * remte cm+nents shul" be sche"ule" *rm net(rk a""resses an" -PC+rtcls.

P)$&/$.* ): 

Cm+nents must be +rtecte" *rm unauthrize" access.

C/%& ): 

Multi+le lcal clients can share results *rm remte cm+nents.

S*/%)*.$.* ):

Multi+le simultaneus accesses t a cm+nent must be synchrnize".

C*$.*5 ):

'cci"ental "eletin * cm+nents must be +re%ente" r usagestatistics cllecte"  .)$ ): 

Prcessing r la"ing a cm+nent is cstly (hile +artial in*rmatin abut thecm+nent may be sucient.

F.)& ): 

Lcal clients shul" be +rtecte" *rm the utsi"e (rl".

*non uses 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1<8

Page 160: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 160/180

R ) ! - !/F0'R'RCH-CR )/!

N&T STEP

 he Pr=y +attern is use" in the )eU!P +erating system t +r%i"e lcal stubs *rremte bects. Pr=ies are create" by a s+ecial ser%er n the Arst access t the remtebect. 

OMG-COBRA

-t uses the Pr=y +attern *r t( +ur+ses. ! calle" clientEstubs, r -$LEstubs, guar"clients against the cncrete im+lementatin * their ser%ers an" the /bect Re@uestBrker. 

OLE

-n Micrs*t /L ser%ers may be im+lemente" as libraries "ynamically linke" t thea""ress s+ace * the client, r as se+arate +rcesses. Pr=ies are use" t hi"e (hether a+articular ser%er is lcal r remte *rm a client. 

WWW )

-t gi%es +e+le insi"e the Are(all cncurrent access t the utsi"e (rl". ciency isincrease" by caching recently trans*erre" Ales. 

O).

-t is a cncrete /M&EC/RB' im+lementatin, uses remte +r=ies. ' client can bin" t anriginal by s+eci*ying its uni@ue i"entiAer.

Conse)uences

 he Pr=y +attern +r%i"es the *ll(ing $enets#

E*%*/& &/.&*/ * &) /($

 he 4irtual Pr=y %ariant hel+s t im+lement a la"EnE"eman" strategy. his all(s yut a%i" unnecessary la"s *rm "isk an" usually s+ee"s u+ yur a++licatin

D&/.*5 /.&*$( +)' $%& /$.* + (&)1&) /'*&*$(

By +utting all lcatin in*rmatin an" a""ressing *unctinality int a Remte Pr=y%ariant, clients are nt a?ecte" by migratin * ser%ers r changes in the net(rking

in*rastructure. his all(s client c"e t becme mre stable an" reusable. S&)$.* + %(&&&.*5 /& +)' +*/$.*.$3

' +r=y relie%es the client * bur"ens that " nt inherently belng t the task the client ist +er*rm. 

 he Pr=y +attern has the *ll(ing ,iabilities# 

L&(( &/.&*/ & $ .*.)&/$.*

'll +r=ies intr"uce an a""itinal layer * in"irectin. 

O1&) . 1. (%.($./$& ($)$&5.&(

Be care*ul (ith intricate strategies *r caching r la"ing n "eman" they " nt al(ays+ay.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 197

Page 161: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 161/180

R ) ! - !/F0'R'RCH-CR )/!

)- N!-/) B')K

N3 <UESTION YEAR MAR!S

1.  &i%e the structure * (hle +rt "esign +attern (ith CRC $ec 78 <

2.  0hat are the a++licatins * master sla%e +attern $ec 78 17

#.  0hat are the %ariants * +r=y +atternJ $ec 78 <

G.  $iscuss the A%e ste+s im+lementatin * master sla%e +attern Tune 17 17

<.  $eAne +r=y "esign +attern. $iscuss the beneAts an" liabilities *the same  Tune 17 17

9.  Brie>y e=+lain the beneAts * master sla%e "esign +attern $ec 17 9

.  List an" e=+lain the ste+s t im+lement a (hleE+art structure $ec 17 Q

Q.  0ith a neat sketch, e=+lain the ty+ical "ynamic scenari * a +r=ystructure

$ec 17 9

8.  numerate (ith e=+lanatin the "i?erent ste+s, (hich cnstitutethe im+lementatin * the (hle +art structure *r a C'$ system*r 2$ m"eling.

 Tune 11 1G

17.  Brie>y cmment n the "i?erent ste+s carrie" ut t realize the

im+lementatin * the +r=y +attern

 Tune 11 9

11.  =+lain the %ariants * (hleE+art "esign +attern, in brie* $ec 11 17

12.  =+lain the "ynamics +art * master sla%e "esign +attern $ec 11 Q

1#.  Mentin any t( beneAts * +r=y "esign +attern $ec 11 2

1G.  Brie>y e=+lain the beneAts * master sla%e "esign +attern Tune 12 9

1<.  0hat are the %ariants * +r=y +atternJ Tune 12 9

19.  List an" e=+lain the ste+s t im+lement a (hleE+art structure Tune 12 Q

Page 162: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 162/180

 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17Q

Page 163: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 163/180

)- Q$!-&)-)& ')$ $/CM)-)&!/F0'R 'RCH-CR

CHAPTER 7:DESIGNING THE ARCHITECTURE

ARCHITECTURE IN THE LIFE CYCLE'ny rganizatin that embraces architecture as a *un"atin *r its s*t(are "e%el+ment

un"erstan" its +lace in the li*e cycle. !e%eralli*eE cycle m"els e=ist in the literature, but ne thaarchitecture s@uarely in the mi""le * things is the e%lutinary "eli%ery li*e cycle m"el sh.1.

F.5)& 73"3 E1$.*) D&.1&) L.+& C/&

  he intent * this m"el is t get user an" custmer *ee"back an" iterate thrugh se%eral rAnal release. he m"el als all(s the a""ing * *unctinality (ith each iteratin an" the "

%ersin nce a sucient set* *eatures has been "e%el+e". 

WHEN CAN I BEGIN DESIGNING?  he li*eE cycle m"el sh(s the "esign * the architecture as iterating (ith +reliminary

analysis. Clearly, yu cannt begin the "esign until yu ha%e sme i"ea * the systements. /nthe ther han", it "es nt take many re@uirements in r"er *r "esign t begin.

'n a rchitecture is sha+e"D by sme cllectin * *unctinal, @uality, an" business re@uie callthese sha+ing re@uirementsarchitectural "ri%ersan" (e see e=am+les * them in ur case stu"ies

m"iAability, +er*rmance re@uirements a%ailability re@uirements an" s n.   "etermine the architectural "ri%ers, i"enti*y the highest +ririty business gals.

relati%ely *e( * these. urn these business gals int @uality scenaris r use cases.

R ) ! - !/F0'R'RCH-CR )/!

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 19#

Page 164: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 164/180

R ) ! - !/F0'R'RCH-CR )/!

732 DESIGNING THE ARCHITECTURE 

' meth" *r "esigning an architecture t satis*y bth @uality re@uirements an" *unctinalre@uirements is calle" attributeE"ri%en "esign '$$. '$$ takes as in+ut a set * @ualityattribute scenaris an" em+lys kn(le"ge abut the relatin bet(een @uality attributeachie%ement an" architecture in r"er t "esign the architecture.

ATTRIBUTE DRIEN DESIGN'$$ is an a++rach t "eAning a s*t(are architecture that bases the "ecm+sitin +rcessn the @uality attributes the s*t(are has t *ulAll. -t is a recursi%e "ecm+sitin +rcess(here, at each stage, tactics an" architectural +atterns are chsen t satis*y a set * @ualityscenaris an" then *unctinality is allcate" t instantiate the m"ule ty+es +r%i"e" by the+attern.

 he ut+ut * '$$ is the Arst se%eral le%els * a m"ule "ecm+sitin %ie( * anarchitecture an" ther %ie(s as a++r+riate.

G)5& ) &*&) &'& o  $esign a +r"uct line architecture *r a garage "r

+ener (ith a larger hme in*rmatin system the +ener is res+nsible *r raising an"l(ering the "r %ia a s(itch, remte cntrl, r the hme in*rmatin system. -t is als+ssible t "iagnse +rblems (ith the +ener *rm (ithin the hme in*rmatin system.

o I*$ t '$$3 a set * re@uirements o Functinal re@uirements as use cases o

Cnstraints

o Nuality re@uirements e=+resse" as system s+eciAc @uality scenaris

o S/&*).( *r garage "r system o $e%ice an" cntrls *r +ening an" clsing

the "r are "i?erent *r the %arius +r"ucts in the +r"uct lineo  he +rcessr use" in "i?erent +r"ucts (ill "i?er

o -* an bstacle is +ersn r bect is "etecte" by the garage "r "uring

"escent, it must st+ (ithin 7.1 secn"

o  he garage "r +ener system nee"s t be accessible *rm the hme

in*rmatin system *r "iagnsis an" a"ministratin.

o -t shul" be +ssible t "irectly +r"uce an architecture that re>ects this

+rtcl

ADD S$&(:

!te+s in%l%e" in attribute "ri%en "esign '$$

;! &hoose the module to decompose

o !tart (ith entire system o -n+uts *r this

m"ule nee" t be a%ailable o Cnstraints,

*unctinal an" @uality re@uirements<! 0ene the module

a Chse architectural "ri%ers rele%ant t this "ecm+sitin

b Chse architectural +attern that satisAes these "ri%ers

c -nstantiate m"ules an" allcate *unctinality *rm use cases re+resenting using multi+le%ie(s " $eAne inter*aces * chil" m"ules

e 4eri*y an" reAne use cases an" @uality scenaris

=! 0epeat for every module that needs further decomposition

'iscussion of the above steps in more detail#

"3 C%(& T%& M& T D&/'(& o the *ll(ing

are the m"ules3 systemE]subsystemE]subm"uleo $ecm+sitin ty+ically starts (ith system, (hich

then "ecm+se int subsystem an" then int subEm"ules.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 19G

Page 165: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 165/180

R ) ! - !/F0'R'RCH-CR )/!

o -n ur =am+le, the garage "r +ener is a

system o /+ener must inter+erate (ith the hme

in*rmatin system

23 R&*& $%& '&

"3 C%(& A)/%.$&/$) D).1&)(: o chse the architectural "ri%ers *rm the @uality scenaris an" *unctinal re@uirements o

 he "ri%ers (ill be amng the t+ +ririty re@uirements *r the m"ule. o  -n the garage

system, the G scenaris (ere architectural "ri%ers, o By e=amining them, (e see

RealEtime +er*rmance re@uirement

M"iAability re@uirement t su++rt +r"uct line

o Re@uirements are nt treate" as e@uals

o Less im+rtant re@uirements are satisAe" (ithin cnstraints btaine" by satis*ying mreim+rtant re@uirements

o  his is a "i?erence * '$$ *rm ther architecture "esign meth"s

23 C%(& A)/%.$&/$) P$$&)* o Fr each @uality re@uirement there are i"entiAabletactics an" then i"entiAable +atterns that im+lement these tactics.

o  he gal * this ste+ is t establish an %erall architectural +attern *r the m"ule

o  he +attern nee"s t satis*y the architectural +attern *r the m"ule tactics selecte" t

satis*y the "ri%ers

o  ( *actrs in%l%e" in selecting tactics3 'rchitectural "ri%ers themsel%es

  !i"e e?ects * the +attern im+lementing the tactic n therre@uirements o  his yiel"s the *ll(ing tactics3

Semantic coherence an" information hiding! !e+arate res+nsibilities "ealing(ith the user inter*ace, cmmunicatin, an" sensrs int their (n m"ules.

  %ncrease computational e:ciency!  he +er*rmanceEcritical cm+utatinsshul" be ma"e as ecient as +ssible.

Schedule wisely!  he +er*rmanceEcritical cm+utatins shul" be sche"ule"t ensure the achie%ement * the timing "ea"line.

Figure 7.$. Architectural pattern that utili!es tactics to achieve garage door drivers

3 I*($*$.$& M&( A* A/$& F*/$.*.$ U(.*5 M$.& .&(

 %nstantiate modules  he nnE+er*rmanceEcritical m"ule * Figure .2 becmes instantiate" as"iagnsis an" raisingSl(ering "r m"ules in Figure .#. 0e als i"enti*yse%eral res+nsibilities * the %irtual machine3 cmmunicatin an" sensr

rea"ing an" actuatr cntrl. his yiel"s t( instances * the %irtual machinethat are als sh(n in Figure .#.

  +llocate functionality

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 19<

Page 166: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 166/180

R ) ! - !/F0'R'RCH-CR )/!

'ssigning res+nsibilities t the chil"ren in a "ecm+sitin als lea"s t the"isc%ery * necessary in*rmatin e=change. 't this +int in the "esign, it is ntim+rtant t "eAne h( the in*rmatin is e=change". -s the in*rmatin +ushe"r +ulle"J -s it +asse" as a message r a call +arameterJ hese are all @uestinsthat nee" t be ans(ere" later in the "esign +rcess. 't this +int nly the

in*rmatin itsel* an" the +r"ucer an" cnsumer rles are * interest

Figure 7.3. First"level decomposition of garage door opener

 0epresent the architecture with multiple views

Module decomposition view

&oncurrency view

•  ( users "ing similar things at the same time

• /ne user +er*rming multi+le acti%ities simultaneusly

• !tarting u+ the system

• !hutting "(n the system

'eployment view 

;3 D&*& I*$&)+/&( O+ C%. M&( o -t "cuments (hat this m"ule +r%i"es

t thers. o 'nalyzing the "ecm+sitin int the # %ie(s +r%i"es interactin

in*rmatin *r the inter*ace  Module view#

Pr"ucersScnsumers relatins

+atterns * cmmunicatin   &oncurrency view#

-nteractins amng threa"s

!ynchrnizatin in*rmatin

 'eployment view

Har"(are re@uirement

 iming re@uirements

Cmmunicatin re@uirements

#3 &).+ A* R&*& U(& C(&( A* <.$ S/&*).( A( C*($).*$( F)T%& C%. M&( o >unctional re7uirements

sing *unctinal re@uirements t %eri*y an" reAne  

 $ecm+sing *unctinal re@uirements assigns res+nsibilities t

chil" m"ules  0e can use these res+nsibilities t generate use

cases *r the chil" m"ule  5ser interface#

Han"le user re@uests

 ranslate *r raisingSl(ering m"ule $is+lay res+nses

 0aising.lowering door module

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 199

Page 167: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 167/180

R ) ! - !/F0'R'RCH-CR )/!

Cntrl actuatrs t raiseSl(er "r  !t+ (hen cm+lete" +ening r clsing

 3bstacle detection#

Recgnize (hen bect is "etecte"

!t+ r re%erse the clsing * the "r

 &ommunication virtual machine

 Manage cmmunicatin (ith huse in*rmatin systemH-!

 Scheduler

 &uarantee that "ea"lines are met (hen bstacle is "etecte"

 Sensor.actuator virtual machine

Manage interactins (ithsensrsSactuatrs  'iagnosis#

Manage "iagnsis interactin (ith H-!

o &onstraints#

  he "ecm+sitin satisAes the cnstraint

• /! cnstraintE] satisAe" i* chil" m"ule is /!  he cnstraint is satisAe" by a single m"ule

• Cnstraint is inherite" by the chil" m"ule

  he cnstraint is satisAe" by a cllectin * chil" m"ules

• .g., using client an" ser%er m"ules t satis*y a cmmunicatin cnstraint

o uality scenarios#

• Nuality scenaris als nee" t be %eriAe" an" assigne" t chil" m"ules

• ' @uality scenari may be satisAe" by the "ecm+sitin itsel*, i.e, n a""itinal im+actn chil" m"ules

• ' @uality scenari may be satisAe" by the "ecm+sitin but generating cnstraints *r

the chil"ren•  he "ecm+sitin may be neutralD (ith res+ect t a @uality scenari

• ' @uality scenari may nt be satisAe" (ith the current "ecm+sitin

73 FORMING THE TEAM STRUCTURES /nce the architecture is acce+te" (e assign teams t (rk n "i?erent +rtins * the

"esign an" "e%el+ment. 

  /nce architecture *r the system un"er cnstructin has been agree" n, teams areallcate" t (rk n the mar m"ules an" a (rk break"(n structure is create"that re>ects thse teams.

 ach team then creates its (n internal (rk +ractices. Fr large systems, the teams may belng t "i?erent subcntractrs.  

  eams a"+t (rk +ractices inclu"ing o  eam

cmmunicatin %ia (ebsiteSbulletin bar"s o 

)aming cn%entins *r Ales o 

CnAguratinSre%isin cntrl system o 

Nuality assurance an" testing +rce"ure

 he teams (ithin an rganizatin (rk n m"ules, an" thus (ithin team high le%el * cmmunicatin is necessary

73; CREATING A S!ELETAL SYSTEM $e%el+ a skeletal system *r the incremental cycle.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 19

Page 168: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 168/180

R ) ! - !/F0'R'RCH-CR )/!

Classical s*t(are engineering +ractice recmmen"s E] stubbing utD

se the architecture as a gui"e *r the im+lementatin se@uence

First im+lement the s*t(are that "eals (ith e=ecutin an" interactin * architectural

cm+nents

• Cmmunicatin bet(een cm+nents

• !metimes this is ust install thir"E+arty mi""le(are

 hen a"" *unctinality

• By riskEl(ering

• /r by a%ailability * sta?

/nce the elements +r%i"ing the ne=t increment * *unctinality ha%e been chsen, yu canem+ly the uses structure t tell yu (hat a""itinal s*t(are shul" be running crrectly inthe system t su++rt that *unctinality. his +rcess cntinues, gr(ing larger an" largerincrements * the system, until it is all in +lace.

CHAPTER 9:DOCUMENTING SOFTWARE ARCHITECTURES

93" USES OF ARCHITECTURAL DOCUMENTATION  'rchitecture "cumentatin is bth +rescri+ti%e an" "escri+ti%e. hat is, *r sme

au"iences it +rescribes (hat shul" be true by +lacing cnstraints n "ecisins t bema"e. Fr ther au"iences it "escribes (hat is true by recunting "ecisins alrea"yma"e abut a systems "esign.

 'll * this tells us that "i?erent stakehl"ers *r the "cumentatin ha%e "i?erent nee"s

"i?erent kin"s * in*rmatin, "i?erent le%els * in*rmatin, an" "i?erent treatments* in*rmatin.

  /ne * the mst *un"amental rules *r technical "cumentatin in general, an"s*t(are architecture "cumentatin in +articular, is t (rite *rm the +int * %ie( * the rea"er. $cumentatin that (as easy t (rite but is nt easy t rea" (ill nt beuse", an" Oeasy t rea"O is in the eye * the behl"err in this case, the stakehl"er.

  $cumentatin *acilitates that cmmunicatin. !me e=am+les * architecturalstakehl"ers an" the in*rmatin they might e=+ect t An" in the "cumentatin aregi%en in able 8.1.

  -n a""itin, each stakehl"ers cme in t( %arieties3 seasne" an" ne(. ' ne(stakehl"er (ill (ant in*rmatin similar in cntent t (hat his seasne" cunter+art

(ants, but in smaller an" mre intr"uctry "ses. 'rchitecture "cumentatin is a keymeans *r e"ucating +e+le (h nee" an %er%ie(3 ne( "e%el+ers, *un"ing s+nsrs,%isitrs t the +rect, an" s *rth.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 19Q

Page 169: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 169/180

R ) ! - !/F0'R'RCH-CR )/!

932 IEWS he cnce+t * a %ie(, (hich yu can think * as ca+turing a structure, +r%i"es us (ith thebasic +rinci+le * "cumenting s*t(are architecture

'ocumenting an architecture is a matter of documenting the relevant views and thenadding documentation that applies to more than one view!

 his +rinci+le is use*ul because it breaks the +rblem * architecture "cumentatin intmre tractable +arts, (hich +r%i"e the structure *r the remain"er * this cha+ter3  • Chsing the rele%ant %ie(s

• $cumenting %ie(

• $cumenting in*rmatin that a++lies t mre than ne %ie(

93 CHOOSING THE RELEANT IEWS 

' %ie( sim+ly re+resents a set * system elements an" relatinshi+s amng them, s(hate%er elements an" relatinshi+s yu "eem use*ul t a segment * the stakehl"ercmmunity cnstitute a %ali" %ie(.

Here is a sim+le # ste+ +rce"ure *r chsing the %ie(s *r yur +rect.

"3 P)/& /*.$& 1.& .($: 

Begin by buil"ing a stakehl"erS%ie( table. 5ur stakehl"er list is likely t be"i?erent *rm the ne in the table as sh(n bel(, but be as cm+rehensi%e as yucan. Fr the clumns, enumerate the %ie(s that a++ly t yur system. !me %ie(sa++ly t e%ery system, (hile thers nly a++ly t systems "esigne" that (ay. /nceyu ha%e r(s an" clumns "eAne", All in each cell t "escribe h( muchin*rmatin the stakehl"er re@uires *rm the %ie(3 nne, %er%ie( nly, m"erate"etail, r high "etail.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 198

Page 170: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 170/180

R ) ! - !/F0'R'RCH-CR )/!

23 C'.*& 1.&(:

 he can"i"ate %ie( list *rm ste+ 1 is likely t yiel" an im+ractically large number * %ie(s. re"uce the list t a manageable size, Arst lk *r %ie(s in the table that

re@uire nly %er%ie( "e+th r that ser%e %ery *e( stakehl"ers. !ee i* thestakehl"ers cul" be e@ually (ell ser%e" by anther %ie( ha%ing a strngercnsistency. )e=t, lk *r the %ie(s that are g" can"i"ates t be cmbine"E thatis, a %ie( that gi%es in*rmatin *rm t( r mre %ie(s at nce. Fr small an"me"ium +rects, the im+lementatin %ie( is *ten easily %erlai" (ith the m"ule"ecm+sitin %ie(. he m"ule "ecm+sitin %ie( als +airs (ell (ith users rlayere" %ie(s. Finally, the "e+lyment %ie( usually cmbines (ell (ith (hate%ercm+nentEan"Ecnnectr %ie( sh(s the cm+nents that are allcate" thar"(are elements.

3 P).).$.&:

'*ter ste+ 2 yu shul" ha%e an a++r+riate set * %ie(s t ser%e yur stakehl"ercmmunity. 't this +int yu nee" t "eci"e (hat t " Arst. H( yu "eci"e"e+en"s n the "etails s+eciAc +rect. But, remember that yu "nt ha%e tcm+lete ne %ie( be*re starting anther. Pe+le can make +rgress (ith%er%ie(Ele%el in*rmatin, s a brea"thEArst a++rach is *ten the best. 'ls, smestakehl"ers interests su+erse"e thers.

93; DOCUMENTING A IEW 

• P).') )&(&*$$.*E elements an" their relatinshi+s, cntains main in*rmatinabut these system , usually gra+hical r tabular.

• E&'&*$ /$5E "etails * thse elements an" relatins in the +icture,

• C*$&$ .5)'E h( the system relates t its en%irnment

• )...$ 5.&E h( t e=ercise any %ariatin +ints a %ariability gui"e shul"inclu"e "cumentatin abut each +int * %ariatin in the architecture, inclu"ing o  he

+tins amng (hich a chice is t be ma"e

o  he bin"ing time * the +tin. !me chices are ma"e at "esign time, sme at buil" time,

an" thers at runtime.

• A)/%.$&/$)& /5)* (hy the "esign re>ecte" in the %ie( came t beJ anarchitecture backgrun" inclu"es o ratinale, e=+laining (hy the "ecisins re>ecte" in

the %ie( (ere ma"e an" (hy alternati%es (ere reecte"

o analysis results, (hich usti*y the "esign r e=+lain (hat (ul" ha%e t change in the *ace

* a m"iAcatin

o assum+tins re>ecte" in the "esign

• G(() + $&)'( use" in the %ie(s, (ith a brie* "escri+tin * each.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 17

Page 171: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 171/180

R ) ! - !/F0'R'RCH-CR )/!

• O$%&) .*+)'$.*  inclu"es management in*rmatin such as authrshi+,cnAguratin cntrl "ata, an" change histries. /r the architect might recr"re*erences t s+eciAc sectins * a re@uirements "cument t establish traceability

DOCUMENTING BEHAIOR 4ie(s +resent structural in*rmatin abut the system. H(e%er, structural in*rmatin

is nt sucient t all( reasning abut sme system +r+erties .beha%ir "escri+tina"" in*rmatin that re%eals the r"ering * interactins amng the elements,++rtunities *r cncurrency, an" time "e+en"encies * interactins.

Beha%ir can be "cumente" either abut an ensemble * elements (rking in

cncert. =actly (hat t m"el (ill "e+en" n the ty+e * system being "esigne".

$i?erent m"eling techni@ues an" ntatins are use" "e+en"ing n the ty+e * analysis t be +er*rme". -n ML, se@uence "iagrams an" state charts are e=am+les * beha%iral "escri+tins. hese ntatins are (i"ely use".

DOCUMENTING INTERFACES'n inter*ace is a bun"ary acrss (hich t( in"e+en"ent entities meet an" interact rcmmunicate (ith each ther.

"3 I*$&)+/& .&*$.+ 

0hen an element has multi+le inter*aces, i"enti*y the in"i%i"ual inter*aces t "istinguishthem. his usually means naming them. 5u may als nee" t +r%i"e a %ersin number.

23 R&()/&( )1.&3

 he heart * an inter*ace "cument is the resurces that theelement +r%i"es.  0esource syntax this is the

resurces signature  0esource Semantics#

• 'ssignment * %alues * "ata 

• Changes in state 

• %ents signale" r message sent

• h( ther resurces (ill beha%e "i?erently in *uture 

• humanly bser%able results 

 0esource 5sage 0estrictions

• initializatin re@uirements

• limit n number * actrs using resurce3 D$ $& &*.$.*(: 

-* use" i* any inter*ace resurces em+ly a "ata ty+e ther than ne +r%i"e" by theun"erlying +rgramming language, the architect nee"s t cmmunicate the "eAnitin * that

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 11

Page 172: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 172/180

R ) ! - !/F0'R'RCH-CR )/!

ty+e. -* it is "eAne" by anther element, then re*erence t the "eAnitin in that elements"cumentatin is sucient.

;3 E/&$.* &*.$.*(: 

 hese "escribe e=ce+tins that can be raise" by the resurces n the inter*ace. !ince thesame e=ce+tin might be raise" by mre than ne resurce, i* it is cn%enient t sim+ly list

each resurces e=ce+tins but "eAne them in a "ictinary cllecte" se+arately. #3)...$ )1.& $%& .*$&)+/&.

$es the inter*ace all( the element t be cnAgure" in sme (ayJ hese cnAguratin+arameters an" h( they a?ect the semantics * the inter*ace must be "cumente".

63 <.$ $$).$& /%)/$&).($./(:

 he architect nee"s t "cument (hat @uality attribute characteristics such as +er*rmance

r reliability the inter*ace makes kn(n t the elements users  73 E&'&*$ )&.)&'&*$(:

0hat the element re@uires may be s+eciAc, name" resurces +r%i"e" by ther elements. he "cumentatin bligatin is the same as *r resurces +r%i"e"3 synta=, semantics, an"any usage restrictins.

83 R$.*& * &(.5* .((&(: 

0hy these chices the architect shul" recr" the reasns *r an elements inter*ace "esign. he ratinale shul" e=+lain the mti%atin behin" the "esign, cnstraints an" cm+rmises,(hat alternati%es "esigns (ere cnsi"ere". 93 U(5& 5.&:

-tem 2 an" item "cument an elements semantic in*rmatin n a +er resurce basis. hissmetimes *alls shrt * (hat is nee"e". -n sme cases semantics nee" t be reasne"abut in terms * h( a bra" number * in"i%i"ual interactins interrelate.

Figure %.$. The nine parts of interface documentation

93# DOCUMENTATION ACROSS IEWSCrssE%ie( "cumentatin cnsists * ust three mar as+ects, (hich (e can summarize ash(E(hatE(hy3

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 12

Page 173: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 173/180

R ) ! - !/F0'R'RCH-CR )/!

Figure %.3. Summary of cross"vie& documentation

HOW THE DOCUMENTATION IS ORGANI@ED TO SERE A STA!EHOLDER%ery suite * architectural "cumentatin nee"s an intr"uctry +iece t e=+lain itsrganizatin t a n%ice stakehl"er an" t hel+ that stakehl"er access the in*rmatin he

r she is mst intereste" in. here are t( kin"s * Oh(O in*rmatin3  .& C$5' %ie( catalg is the rea"ers intr"uctin t the %ie(s that the architect haschsen t inclu"e in the suite * "cumentatin.

 here is ne entry in the %ie( catalg *r each %ie( gi%en in the "cumentatinsuite. ach entry shul" gi%e the *ll(ing3

•  he name * the %ie( an" (hat style it instantiates

• ' "escri+tin * the %ie(s element ty+es, relatin ty+es, an" +r+erties

• ' "escri+tin * (hat the %ie( is *r

• Management in*rmatin abut the %ie( "cument, such as the latest %ersin, thelcatin * the %ie( "cument, an" the (ner * the %ie( "cument  

 .& T&'$&' %ie( tem+late is the stan"ar" rganizatin *r a %ie(. -t hel+s a rea"er na%igate@uickly t a sectin * interest, an" it hel+s a (riter rganize the in*rmatin an"establish criteria *r kn(ing h( much (rk is le*t t ".

WHAT THE ARCHITECTURE IS his sectin +r%i"es in*rmatin abut the system (hse architecture is being "cumente",the relatin * the %ie(s t each ther, an" an in"e= * architectural elements.

S($&' O1&)1.&

 his is a shrt +rse "escri+tin * (hat the systems *unctin is, (h its users are, an"any im+rtant backgrun" r cnstraints. he intent is t +r%i"e rea"ers (ith a

cnsistent mental m"el * the system an" its +ur+se. !metimes the +rect at large(ill ha%e a system %er%ie(, in (hich case this sectin * the architectural"cumentatin sim+ly +ints t that.

M.*5 &$&&* .&(

!ince all * the %ie(s * an architecture "escribe the same system, it stan"s t reasn

that any t( %ie(s (ill ha%e much in cmmn. Hel+ing a rea"er * the "cumentatin

un"erstan" the relatinshi+s amng %ie(s (ill gi%e him a +(er*ul insight int h( the

architecture (rks as a uniAe" cnce+tual (hle. Being clear abut the relatinshi+ by

+r%i"ing ma++ings bet(een %ie(s is the key t increase" un"erstan"ing an" "ecrease"

cn*usin. E&'&*$ L.($

 he element list is sim+ly an in"e= * all * the elements that a++ear in any * the%ie(s, alng (ith a +inter t (here each ne is "eAne". his (ill hel+ stakehl"erslk u+ items * interest @uickly.

P)&/$ G(()

 he glssary lists an" "eAnes terms uni@ue t the system that ha%e s+ecial meaning. 'list * acrnyms, an" the meaning * each, (ill als be a++reciate" by stakehl"ers. -* an a++r+riate glssary alrea"y e=ists, a +inter t it (ill suce here.

WHY THE ARCHITECTURE IS THE WAY IT IS: RATIONALECrssE%ie( ratinale e=+lains h( the %erall architecture is in *act a slutin t itsre@uirements. /ne might use the ratinale t e=+lain3

  he im+licatins * systemE(i"e "esign chices n meeting the re@uirements rsatis*ying cnstraints.

  he e?ect n the architecture (hen a""ing a *reseen ne( re@uirement r changing ane=isting ne.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1#

Page 174: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 174/180

R ) ! - !/F0'R'RCH-CR )/!

  he cnstraints n the "e%el+er in im+lementing a slutin.

 $ecisin alternati%es that (ere reecte".

-n general, the ratinale e=+lains (hy a "ecisin (as ma"e an" (hat the im+licatins are inchanging it.

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 1G

Page 175: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 175/180

R ) ! - !/F0'R'RCH-CR )/!

)- Q N!-/) B')K

N3 <UESTION YEAR MAR!S

1.  0hat are the three ste+s *r chsing %ie(s *r a +rectJ $ec 78 9

2.  0rite a nte n %ie( catalg $ec 78 G

#.  0hat are the +tins *r re+resenting cnnectrs an" systems inMLJ

 OUT OF SYLLABUS

$ec 78 17

G.  =+lain (ith a neat "iagram, the e%lutinary "eli%ery li*e cyclem"el

 Tune 17 Q

<.  0hat are the suggeste" stan"ar" rganizatin +ints *rinter*ace "cumentatinJ

 Tune 17 12

9.  List the ste+s * '$$ $ec 17 G

.  0rite a nte n creating a skeletal system $ec 17 9

Q.  0hat are the uses * architectural "cumentatinJ Bring ut thecnce+t * %ie( as a++lie" t architectural "cumentatin.

$ec 17 17

8.  Brie>y e=+lain the "i?erent ste+s +er*rme" (hile "esigning anarchitecture using the '$$ meth"

 Tune 11 17

17.  (rite shrt ntes n3

i*rming team structuresii"cumenting acrss %ie(siii"cumenting inter*aces

 Tune 11 17

11.  =+lain the ste+s in%l%e" in "esigning an architecture, using theattribute "ri%en "esign

$ec 11 17

12.  'rchitecture ser%es as a cmmunicatin %ehicle amngstakehl"ers.

$cumentatin *acilitates that cmmunicatin.D Tusti*y.

$ec 11 17

1#.  List the ste+s * '$$ meth" * architectural "esign Tune 12 9

1G.  =+lain (ith a neat "iagram, the e%lutinary "eli%ery li*e cyclem"el

 Tune 12 9

1<.  0hat are the suggeste" stan"ar" rganizatin +ints*r %ie( "cumentatinJ

 Tune 12 Q

Page 176: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 176/180

 

Pre+are" By3 $-45' K 61R)78-!719: ; !H0H' !HR 61R)78-!7<7: Page 127

Page 177: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 177/180

Page 178: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 178/180

Page 179: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 179/180

Page 180: SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

7/23/2019 SA_Notes_by_Divya (RNSIT) (vtuplanet.com).docx

http://slidepdf.com/reader/full/sanotesbydivya-rnsit-vtuplanetcomdocx 180/180