صفحه 1:
حووهرل() لس طلجت0) 00۱ بان
صفحه 2:
+ Okt, 00: Onrburd Oxkiwen
اه( مرا له سرا
مت مها تسه
س1 جاه(
سس موه
Ovarurreay Ondo it طله) اه(
ره
Query Provessicnt لها
Aeerxpoens Osrinted Dorie
Oreviry سره
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 هوه
صفحه 3:
+ Ovrinted Ocibwe Opstew
© dstibuted database systew ovusists oP loosely coupled sites thot shore نموم مه
امبر
۲ اوه( systews thot ron vo cock site ore indepeudeat oP اس per
© Prxswiew و رو dott of coe or wore sis
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 ووه
صفحه 4:
+ "cpa Dor ined Uidtwee
19/15 5 سول لاد ستحصص حصا
© Ol sies have ideuicd spPiwore
© Ore were of euck ober oad corer ty copperte tt procession user
regents.
© Cock ste surecders port oP ts cuivareny te teras oP right tt oboe
schewas or svPuvare
© Oppeus to wer us a sine systew
© ال لاس رما و
© OP Perec وه له اوه ملهچ رون بط
۱ و( ما موی و ها اوه و سس( query provessicry
١ مس و مار و و صا جمسخامد دا سس( provessicny
بات جلخصمم ۱
و مسا و مور Por ای( لوا
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. coe ©Sbervehnts, Cork ced Cnakershe
صفحه 5:
+ Ovrinted Daa Oorene
© Qssuve ما data wodel
© Repicaica
© Gpstew wotutaics wuliple copier oF data, stored to diPPered stew, Por Poster
rettevd ocd Poul ماه
مه ۲
Praxgoeuis stored in dstiuct sites ۱
ای سا ی موه نی شش ۲
© Rektion ts portioned iti severd Prockreus: systew wotuties severcd ام
replicas oP rock suck .سمس
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 هوه
صفحه 6:
@Octa Rephouva
۲ © rektivs or Proceed of a retitica is rephootied Pitts stored reduercacily to tua or
اه و
stored of oll sites. & متا Pdbreptoaion oP a rektiog ts the vase where the ©
۲ Pulp وال تلم ore those te whick every sie opotaas a copy oP the
لول وی
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 هوه
صفحه 7:
+ Orta Repirion (Oou.)
۲ مد of Replication
© Quokbiy: Pakire oP site cvotctotay relation edges ont result to veracity oP جار
replicas exist.
© Cordktew: pers oo 1 wy be processed by severd wes ia porcitel,
۶ را لورت و ماه توص مول لیلج of cack ste ovotctoiog a replica
oP r.
۲ Dirudvovtes of Rephration
© deorewsed post oP updates! cock replica oP relation romust be upcaied.
اس تسف و لس مسج :ای رو حدمت خأن بمج كوت ل ۰
chia (kee spaniel ppuunreuny bound werk ore مر با لوا روم
جاتو
امه تسج باب اجه روت رمع رو ی مات تاره بو ۱
ra primary DOT 1
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مه
صفحه 8:
Oa Pragerciaios
ای مه اس رن ريو رد عم مب ما BE Over oF
ما اس و مور
Pronger مه و و لس اه و ات تمس مرا ۳
۲ ای چا مه موسر لبون ris spit fair severd sure
مرو
© ۵۱ (رطموه ) روا سم موه و مه اس ماه to eee
وم ز متس
© © specid ع بو ات ال با رصاف added to pads schews to serve
وا لو وه
مه مش( مج ما : ما ۲
) اه اه مه سس ده ۲
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 هوه
صفحه 9:
+ سس Praqweddiva oP مت Rekiva
bokrace
SOO
999
99
ی
bokrace
909
00000
۹89
PSO
ویو
909
999
CASS
طمه_ مه
Oar?
0۳9
0۳090
0999
سبحت اتوت جا
Wisi
Wisi
ilside
سسطهه
سسطهه
( )یه سس گولا موه
هوه
0
صفحه 10:
مس( ربمت <ه بقل لبون
تا | ص | جوم
q مسا مارا
8 سور مارا
Odkeyrew ۳ 8
Kaka 98 من
(obo 9 لسار 1
Odkeyrew obs 89
لها سس رطا 0
( طم وسجامجا بره مم سس chet) = Tip
bolo fyple_td طمه_ موه
4 900 وم
e 9909 02666
oar? 909 9
3 000۵ ۳
9 99 0499
9 99 94۰9
90 9و9
raf ) سار وه سا Terns = عمط
Orsdrer Gyre Orcewpe -O* Cre, gO, OOOO.
صفحه 11:
+ Odvadiags oP Praqeedidiva
© Wortzword:
© dhs pordlel provesstny 7a مره تن وم
© dws a rektic t7 be splt so thot tuples ore located where they ore wet
تس مس سنا
۲ تین
۱
Prequediy wessed
8 pled uiibuie dows ePRipical ipictog of veriicd حسمي ذا
۶ مر وم رس وم روط
۲ ای وا و و و له تن
|۱۰ be suoressivel Prepvedied ip oc wbirary dep.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 هه
صفحه 12:
رسیم مین +
© Qos repay: Oewer to which اه سنوی و رو ی مرو he
dletabs oP how aed where he dt tows ore stored faa detrbvted syste
۴ ما و با روت ملس t7!
۰ رم ما
© رم مشش
رم را و
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 دوه
صفحه 13:
+ Darcey OP (Deis cow > Order
0. @uery deta tew cst hove a syetew-wide Unique ore.
9. should be possible to Pied the locatica oP data ews oP Picea.
9. Usha be possible to choo the bpcutiza روص وا ول او
P. ack site shoud be oble to oredte cew data ews cuiconpusly.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 ووه
صفحه 14:
+ اسف فقو Gales = Dawe Ourter
تست ۲
of anes وه و و ۶
seamen: rere oped ch ne لو لوم
مد ولو tee coh caer server ip bore ©
تسده ۱
ها مس ری اس ۶
منت ۲
مت موی راو بت جحل ©
سا یوم بیس وم و ی
اه ام وه سا canoe Server ©
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 موه
صفحه 15:
Ove oP Okwes
© Qlerwatve to ceuirdzed schewe! euch site prefixes ity owe site روت ها تا
senve thot yeurrdes Le., site UP وعد
© Cue hovieg 0 unique ideuiPier, cad avoids problews associated wit
امه ای
۱ uetwork trresporeury.
© Gohiion: Creuie a set oP dhkeses Por dat tews; Otore the wappirg of oles 1
the red وی of rack site.
۲ ۱ wer oe be ware of the physicdd lavaticg oP a dota teow, cro ج
لخاد ۴ the dota tec ts woved Pro por site ty carter.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 دوه
صفحه 16:
جاح حدم !1 لحف اناا( +
۲ و روت ی dete of severd stew.
© Goth sie hos 9 boo frocsuniiva women respousibte Por:
© Dotetctetagy a boy Por recovery purposes:
سس سا اه موه وه سا له و Ponteipatay ©
of that site. بجوم
© uth ote hoe اطع ات و مت و Por!
© Grontey he execuiiva oP trocsurives thot pricferaie of the site.
۱۳ exeruica.
© Coordotiog the terwtodiog oP ead tracrariiva thot ممعت uf the sit,
wwhick way لآ اك لمصصاه عه دعاك أن اه ای با تمصع او
5-3
0 e010 ©Sbervehnts, Cork ced Cnakershe
صفحه 17:
transaction|
manager
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. eon ©Sbervehnts, Cork ced Cnakershe
صفحه 18:
+ Oystew Pure Ordo
۲ Pokres uae to dotted systews!
© Coker of ante.
© Lowe of مس
۱ لوا by cetvork trexewissira cocina protools suck a POPP
© Boke موم و bk
١ اموا by wewwork probook, by novi من تجو مسدب cher cave kobe
© Drtwork potion
٠١ 6 وی sail to be peticwd wheat har beea spl io buy or ore
ca deg care fe beets مجو وی وبا سوم و
~ Onte: 0 subspsiew way له له و اه یه
© Detwork portico ood sie Pokees ore yeurrdlly trdsticcquishable.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 دوه
صفحه 19:
Cow Prowovls
© Cwm provok ore wed ty ere downy ures vies
© co trocsuntiva which execules ot wulipte siies هه ای اجه سره
sites, or uborted of oll the sites.
© wt wreptible ty hove د roeeunivg cowed of vor site cod oboried ot
ter
Bl he ter peer court (PO) protec te widely ved
© Ve tree-phose crow (QPO) prowl & wore eowplocted ond wore
expeusive, but avoids socwe drawbacks oF وذا "ا" اس ای وس
ام ولج اس سا اسر
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. e016 ©Sbervehnts, Cork ced Cnakershe
صفحه 20:
+ Two Pkwe Ovwwt Provo (OPO)
۳ Qoances Pobsioy wrdel — وه راو وه لس workin, cd do ot on
sey her ban, suck oe epee mere sree pe obey sas
۲ مش of he protec f taticted by the coordicaior Per the ket step oF the
trocsuntion kes bero reached.
Bl Phe prowed Ruolver he bod ster of whi اه مس
BE Let Phe a ماسج hited of ote G, ood fet مه مت ot G, ber
9
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 21:
+ سسجت 0: Obracag a Deven
۳ مس و ور و مه له من
© Cade he records <prepare > to the oa od Porces bog to skible stone
© sek prepare TP wessnps 7 dl ster ot whick TP executed
© Opera revevieg wes, iroccorivs woonger of site او معط
the trocsuntion
© Bet, سره للم > 1< to the by onnd seod و 1 weve ty O,
تا راو او و بخ
© add the record <ready T> Wo the boy
© Pore dl revere Por To othe stone
© sed ready TD wesene yO,
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 22:
+ سا0 ©: be Oroeios
۱ Powbe cowed of O,receued a ready P و بو وم
vies! ohenuee Tet be cbovted.
BE Opordkntor مت و طلی revord, Spawn 7> or <cbort T>, Wo the bry od
Pores موه له و لو Once he record stable sora to
trevordble (eved F Pokies oom)
© Coordentor seuds موه و ty eur portvipont tPprentay it oP the devisioa
عد د مسحي
© Ponteipaats toke approprisie utes broly.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 23:
+ إن مدر[ Pahuee - Ote Pare
Oka ote 6 recovers, texavices te bt detercoine he Pate of
Pofure. هس سب سره مهو
ote exectes rede (7) لس <1 موی ی را ۳
۳ لس <1 > مت را ote executes wade (7)
۳ ی را ready 1> record: ste ant cout O, to سب سم of
۰ 1 سس reds (7)
۶ 1 1 طم اس )1(
تا لت ۵ ند و records oowercikn اس ow و Bh he by
ما وم( مور و بطم
1« وه و سا ما۵ ماه( باس ©
TP مه اس سس
() طی سه سم 6 ©
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 24:
+ Waaday oP Palures- Ovordertor Pale
AP cordon Pais while اور وی Por Ps execute theo poricizaticry
tes wet devide oa T's Pate:
1١ 118 مرو ده site ویک و ی 1< record in its log, thea TP oust be
cowed,
AP عون اه صقصه مه oc بوک 7> record te ts log, feo P cust be
واه
۳ برع ورن portcipaicn هوک همه بح جات 1< record ta te bo,
thew the Paled وس 0 1 و او اه
سل T.
(OB cece oP the chove moses holds, hea dl cote oes اس have و > 1۶
record fa her bxp, but oy ackdivad coil records (suck os <ebort > of
<powwt T>). I his case wive ster net ut Por Op recover, to Pred
سوب
© @behtcg problew : جوا چرشه way have te walt Por تم وا ی لطاوط
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 25:
+ Wardiay oP Pulures - Ostwork Portiva
صم عدا اه سا روم سس و poricipanis rewota جا of لدت لدم صمت Phe
ef Pent oo the oot protocol.
Pike coordktor oad ts porinigoais betray io several partis:
© Glee trot ore ol in the portiicg oootcioiey fhe coercion thick the coercion
ros Paled, ced exerute the protocol یی با ان وله جات لو وا
* Ov kare reste, but sites way stil hove to wait Por devisioa Prow
coordi.
© Phe هت od the ster ore th ی اجه ماو ١
the sites tothe vher portica have Paled, god Polow the usudl cocci protocol.
۱ ری ww harw results
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 26:
+ (Reccusry ad Oouneveccy Oot
19 eoubt trowurtows hue u Sready T>, but wether o
<powet T>, wor oa Sebo T> boy record.
و اه oP سوه وت بط امه همم با
0
BL Revovery ckprikws pou uote bok Promos tothe lox.
bet oF locks bell by T = را oP <ready D>, write ot Srewdy TD, L> لس ©
whe te bo writes (read broke mas be exited).
ia hor صاصم Por every ede treceurtrs Phe locke ©
ready 7, L> bry record ore revexnired,
۲ Rex ork rearquisiion, irrcsuniva processiay com res une; the coal or
لول و اسان treacsurioas is perPorwed pvocurredly wits the exevuicd of
Sew اس
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 27:
4 Olercatve Oude’ oP Trawwiva Provessing
BE Dotea of « sien و اه ول وه مس cerry
او
ولا ام و رون توا وق ۶
۱ the to peri ot exterodky fottdted tracsucica to block
food! trocsaniogs Por oc todeterotcate period
© @lercaive wrdels cary vul موی رطلوه نوا مج
© Code ty hoode wessuges west be vorePuly desiqaed to easure uiowicty
ood durubliiy properties Por updates:
۱ یی قاری be cquarcaced, ta tat ioteroediate stages are visite, but
موی امه ون on foozosisted اه resul due to ووم مسجحجمت
امس عم نا موه و موه رس مس ©
مس properties to
ی رسمه لبط با نا الم موی Oessuyes ore *
Kopleweutdtion techaiques kiter مد ال ۱
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. e008? ©Sbervehnts, Cork ced Cnakershe
صفحه 28:
Olercave Dudes (Ova.)
© Ootvatoy excople: Pucds trowsPer between two books
© Dun phos oot would hove the poteatdl to block updates oo the oor
favolved fo Pues tracer
تاه عمط ©
ty oer ste و و لو لو چم worry Prow source )+
اه فطل oredis لو مج سس )۱
© Deseagiay hee lrog bed used Por جوخاوط مصيج) جصاصمصدم لاس
هی سم eri)
سح رت ۲
© لكيه ماص صصص a Wessuye سم وم راون ع quorcaierd tr
be delivered
< Guorater os loony os desicaicg site is up ood reuckoble, code to bocce
eadelverdble wessaqes wet dev be avaible
acco. و با ما رو لو ری
جد ججا امه أصدجه یو ,ول مها بطلمیه 1۳ ©
4
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 29:
4 Grror Contiow wik Perssirdt Desoagaq
Bl Onde ty hands worsens her ty the core of vate of Palure sitios (eves
وی سم مه delvery)
۱ sect bork to
power site
© Oke Palire wessuge i received Prow destoativa site, or destcaica sie tse
bes unl exist, so7cey west be deposited back ia source اجه
* Oroblew P source wormed hos bero dosed
yet hues to take core of problew
© ser code exevutog irocsuriog provessiry veto GPO does aot have to dead wi
suk عساه۳
© here we ony siuctiogs where اه واه وت error boa ات
beceht of obsrare بسا اه
© Gx. prety اس ofl اس ures اس
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 30:
+ Persea Dessay vod DorkPows
Bl QorkPows prot o لجيه اموسر of inneunioad له امه مس
sees eed pred ی مومسم میرب rete ogee
© Gi, wheog book reveves o loon upplicdivg, way ceed to
* Coctedt extercal credi-cherhiag ره
* Get approuds oP var or wore wes
seed theo repped to ما ما از
© Oe sin) worlPiws it Chopter OS
© Cersisted wessugiay Porws the urdervicy foPrasticucture Por workAows ia
موی لاب د
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 90.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 31:
Cowurrewwy اهبوهن)
موی لا و ی چا مره ای توص رن( ۲
Bl Qe woke thot ew sie poriopdes fo he execuioa of اس او و io eau
,اهاط
© De weve dl replicas of ony few ore updaied
© عجو لز( how to rete this it cose oP site Puhires biter
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 32:
امومع موه رسب و و راوا رما
ste bok wane fot resides tao sie choses oie, sy 0 موی سوم رقا
,6
@ Okew شم و ceeds te tock a dota ites, de ct bak request te GS, rd locks
swannger deterwices whether the lock coo be graced رال
۶ 1۴ ما رس weer seuds 0 wessuge ty the site whick taticted the request
© 1Pw, request ie dekved vail trea be graced, of which fee 0 wera bs
جا امج the له باه
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 33:
+ Orade-Look-Dacxpr Bpprowk (Ov)
© Ve tenewive coo read the date itew Prow gay vor oP the sites of hick o
replica oF the dott tes resides.
Bl Ortes cnet be perPormed oa dl repos of otc tea
BE @dhantoges of sche:
۶ ماع
۶ سل م۵ borrdhrt
1 0 of اه
9
© Ockercbly: syetew مومت با تا ی ها ote Pakire.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 34:
Ovrbuied book Oacaper
Baths opprouk, او ما جر ره by lock wacuyers of each
ite
جوم مورا craic access ie ood data teow
* ®t spenid protools way be used Por replicas
۲ وت تمد te destrbuted ced co be wade robust to اه(
۲ مش امد نمی( is wore cowphoued
© beck مش الم عون موم
+ مس سو() this beter
۲ اس هذا خأ من سوت
موه و
© ام رسب
© اس لس
© Quon mee
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 35:
@riwary Ovpy
Bl Choose oor replica of chat tow ty be the pricoory copy.
© te لحلاب جا مجارت حصا بصم the pricary ote Por trot dot مجو
© OR Rereat dota tews con have dhRered privay ster
۲ از o eeuntod uerds ty lock o dota tee Q, trequests a lock of the priory
site oP QL
© Aeopteily vets locks co dll rephous oF the date ew
© Oeeti
© Coeur ovoid Por لاو data hooded sicviody to vorephouted dott
- ieople ماو
ام( ا
اه اه ما مه امس و ۵ 1P the primary sie oP GQ Pus, ©
.راوجمه با نویه لو و لین
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 36:
سسوسية 000 اله
19 سای له ما ول لاك امه له مت ما مرا recy Por ck
tews stored of that ste.
BE Okew o ixxeunton woken ty book oa voreploated this few GQ resid ot ote ©, 3
مس او و و وم
© 12 © لحطاصط جز fn oo ee potble wode, theo he request tz delayed vel tt zor
اي سا
©) Oke وا سا ای سا مه مهو ما warager seuds a wessuye
back to the tector tochootoy trot the lock اي وا اوح
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 37:
+ Ocerty Proton (vcs)
dace of rephoded data
©4P Qe repioded oo tes, theo oooh request و مه سا اه مج
swore trad oP oP the o sites in whick G ts stored.
© Whe tensuciva does ont operde oo Quail thos obtaced ot locks ooo
اه سا لا اه رو 6
© Ohea writoy the dete tiew, irresuntiva perPorws uries va oflrephrcr.
B Beet
© Cou be wed eves wheo sowe sites one جا ادي
١ details oo how سم اج ارت وا oP ste Phere hater
B Orato
© تج 6/6 + 0) woeseues Por handy bok requests, od (2 + ()
وه سای شمه وا مس
cack oP 9 trowsuriioces وت - ما وه ات مه الم و( لو و
ول و sway have locks vo WOrd of the replicas oP
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 جووو
صفحه 38:
Orved Proivvol
boc lock وچ اه ام و مت wuiorty proieonl, however, requests Por
shared locks ore korded dPPeredly frac requests Por exchusive locke.
© Ohad bebe. Dheo 0 trocsartod ceeds te look dota lew Gt stop) requests a
lock مس G Prow the lock wosager of vor sie ovotatotay replica of GQ.
۲ مه مب( با مب ceeds ty lock dota tee Q, ۱ جن اه وج
Q Prow the lock وی و أد اه وی a replica oF Q.
Bl @dhantaye - kopoeer kes overhead oa read opercioce.
BE Derodvontne - سمالي sverheud oo writes
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 39:
Quon Oowews Prowvol
۲ ۵ لت of bok woeiy ocd biwsed promos
Bl Guk ote & wokned u wekh
© Let be the tod oP ol ote wei
۱ من تال ches تحصو لحي Q, ued wre gumnine بي
٠ مات Q+Q>G ud CTQ>6
۶ مس vos be choses (aod ی و اوه مس نا tow
Buk و توت بابرا نس ام thal he suc of he ote weighty & >= G,
Bl Ck uric cnet lock punk repiow thal he suc of he site werkt ري 0 << و
© Cor ww we wee dh replicas oe writes
ماه وه تاه وا تمس iy be vouvaluble desorbed hater
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 40:
جیسب 4
لجسحاسصل جا لحب ححا جوت جامصصاصجم ام موی لوا م1 ۲
مد
ی عوی و مق سا نس مه Cock ©
ماه لاس و و و و yeuercie صا وا تام و( ©
۱ 0 unique Ipod عدص مدص pier o legicd couier or
the todd clocks.
© Clbd usique thvestap is obtaiued by courutecatay جمصاددصا جوا سوم بط
wit the voique deciPier.
local unique
timestamp
global unique
identifier
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 41:
+ Droeokropiay (Ovc.)
BO ote uth a eb cock wd wokm surder Roeser
© Gil ded) correct sertdkzabhy ماه مه
© Out “dowbestnes” rxewkow
Bo Pix his probiew
© DePe wahia pack ste 6, حيصا د cbc: (LO), whick qecercies the wine
et eT
© Rewuire frat © xvowe ts bird obok wherever او تا سوه
عه ber يها بوي حا ء weed ی و
of LO, سس
© otis cose, site 6 advouzer tis Irgicdl clock te the vohue x + ۰
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. e000 ©Sbervehnts, Cork ced Cnakershe
صفحه 42:
2 سن 0 +
۲ تاه ما سوه لد لو توا dua wk used dewees of
فلت رعا) تون a sarosiee oP seri)
Bu! cxeterckee replouioa! unkies are perPorwed ufo oknke “unter” ote,
راو و امسر له tes.
© Propogaivg is wt port oP the update مجح تمس
* Ou be ای شم اه للجم
* Ow be periods
© Oa way oly be read ot shave sites, ot updated
* Oo ceed te obtata lacks of cay rece site
© )ةهقح وموم كلها بمسحاسصل عونا لخامص بلط
۱ €.4. Prow ceaird oP Pic to brook Pice
© رال صصص سوا أتخادى د85 quertes oP Ace Prov the rota dotdase
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 43:
+ Qeplowos wik Ded: Oowetewy (Ovu.)
© Replies should see u هوجو suupshot of the database
© Dhotis, 0 state oP the dotubase rePectog dl ePPevts of ol recsurtizas up i
soe poi tothe sertdtzaiog order, ced a7 ePPevis of عمجم تا رون
امه وه @.y. Ore provides o Create Snapshot stewed to rede ا
site و و او ما oro set oP ما و ان
0 ache
۶ یه rePresk (cooks or periods) or axnnnd rebresk
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 44:
+ 6( ای ی بط bans Rapin
Bl Qik wulkraster reptoaion (doo caked urdie-ce here rephrioa) updos ae
اه و ار اتمه وه لو مور روف تم
© سنوی بت مس ان بل لا و اون مه of
the تب oP rephoatiog, ced chtubose مومس سل سوم مسر of
اس سیر بت با
> Coupled uth 6 موه سم
© Oey sees suppor hey propio اجه ی بات Per
genset ieee
© @lows updiies to voour eve P sows sites ore dscvouenied Pro the
,انم bul of the cost oP ری
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 موم
صفحه 45:
ما سین +
|
:© جد د Dy مس امن ۷ cen tow
1: 00 ware ()
rie (”) ware (X)
| | |
ماس
اسر (00) سس
جسن )0(
rat ام را و
Wott Por X4ork oa Y
(Resch ام و موی ای اتقو fools ot ether or
سپس i
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 46:
Ovurdized Opprowk
ره وه و و ای له له و اي qebdl watPor ©
coor dictation موم
© Red gopk: Red, but wckorw, state oF the sysiew.
۱ the ovaiciler charter the
اجه اه لحم
ات لصو سا ی وی خن ای با ۳
عوك مت اما جهن مت لحم و لو is لو رو هن
عون
۱
.وماعواصل-صاعين عطاصدا ها جلججم مادصل صمت ددا ©
18 ۱ رو وت ft selects اه لت له مش و sites. Nhe sites
voll back the victor trorcsuntion.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 47:
site Sy
Global
site Sy
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. موم
صفحه 48:
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 49:
+ doe Oper (Ova)
Bl Guppoee tht starter Pro the ote show it Pure,
٩ 1 مه مس ot G,
> renin Wo were eee TT مسج عم مج
Dornnpr of ste G, to the coordkntor)
©. Bud hea 1, requests o resource held by Tt ote Ge
١ مه و ماج Keer TP Brow Ga to be coordi
۱ موه بو سا ما ید سین reaches bePore he debte wesecne
۶ وال ان و صط جوا من با
۲ اوه هط لا با
وه مر م2
BL Dhe Babe oye cbove و ای جر rey.
۲ Rabe cides الج جا اما او مج مس
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 50:
+ پوس( Rolohe
© Qoevessey rolbacks way result wheo deadock her todeed و وه تحص
مش bos ber picked, ced cecouwhie gor of the troczantizes we oborted Por
وی varehted to the deudioct.
© Ocevessey rolbachs coo result Prow Pobe oyles te the qobdl watPor graph;
owever, likelihood oP Pabse ناج طسو
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 60.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 51:
بلس
igh وه واه Por whick systew is wt Puy usable should be extrecehy
baw (ext. 99.99% carb)
موی oP و( خن اد مشخ نا مرو ان روا ما( ©
(Polures are wore likely to horge distributed systews
۲ سوواط و رات سا و wet
مه سی) ۰
سوه رو موه وه مرو با ملس ۶
اه or bik te وه ارجام ©
BE سا detevioa: dofoquichioy koh Poker Brow sie Paki ix hard
© (port) sohtion: مادا جد © باصملا جا دامتعا عون سره
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 52:
+ ReooP kurta
طسب ۲
اه تاه هه وت ما تسوا اه bor ©
بوم روا سوه ام ان لت موه لاله اسب مج بجبله() +
اه اه من old lok
incase ody soe repioos oP a dott itew Poted, tay be نصا
hed accessed data of o Poled site ما شم سامت possible to
(ces ate)
© 1Prephcoted dota tews were of Poled site, update sysiew mukioy to rewove
thew Brow the bet oF replicas.
* Dhis should be reversed wheo Poled ste recovers, but addiiccal care
weeds ty be tobe ty bray voles up to ول
© (Po Poled ste wos u pedir server Por sowe subspsiew, oo period wust
be held to deterctor the cew server
مس الما جاص ,فل ممت بروج تتجهمه C.y. cere server, *
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 53:
QevodPPiquraiod (Ovdi.)
© Gree wetwork portion way ont be detiequichable Prow site Poakire, the Polowtcry
مد oust be avoided
© Ww oe wre vedi servers elevied in distort portico
© Oore hoo coe portion updaies a reploded data few
© Opdaes net be و اه موه مره ی معط dou
۲ مسرت worry besed ام
۱ coe write ol wvalible” ip trotdkziay but causes probes
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 54:
+ Dopriy-Besed Bpprowk
۲ ۱ wapriy prowool Por detibuied poaruneuy ordi co be wordPied to
work even P soe sities جاح صمي جمد
© Gack replica oP euch tew hos 0 version auewber which is updated ارت
replica if updated, os vulloed bets
© bch request & seu ty of ews 4 the ster of which tew rephour ure stored
ددمت اعون ل Wy wheat a back is ob [ اه رزوی و وی
© Read operatives bok of oll rephoas locked, ood read the volue Proc the
replica uth: largest versiva او
© Dav urte this ude oad versiog eanober back اس مرت سا
اه مس (ao ceed tp obra locke oa ol repos Por thts task)
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 55:
+ Dopriy-Besed Bpprowk
۲ Dopriy proton (Ovu.)
© Orie opercticns
* Brod highest versiva ounober like reads, cod set opus versiva لام وا اوه
highest versica +
* Ortes ore thea perPorwed 7a ll locked repioos من امس و اج
these rephous تنج طا اعد جز versica او
© Cakwes (sework oad ste) cose جه مما جه ام مه
۲ 3 اه و اه ری و ی وی و ey updated cute ites
> Duras reads 3 wopriy oP reploas ore ovakible اوه ی لب و
< رس ما م۵ 8 phwe aww oa be wed io ترس سل
© Ove: reas ore quarnived ip see kiest versie oP cot tea
© Reteyraion if trvid okies ceeds ty be coor
© Quorn oer cherihew vou be skvtely الم
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 56:
+ Read Our Orie @l (Buckle)
© Oreed prowonl fo sperid cose oP que poe
© Ohaus reads ty new! oxy ove replica bul ukies require ol eplows ty be
جاج امي ot oon eve (caked read vor write ol)
BE Read exe write dl avakdbe (iyporkiy Puled otes) t» uliruive, bu محص
04 Poled ak way come buck up, witout a dervouerted ste ever beter
awwore tof twas dscoccenied
© Whe site hea hos oh volves, oad a read Pow thot site woud returc ot
سام موم
ر ام ما ما ال مر اه( اه رنه رن طد 1۴ ۶
سوم مس
© Oth cetwork pontiionicg, sites to cock روت ماو update sae feo
02000000
© bebevieg sities to oer portiiccs have of Potted
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 57:
دمتسي حا Ow +
1# Qhew Poled ste recovers, tet cock up wits oll upddtes thot it wiesed whe t
wes dow
© Probe: updates way be happecien ty ewe whose rephod te stored of the
site uhte the site is recoveries
© Goktion (: hot dhupdites 7a systed while د وس sit
* Ooncceptible derupiog
© Gokitos ©: او للد عامط oP ol dota tecws of the site, update to hitest versivs,
thea retease locks
* Ober scluticas uit: beter pramunreany dso جات عليه
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 000? ©Sbervehnts, Cork ced Cnakershe
صفحه 58:
جیلعهظ) روما زر موه موون)
ص اج syste (Gevira (PD) are obo (سوه ابا) جاص س0 1
ره ۷ provide
اوه سا ما له او بو و وی ی Bl
۱
او سر 6 را رصن لس Wo weed Por ©
ها موس وی مس نو خن او نت BE Doky deirbued chicbwees
ام رویط رت اجه سل )© >( rules ند روا تاره
seemed veh reser بت وولو و اجب میب بو اجره با
backup syste
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 59:
+ Qoordertor Oubotra
مه 5
۱ tPorwaivg lool ty ossunve the role oP
لو P the یی مه
اه ام سوه سا مت له ول سوه ها exentes ©
جما جد state toPorovatiza موی و( لت امه fPorwatiza os the
atu coercion
© dws Post revovery Prow ooordtor Pohure but evolves overhead curt
sored provesskny.
۲ سود منیا
© eed tp هه و بنج و اد oP Pokies:
© Cx: Buly Okorther - applicable to spstews where every site oot
لمجو a weep ty every ver sie.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 90.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 60:
لسب) راد
۱ ۳ ۵ همم request thot te oot cxewered by the ooordkntor اه اس
fiend 7, weer th the coordkrtor kar Paled (G, tes to rect too ce the ew
ور
Bl Ose aks on اه ما لاه نت جنات وه تا وی ماه ۵
thea wats Por oy of hese provesses ty oxewer wie ۰
BR resper wthia 7, connor hot لك ster wih لامجاي yreder thos fave
Paled, (,elerts teeP the cw cordon.
BO Rewer 6 reveurd ©, bec thor صمب , 117 مسمجنا io receive a ene
heer ie a bebe سجس لو سوام erie bers br سییر
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 61:
®ub Okprikee (Ovu.)
BP co wessuge ts seul wikia 7", oss the site wily o higher oeober hos
Baked; (©, restarts he سحي
BO Per o Poked ste recovers, ١ اجه مش سا امه sure
اه
۲ ۳ راجت بو مرو مه مه ی he revovered ste Porves oll
processes با با ای نوا نت t becowe the coordadior site, eved P there
ای اه نت وه عشه رام و
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 62:
+ Due third Gaaey (Proceso
© Por cedized systews, the priwery orterica Por واه اه سا مس
رود لاور ts the cucber of dish یت
۲ oodstibuied spstew, viher issues cust be tobe isto oat:
© Dhe opst oP a data trowswissiva over the ueiwork.
© De poteoial yeia tt perPorcaure Brow kevioy severd sites provess parts
oP the query ta parcel.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 63:
Query PreawPorweips
BP renshitay dkebroic queries vu Prarenis.
© 1 ماو موی وا عاتاوومم سا مه r Proc its Procevenis
سم ما ماه مه Rephive relative rby the expression to ©
fate ماو میت سا اه موه اما سا ین ۲
yack cane abn (OPEV ) 0 > سحت
(سسص)
OO =O مرن سپس
DRE ال ) bere
6 موی = “ds” (vere, U arent)
hick ts opterized toi
© pene لا )مریم یس ٩ سیر ares ent (PAM)
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 64:
+ Gece Gary (Oca)
© Gree upon, hos oly tuples pertotcten to the واه ی هب مها ابا the
وه مساو
ماه و رات و ما سا رانا
aye, (et) دا
BOD ip expressive tp the exopty set recardiess of the orutects oP the oppruat rebates,
urepunl, os the result oP the query. وا B® Pied strate & Por the Wilde site to
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 65:
Greople Join Provessiay
۲ لین the Polo wien rebaicod debra expression to whick the three rekiiccs ore
ora gery bred o ote G,, he syotew ceeds to سم he rem ot ote 6۵
سیم با نمی سییر یی
br tet: سسط مه
stored ot ste G, & تسه
8 سس
6 ملسم
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 66:
+ Bosebl Gravy ۵ رصن 2
Bhp copes of ol bree rehtio tp ote G, oad choose و irdew Por proveseknt
he ectre broly ot st G;
Bhp oon of he corn retiod i ote 6, ond cowpule fore, = arnt
Go. Chip ear, Prine Gy Ga, ood orp ter,
term, broek Oo. Chip be rend trom, 7 Oy.
Bl Dever sicker sircieyer, exchuayiay he ew G,, Go, G,
Bl Dest oowwider Policy Portors:
اه رال و مس ۶
© pst of ieee a dota block between اه
© rebive provesskn speed ut ack ite
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 67:
obra he remit ot GO).
x
re
Coewipts Oruew
BE Let n be orcktioa wik schewa (R, stores ot vie G,
vires vie G.,
Let ra be arckioa wik sckewa R.,
Bl Cucknte he expressira ry, Pend
1. هو term — Mao ae (rl) ۷ ۰
13 ©. Chp uy, row Gr G.
6 Crm beg rg carla,
۰
B®. Ohy tur, yo ©, b Oy,
a
8. Cowie eer ot G). Dh he soe ص
e007
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 68:
Cored OePraica
Bl Phe sewipta of ry wih r,t dewrted byt
re
bx,
لط لسمجاهجت فصا لخن سارو ما ارم
Toe
this deProed by:
Taw (ra rs)
عم
ّ
خام co be exteaded to 0 series ره وله با ,لول هروه ۲اه عم (Por
sewipia steps.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 69:
+ dota Orreterios thet Bipot Pardo
۲ سین ey Mg, Vn, rg here retain rt stored ot ste GO, Phe resut اصح
be preseuied ot ste بر
ge ede اعد يك re reed a Oe reer ع اسيك عا وه
Cet ee aC,
۳
BG, chips hikes oP (ry ra) Oye hey proche
Be 5
اليك re) Gy ۸ لد
و
ام ام ی یر اه معط لاب امن وین
(e wae.
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 70:
ی () 2222222522 +
© Oc dotubasr upphodiows require dota Prow سل رس و روم و
located شا مها و of hardware ood soPivare phiPorns
(عت , ان راما بل رورت لت ما
(Decrees secret peers سب be سپ
Oper rewy oro way be besed اس مج سل مه
لصف مومس
BE Gyseurbvel detals chovst perio oe toy Keowpuible.
۴ ۵ موه هی & u oeP vere kiver ow yy oP expiry برد مق
اسان te descend to nmap ite ناج ركام
© Credes on their of bud dakbuse ieyruiza wit ay phyoid database
tect
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.70 ©Sbervehnts, Cork ced Cnakershe
صفحه 71:
۱ موی مورا od ukrivistaive ovoid
lows use اه spevic-purpose DOOGs
۲ Gey wank 0 iPied bros DOG
© CUlneqraten iy u owns DOG Rare
» Deckard لمي بجو مايا opt of سوم صر
> Orgnizancrdlpolicad WP idies
~ Orprizatons de oot wort io Wve up cecil oa tet det
— Dood یل wk جا rete a qed ded of موه
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 72:
+ OvPed Ow oP Ona
BQ creewedt oa a vr ts cored
© Dredly the rebated coded
Bl Oqeewedt oa a ora creed shew
© PReredt cower Por exxoe اه لا
بو سوت موم اور با
Bl و و وه represectatioa oP shared det
۶ وا مد بر prevbivn,
۶ وه سول
١ ۵8۵0۲ مس 0
> Gort order varios
Bl Ocreewedt oa wits oP eure
© Octo to anes
© Cy. 2 ve Ovkxpe, Ouobt ve Booby
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. وجوه
صفحه 73:
Query Provessiag
۴ Geverd eves query processing tau heterryeues doth
© Gchews ماص
© Orie a wrapper Por pack dott source to trocekte dota to ممجماءد اجام
© Oreppers cost obey trocekte urcktes من debdl sckewa to undies ot bool sokeur
BE Lioted query vapcbiies
© Gowe deta sources dw ody revircted Pores oP sevice
١ Ban. web Pores, Plat Ble dota sources
© Queres kee ty be brokew up ond processed pody of hee source ocd party ott
Ha cee
سم موه ماه وان موه موم با پر
© Decide whick ster بو سم و
ل لا
سا0 لح 0 لا سواه 1 وجوه 0
صفحه 74:
مس ین +
وه مد س مسا طوطی سب نكا systews وه ود 0 7
by proviker قاط اتب مه view, od providers suery Pores x1 dobal view
۶ سل( Bul Recked crutdatcbase syste, wedhiors qecerdy dy ot bebe
اعورم جو مسجو عمو
© Ouke teres weddior ued wulidctobase ore suweives used
toter سس
© Dhe tere virtud dotdbere ty deo werd to rePer هلسلس وا
مدرد
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 هوه
صفحه 75:
Orsviry Opsews
© Dyed hieds of مت رو
© Cropbpee اس كلما os ove, id, ewal, phour, oPPive addr, ..
© ve persvod ام ول مس( توت ها تا موه
٠ .دج browser bovkwarks
© Ohte pes
© Cortes ی بر سم or tbat
۱ ect Por Porword lookup io Ped wore و موه
© Velow pages
© Cottes organized by properties
© Cor reverse bovhup tp Pied cuits wotchioy sper Pic requirececis
© موه لت چا نا وه سس میا( on ات
© Bhernive 0: Deb isterPace. Dot great Por progres
© Clernive ©: Gperidzed dreviory were protools
* Coupled wih spevtdized user tterPaces Ez
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 وجوه
صفحه 76:
+ reir) (Docsee (Precnol
Bost waxed) wed drectiory تسم چیه
© LOBE (ikwuerh Drevin اس وه
۶ Groped Prow eater (SOO proc!
۲ میت Ohy wt wer chtcbase protools the ODBOMDBO?
9 تسه
© GropiPied proces Por لاه ype oP data urcess, evolved parcel to
000000
© Crovite وه و Kerarchicd cecviey wechovisw sili ty Pie systew
و
<١ cua be porticaed ceooupt wutple servers Por dPPerect party of
the Herarchy, yet vive oi sive view ty eer
- oy. dPPeredt servers Por Bel babs Dura Wil ood Bell bobs
unpre
© Orevioies woy use dotcboses us storage werhoisw
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 وجوه
صفحه 77:
4
LO@®@: bigkweidt Oreviry Bovess Prowonl
۲ ۱۸/۵۵ Ou Dede
© Oct Occupation
© Osrinied Dreviory Trees
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 007 ©Sbervehnts, Cork ced Cnakershe
صفحه 78:
LOOP Ode Dodsl
© LOOP اه سس سس
© Cores oe sober اه
۳ Gok ery cnet hae wine چم لام )00(
0 cnt wp oF a sequeue of rehive detached canes (ROOz)
BE Gy. Fo OD
© one Ciberechaz, met Lobe, valcect, POCO
© Granted ROOs (oom be speoPied we port of svkewa)
( مرو زين RRO OU قن سمي
7
مس نو (
© Grokor to paks too Pile spstew but writed ta reverse directa
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 79:
+ LOOP Oca Dodel (Ovw)
B Gores ma hae atrbtes:
© Otrbntes ore اس رجا لجس مساج
© LOOP kee severd butts rer
* @rcory, sire, toe types
2 Dek لماص مااع PoptikDckhese! postal ockhene
B LODE chws dePrition oP vbint chose
© Obert theses speck y چا له وی جات
© Con vee iohertowwe ماه ماه سای نا
© Cory von be لاه ty be oP var or wore oben choses
> Oo weedy hue safe wostepertic ie
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 وجوه
صفحه 80:
+ LOOP Orta Dorel (vvw.)
© Gottes oryavized into 0 dreviory tPoreuiod tree uocordery to ther DOs
© beh tevel wudly represeu speviic vbievts
ای متس objevis suck us موس وی Aotercal ode 8
هس نو
© اه مان a onde tohert the OO of لت رتسم ocd x RODS
۱ €.q, taternd ode wit OD 08
~ یه ان have OO starter wits D=OGO aed Rutker ROOs
suck us و pr ou
> OO oF oa eciry ex be yevercted by traversisny pk Proxy vont
© beck evel can be oa dks pottery to coher ect
> Cottes can tus hae wore fro oa DO
~ 6.9). person wore hot poe ام it
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 81:
+ LOOP Orta Dactpukiva
© Ocdke GOL, LO@® des owt dePice DOL or DOL.
198 estewd, it dePices 0 vetwork protoonl Por ODL ood DOL
© Overs wer 0a BP or حلمب مت متس مس
© LOO و( ان سا سل
< ۱0۵ Dcta Ieterchorcge Porat (LOW)
۲ موی رصن & very stop! voy selevion & projection
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 0.00
صفحه 82:
+ LOOP Crores
© LOGEC gery wet seo)
© Buse: a ade to the OVP Prow where search is te stot
۶ © searck موه
* @otecs cow biraicg oF اه مس لس oP ی
~ Cxuntiy, wikhoords ood opproxtcoie equally supported
© © عد
< hist the bose, he bose oad عت ,مط احات كا he cutie subtree Pro the
base
ای سا نا هه ©
1۱ va cucober oP results ced oa respurce DoCERDpICT
© Dey ob spePy whether ty aiewotcdly derePereure uhases
B LOOP ORbs we ove uy oF spevihyiog query
© LOOP OP is cawher chercaive
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 83:
+ LOGE 06
Bret ptf ORD sper server und DO of bose
© hop: /rareseorch.belabs crmlp=buced,c= DOD
۲ Optrad Parker pars separcted by 9 اسامد
۱ Pra Kort
© Optoud pats spechy
6 atirbutes to returs (scopy crea ol)
Goope (pub وله putes subir)
2 Gearck ooaion (ou (ork)
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 84:
+ O Onde wig LOOP OP1
#include <stdio.h>
#include <Idap.h>
main() {
LDAP *Id;
LDAPMessage *res, *entry;
char *dn, *attr, *attrList [ ] = {“telephoneNumber”, NULL};
BerElement *ptr;
int vals, i;
// Open a connection to server
Id = Idap_open(“aura.research.bell-labs.com”,
LDAP_PORT);
Idap_simple_bind(Id, “avi”, “avi-passwd”);
... actual query (next slide) ...
Idap_unbind(Id);
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 85:
+ O Onde wry LOOP P11 (Ov)
Idap_search_s(Id, “o=Lucent, c=USA”, LDAP_SCOPE_SUBTREE,
“cn=Korth”, attrList, /* attrsonly*/ 0, &res);
/*attrsonly = 1 => return only schema not actual results*/
printf(“found%d entries”, Idap_count_entries(Id, res));
for (entry=Idap_first_entry(Id, res); entry != NULL;
entry=Idap_next_entry(id, entry)) {
dn = Idap_get_dn(Id, entry);
printf(“dn: %s”, dn); /* dn: DN of matching entry */
Idap_memfree(dn);
for(attr = Idap_first_attribute(Id, entry, &ptr); attr != NULL;
attr = Idap_next_attribute(Id, entry, ptr))
{ // for each attribute
printf(“%s:", attr); // print name of attribute
vals = Idap_¢ ‘get. values(Id, entry, attr);
for (i = 0; vals[i] != NULL; i ++)
printf(“%s”, vals[i]); // since attrs can be multivaluec
Idap_value_free(vals);
1
Idap_msgfree(res);
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. مومه
صفحه 86:
+ LOOP OP1 (Ovu.)
© LOOP OC 1 dev kes Pucrtiow to cree, update cod delete تفه
§ Gock Pusntiva col behaves os o sepordie و
© LOOE dees wt support aiowiciy oP updates
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. 00.00 ©Sbervehnts, Cork ced Cnakershe
صفحه 87:
+ Ovrinied Orevory Trove
© Orprazatzad روت مق وت be spit ict وصصما موه تس عمط
۶ له DP a OID ques ROO to be tagged a to ol euites to get oa vera DD
» Cy. wo O's, vue wikk subi p=burect, 0
ماک ,اکن اه کت اس لت
۱ من لوا 0۲۵ مب امد اه تم yevyraphicd locatica or by oresrtzoizcrat
تسه
۱ replication (woster-skve or wulierster
rephoctio) oF OIDs (cet part oP LOOP © stecrkard)
© Bak ات وت و وا ورن با رون )و و OID
© Cy. OF Cet bobs way have a separde OID, oad OID Por p=bured way hove a
سا wa n= @ell Labs coutaictay a rePerrd ty the Bel bobs DV
© RePerdbs or the hey iy toteqrates تست و ماه تال و
© Okeo a server yes a gery reuchieg a rePenrd onde, tay ether
> Ponward query to rePerred OP eed retire رجات صا جحت oF
* Give rePerrd back te cheat, whick trowsporeuly seuds query to rePerred DIT
(Wako weer ter etic)
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 88:
Gad oP Okaper
صفحه 89:
نعمرسمحوه
ی ام ۳ ۶
© tony por, ot eet owe ste wast be up.
© 0101 دده (C vies (patiepads oe well w coordkrapr) om Pal
Phove (: Obracioy Prekoinay Devtivs: ‘Meindl و 000 ۵ ۰
© Cuen step ren ty cowl P eeiruied ود ص طا
Prove © oF OPC f oplt tay © phases, Pose © oad Phare 9 oF OPC
۰
eed revords tia wuipk: (ct lewst (K) stew
© 41a prose 9, coordknior seus ابوج اموت wessace i ol parioivatay ster,
Qader OPO, honed of pre-cowsi deveiva cas be used to cowent despie coor diraior
اه
© unk blockioy problew os bag a7 < (C sites Pal
Orautraks!
© higher overheads:
© events way ool be satePed ta practice
4
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 90:
Prue 69
مموو
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
صفحه 91:
0 سب 3
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 92:
coordinator
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO. سا0 لح 0 لا سواه 1 مومه
صفحه 93:
Oxsdrer Gyetrw Oneewpe -O* Crim, Gui O, OOOO.
Prue م66
Chapter 22: Distributed Databases
Database System Concepts, 5th Ed.
©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use
Chapter 22: Distributed Databases
Heterogeneous and Homogeneous Databases
Distributed Data Storage
Distributed Transactions
Commit Protocols
Concurrency Control in Distributed Databases
Availability
Distributed Query Processing
Heterogeneous Distributed Databases
Directory Systems
Database System Concepts - 5th Edition, Aug 22, 2005.
22.2
©Silberschatz, Korth and Sudarshan
Distributed Database System
A distributed database system consists of loosely coupled sites that share no physical
component
Database systems that run on each site are independent of each other
Transactions may access data at one or more sites
Database System Concepts - 5th Edition, Aug 22, 2005.
22.3
©Silberschatz, Korth and Sudarshan
Homogeneous Distributed Databases
In a homogeneous distributed database
All sites have identical software
Are aware of each other and agree to cooperate in processing user
requests.
Each site surrenders part of its autonomy in terms of right to change
schemas or software
Appears to user as a single system
In a heterogeneous distributed database
Different sites may use different schemas and software
Difference in schema is a major problem for query processing
Difference in software is a major problem for transaction processing
Sites may not be aware of each other and may provide only
limited facilities for cooperation in transaction processing
Database System Concepts - 5th Edition, Aug 22, 2005.
22.4
©Silberschatz, Korth and Sudarshan
Distributed Data Storage
Assume relational data model
Replication
Fragmentation
System maintains multiple copies of data, stored in different sites, for faster
retrieval and fault tolerance.
Relation is partitioned into several fragments stored in distinct sites
Replication and fragmentation can be combined
Relation is partitioned into several fragments: system maintains several identical
replicas of each such fragment.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.5
©Silberschatz, Korth and Sudarshan
Data Replication
A relation or fragment of a relation is replicated if it is stored redundantly in two or
more sites.
Full replication of a relation is the case where the relation is stored at all sites.
Fully redundant databases are those in which every site contains a copy of the
entire database.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.6
©Silberschatz, Korth and Sudarshan
Data Replication (Cont.)
Advantages of Replication
Availability: failure of site containing relation r does not result in unavailability of r is
replicas exist.
Parallelism: queries on r may be processed by several nodes in parallel.
Reduced data transfer: relation r is available locally at each site containing a replica
of r.
Disadvantages of Replication
Increased cost of updates: each replica of relation r must be updated.
Increased complexity of concurrency control: concurrent updates to distinct replicas
may lead to inconsistent data unless special concurrency control mechanisms are
implemented.
One solution: choose one copy as primary copy and apply concurrency control
operations on primary copy
Database System Concepts - 5th Edition, Aug 22, 2005.
22.7
©Silberschatz, Korth and Sudarshan
Data Fragmentation
Division of relation r into fragments r1, r2, …, rn which contain sufficient
information to reconstruct relation r.
Horizontal fragmentation: each tuple of r is assigned to one or more fragments
Vertical fragmentation: the schema for relation r is split into several smaller
schemas
All schemas must contain a common candidate key (or superkey) to ensure
lossless join property.
A special attribute, the tuple-id attribute may be added to each schema to serve
as a candidate key.
Example : relation account with following schema
Account = (branch_name, account_number, balance )
Database System Concepts - 5th Edition, Aug 22, 2005.
22.8
©Silberschatz, Korth and Sudarshan
Horizontal Fragmentation of account Relation
branch_name
Hillside
Hillside
Hillside
account_number
balance
A-305
A-226
A-155
500
336
62
account1 = branch_name=“Hillside” (account )
branch_name
Valleyview
Valleyview
Valleyview
Valleyview
account_number
A-177
A-402
A-408
A-639
balance
205
10000
1123
750
account2 = branch_name=“Valleyview” (account )
Database System Concepts - 5th Edition, Aug 22, 2005.
22.9
©Silberschatz, Korth and Sudarshan
Vertical Fragmentation of employee_info Relation
branch_name
customer_name
tuple_id
Lowman
Hillside
Camp
Hillside
Camp
Valleyview
Kahn
Valleyview
Kahn
Hillside
Kahn
Valleyview
Green
Valleyview
deposit1 = branch_name, customer_name, tuple_id (employee_info )
account_number
balance
500
A-305
336
A-226
205
A-177
10000
A-402
62
A-155
1123
A-408
750
A-639
deposit2 = account_number, balance, tuple_id (employee_info )
Database System Concepts - 5th Edition, Aug 22, 2005.
22.10
1
2
3
4
5
6
7
tuple_id
1
2
3
4
5
6
7
©Silberschatz, Korth and Sudarshan
Advantages of Fragmentation
Horizontal:
allows parallel processing on fragments of a relation
allows a relation to be split so that tuples are located where they are most
frequently accessed
Vertical:
allows tuples to be split so that each part of the tuple is stored where it is most
frequently accessed
tuple-id attribute allows efficient joining of vertical fragments
allows parallel processing on a relation
Vertical and horizontal fragmentation can be mixed.
Fragments may be successively fragmented to an arbitrary depth.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.11
©Silberschatz, Korth and Sudarshan
Data Transparency
Data transparency: Degree to which system user may remain unaware of the
details of how and where the data items are stored in a distributed system
Consider transparency issues in relation to:
Fragmentation transparency
Replication transparency
Location transparency
Database System Concepts - 5th Edition, Aug 22, 2005.
22.12
©Silberschatz, Korth and Sudarshan
Naming of Data Items - Criteria
1. Every data item must have a system-wide unique name.
2. It should be possible to find the location of data items efficiently.
3. It should be possible to change the location of data items transparently.
4. Each site should be able to create new data items autonomously.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.13
©Silberschatz, Korth and Sudarshan
Centralized Scheme - Name Server
Structure:
name server assigns all names
each site maintains a record of local data items
sites ask name server to locate non-local data items
Advantages:
satisfies naming criteria 1-3
Disadvantages:
does not satisfy naming criterion 4
name server is a potential performance bottleneck
name server is a single point of failure
Database System Concepts - 5th Edition, Aug 22, 2005.
22.14
©Silberschatz, Korth and Sudarshan
Use of Aliases
Alternative to centralized scheme: each site prefixes its own site identifier to any
name that it generates i.e., site 17.account.
Fulfills having a unique identifier, and avoids problems associated with
central control.
However, fails to achieve network transparency.
Solution: Create a set of aliases for data items; Store the mapping of aliases to
the real names at each site.
The user can be unaware of the physical location of a data item, and is
unaffected if the data item is moved from one site to another.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.15
©Silberschatz, Korth and Sudarshan
Distributed Transactions
Transaction may access data at several sites.
Each site has a local transaction manager responsible for:
Maintaining a log for recovery purposes
Participating in coordinating the concurrent execution of the transactions
executing at that site.
Each site has a transaction coordinator, which is responsible for:
Starting the execution of transactions that originate at the site.
Distributing subtransactions at appropriate sites for execution.
Coordinating the termination of each transaction that originates at the site,
which may result in the transaction being committed at all sites or aborted at all
sites.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.16
©Silberschatz, Korth and Sudarshan
Transaction System Architecture
Database System Concepts - 5th Edition, Aug 22, 2005.
22.17
©Silberschatz, Korth and Sudarshan
System Failure Modes
Failures unique to distributed systems:
Failure of a site.
Loss of massages
Failure of a communication link
Handled by network transmission control protocols such as TCP-IP
Handled by network protocols, by routing messages via alternative links
Network partition
A network is said to be partitioned when it has been split into two or more
subsystems that lack any connection between them
– Note: a subsystem may consist of a single node
Network partitioning and site failures are generally indistinguishable.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.18
©Silberschatz, Korth and Sudarshan
Commit Protocols
Commit protocols are used to ensure atomicity across sites
a transaction which executes at multiple sites must either be committed at all the
sites, or aborted at all the sites.
not acceptable to have a transaction committed at one site and aborted at
another
The two-phase commit (2PC) protocol is widely used
The three-phase commit (3PC) protocol is more complicated and more
expensive, but avoids some drawbacks of two-phase commit protocol. This
protocol is not used in practice.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.19
©Silberschatz, Korth and Sudarshan
Two Phase Commit Protocol (2PC)
Assumes fail-stop model – failed sites simply stop working, and do not cause
any other harm, such as sending incorrect messages to other sites.
Execution of the protocol is initiated by the coordinator after the last step of the
transaction has been reached.
The protocol involves all the local sites at which the transaction executed
Let T be a transaction initiated at site Si, and let the transaction coordinator at Si be
Ci
Database System Concepts - 5th Edition, Aug 22, 2005.
22.20
©Silberschatz, Korth and Sudarshan
Phase 1: Obtaining a Decision
Coordinator asks all participants to prepare to commit transaction Ti.
Ci adds the records <prepare T> to the log and forces log to stable storage
sends prepare T messages to all sites at which T executed
Upon receiving message, transaction manager at site determines if it can commit
the transaction
if not, add a record <no T> to the log and send abort T message to Ci
if the transaction can be committed, then:
add the record <ready
force
T> to the log
all records for T to stable storage
send ready
T message to Ci
Database System Concepts - 5th Edition, Aug 22, 2005.
22.21
©Silberschatz, Korth and Sudarshan
Phase 2: Recording the Decision
T can be committed of Ci received a ready T message from all the participating
sites: otherwise T must be aborted.
Coordinator adds a decision record, <commit T> or <abort T>, to the log and
forces record onto stable storage. Once the record stable storage it is
irrevocable (even if failures occur)
Coordinator sends a message to each participant informing it of the decision
(commit or abort)
Participants take appropriate action locally.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.22
©Silberschatz, Korth and Sudarshan
Handling of Failures - Site Failure
When site Si recovers, it examines its log to determine the fate of
transactions active at the time of the failure.
Log contain <commit T> record: site executes redo (T)
Log contains <abort T> record: site executes undo (T)
Log contains <ready T> record: site must consult Ci to determine the fate of T.
If T committed, redo (T)
If T aborted, undo (T)
The log contains no control records concerning T replies that Sk failed before
responding to the prepare T message from Ci
since the failure of Sk precludes the sending of such a
response C1 must abort T
Sk must execute undo (T)
Database System Concepts - 5th Edition, Aug 22, 2005.
22.23
©Silberschatz, Korth and Sudarshan
Handling of Failures- Coordinator Failure
If coordinator fails while the commit protocol for T is executing then participating
sites must decide on T’s fate:
1.
If an active site contains a <commit T> record in its log, then T must be
committed.
2.
If an active site contains an <abort T> record in its log, then T must be
aborted.
3.
If some active participating site does not contain a <ready T> record in its log,
then the failed coordinator Ci cannot have decided to commit T. Can therefore
abort T.
4.
If none of the above cases holds, then all active sites must have a <ready T>
record in their logs, but no additional control records (such as <abort T> of
<commit T>). In this case active sites must wait for Ci to recover, to find
decision.
Blocking problem : active sites may have to wait for failed coordinator to recover.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.24
©Silberschatz, Korth and Sudarshan
Handling of Failures - Network Partition
If the coordinator and all its participants remain in one partition, the failure has no
effect on the commit protocol.
If the coordinator and its participants belong to several partitions:
Sites that are not in the partition containing the coordinator think the coordinator
has failed, and execute the protocol to deal with failure of the coordinator.
No harm results, but sites may still have to wait for decision from
coordinator.
The coordinator and the sites are in the same partition as the coordinator think that
the sites in the other partition have failed, and follow the usual commit protocol.
Again, no harm results
Database System Concepts - 5th Edition, Aug 22, 2005.
22.25
©Silberschatz, Korth and Sudarshan
Recovery and Concurrency Control
In-doubt transactions have a <ready T>, but neither a
<commit T>, nor an <abort T> log record.
The recovering site must determine the commit-abort status of such transactions
by contacting other sites; this can slow and potentially block recovery.
Recovery algorithms can note lock information in the log.
Instead of <ready T>, write out <ready T, L> L = list of locks held by T
when the log is written (read locks can be omitted).
For every in-doubt transaction T, all the locks noted in the
<ready T, L> log record are reacquired.
After lock reacquisition, transaction processing can resume; the commit or
rollback of in-doubt transactions is performed concurrently with the execution of
new transactions.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.26
©Silberschatz, Korth and Sudarshan
Alternative Models of Transaction Processing
Notion of a single transaction spanning multiple sites is inappropriate for many
applications
E.g. transaction crossing an organizational boundary
No organization would like to permit an externally initiated transaction to block
local transactions for an indeterminate period
Alternative models carry out transactions by sending messages
Code to handle messages must be carefully designed to ensure atomicity
and durability properties for updates
Isolation cannot be guaranteed, in that intermediate stages are visible, but
code must ensure no inconsistent states result due to concurrency
Persistent messaging systems are systems that provide transactional
properties to messages
Messages are guaranteed to be delivered exactly once
Will discuss implementation techniques later
Database System Concepts - 5th Edition, Aug 22, 2005.
22.27
©Silberschatz, Korth and Sudarshan
Alternative Models (Cont.)
Motivating example: funds transfer between two banks
Two phase commit would have the potential to block updates on the accounts
involved in funds transfer
Alternative solution:
Debit money from source account and send a message to other site
Site receives message and credits destination account
Messaging has long been used for distributed transactions (even before
computers were invented!)
Atomicity issue
once transaction sending a message is committed, message must guaranteed to
be delivered
Guarantee as long as destination site is up and reachable, code to handle
undeliverable messages must also be available
– e.g. credit money back to source account.
If sending transaction aborts, message must not be sent
Database System Concepts - 5th Edition, Aug 22, 2005.
22.28
©Silberschatz, Korth and Sudarshan
Error Conditions with Persistent Messaging
Code to handle messages has to take care of variety of failure situations (even
assuming guaranteed message delivery)
E.g. if destination account does not exist, failure message must be sent back to
source site
When failure message is received from destination site, or destination site itself
does not exist, money must be deposited back in source account
Problem if source account has been closed
– get humans to take care of problem
User code executing transaction processing using 2PC does not have to deal with
such failures
There are many situations where extra effort of error handling is worth the
benefit of absence of blocking
E.g. pretty much all transactions across organizations
Database System Concepts - 5th Edition, Aug 22, 2005.
22.29
©Silberschatz, Korth and Sudarshan
Persistent Messaging and Workflows
Workflows provide a general model of transactional processing involving multiple
sites and possibly human processing of certain steps
E.g. when a bank receives a loan application, it may need to
Contact external credit-checking agencies
Get approvals of one or more managers
and then respond to the loan application
We study workflows in Chapter 25
Persistent messaging forms the underlying infrastructure for workflows in
a distributed environment
Database System Concepts - 5th Edition, Aug 22, 2005.
22.30
©Silberschatz, Korth and Sudarshan
Concurrency Control
Modify concurrency control schemes for use in distributed environment.
We assume that each site participates in the execution of a commit protocol to ensure
global transaction automicity.
We assume all replicas of any item are updated
Will see how to relax this in case of site failures later
Database System Concepts - 5th Edition, Aug 22, 2005.
22.31
©Silberschatz, Korth and Sudarshan
Single-Lock-Manager Approach
System maintains a single lock manager that resides in a single chosen site, say
Si
When a transaction needs to lock a data item, it sends a lock request to S i and lock
manager determines whether the lock can be granted immediately
If yes, lock manager sends a message to the site which initiated the request
If no, request is delayed until it can be granted, at which time a message is
sent to the initiating site
Database System Concepts - 5th Edition, Aug 22, 2005.
22.32
©Silberschatz, Korth and Sudarshan
Single-Lock-Manager Approach (Cont.)
The transaction can read the data item from any one of the sites at which a
replica of the data item resides.
Writes must be performed on all replicas of a data item
Advantages of scheme:
Simple implementation
Simple deadlock handling
Disadvantages of scheme are:
Bottleneck: lock manager site becomes a bottleneck
Vulnerability: system is vulnerable to lock manager site failure.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.33
©Silberschatz, Korth and Sudarshan
Distributed Lock Manager
In this approach, functionality of locking is implemented by lock managers at each
site
Lock managers control access to local data items
But special protocols may be used for replicas
Advantage: work is distributed and can be made robust to failures
Disadvantage: deadlock detection is more complicated
Lock managers cooperate for deadlock detection
More on this later
Several variants of this approach
Primary copy
Majority protocol
Biased protocol
Quorum consensus
Database System Concepts - 5th Edition, Aug 22, 2005.
22.34
©Silberschatz, Korth and Sudarshan
Primary Copy
Choose one replica of data item to be the primary copy.
Site containing the replica is called the primary site for that data item
Different data items can have different primary sites
When a transaction needs to lock a data item Q, it requests a lock at the primary
site of Q.
Benefit
Implicitly gets lock on all replicas of the data item
Concurrency control for replicated data handled similarly to unreplicated data
- simple implementation.
Drawback
If the primary site of Q fails, Q is inaccessible even though other sites
containing a replica may be accessible.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.35
©Silberschatz, Korth and Sudarshan
Majority Protocol
Local lock manager at each site administers lock and unlock requests for data
items stored at that site.
When a transaction wishes to lock an unreplicated data item Q residing at site Si, a
message is sent to Si ‘s lock manager.
If Q is locked in an incompatible mode, then the request is delayed until it can
be granted.
When the lock request can be granted, the lock manager sends a message
back to the initiator indicating that the lock request has been granted.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.36
©Silberschatz, Korth and Sudarshan
Majority Protocol (Cont.)
In case of replicated data
If Q is replicated at n sites, then a lock request message must be sent to
more than half of the n sites in which Q is stored.
The transaction does not operate on Q until it has obtained a lock on a
majority of the replicas of Q.
When writing the data item, transaction performs writes on all replicas.
Benefit
Can be used even when some sites are unavailable
details on how handle writes in the presence of site failure later
Drawback
Requires 2(n/2 + 1) messages for handling lock requests, and ( n/2 + 1)
messages for handling unlock requests.
Potential for deadlock even with single item - e.g., each of 3 transactions
may have locks on 1/3rd of the replicas of a data.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.37
©Silberschatz, Korth and Sudarshan
Biased Protocol
Local lock manager at each site as in majority protocol, however, requests for
shared locks are handled differently than requests for exclusive locks.
Shared locks. When a transaction needs to lock data item Q, it simply requests a
lock on Q from the lock manager at one site containing a replica of Q.
Exclusive locks. When transaction needs to lock data item Q, it requests a lock on
Q from the lock manager at all sites containing a replica of Q.
Advantage - imposes less overhead on read operations.
Disadvantage - additional overhead on writes
Database System Concepts - 5th Edition, Aug 22, 2005.
22.38
©Silberschatz, Korth and Sudarshan
Quorum Consensus Protocol
A generalization of both majority and biased protocols
Each site is assigned a weight.
Let S be the total of all site weights
Choose two values read quorum Qr and write quorum Qw
Such that
Q r + Qw > S
and
2 * Qw > S
Quorums can be chosen (and S computed) separately for each item
Each read must lock enough replicas that the sum of the site weights is >= Q r
Each write must lock enough replicas that the sum of the site weights is >= Q w
For now we assume all replicas are written
Extensions to allow some sites to be unavailable described later
Database System Concepts - 5th Edition, Aug 22, 2005.
22.39
©Silberschatz, Korth and Sudarshan
Timestamping
Timestamp based concurrency-control protocols can be used in distributed
systems
Each transaction must be given a unique timestamp
Main problem: how to generate a timestamp in a distributed fashion
Each site generates a unique local timestamp using either a logical counter or
the local clock.
Global unique timestamp is obtained by concatenating the unique local timestamp
with the unique identifier.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.40
©Silberschatz, Korth and Sudarshan
Timestamping (Cont.)
A site with a slow clock will assign smaller timestamps
Still logically correct: serializability not affected
But: “disadvantages” transactions
To fix this problem
Define within each site Si a logical clock (LCi), which generates the unique
local timestamp
Require that Si advance its logical clock whenever a request is received
from a transaction Ti with timestamp < x,y> and x is greater that the current
value of LCi.
In this case, site Si advances its logical clock to the value x + 1.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.41
©Silberschatz, Korth and Sudarshan
Replication with Weak Consistency
Many commercial databases support replication of data with weak degrees of
consistency (I.e., without a guarantee of serializabiliy)
E.g.: master-slave replication: updates are performed at a single “master” site,
and propagated to “slave” sites.
Propagation is not part of the update transaction: its is decoupled
May be immediately after transaction commits
May be periodic
Data may only be read at slave sites, not updated
Particularly useful for distributing information
No need to obtain locks at any remote site
E.g. from central office to branch-office
Also useful for running read-only queries offline from the main database
Database System Concepts - 5th Edition, Aug 22, 2005.
22.42
©Silberschatz, Korth and Sudarshan
Replication with Weak Consistency (Cont.)
Replicas should see a transaction-consistent snapshot of the database
That is, a state of the database reflecting all effects of all transactions up to
some point in the serialization order, and no effects of any later transactions.
E.g. Oracle provides a create snapshot statement to create a snapshot
of a relation or a set of relations at a remote site
snapshot refresh either by recomputation or by incremental update
Automatic refresh (continuous or periodic) or manual refresh
Database System Concepts - 5th Edition, Aug 22, 2005.
22.43
©Silberschatz, Korth and Sudarshan
Multimaster and Lazy Replication
With multimaster replication (also called update-anywhere replication) updates are
permitted at any replica, and are automatically propagated to all replicas
Basic model in distributed databases, where transactions are unaware of
the details of replication, and database system propagates updates as part of
the same transaction
Coupled with 2 phase commit
Many systems support lazy propagation where updates are transmitted after
transaction commits
Allows updates to occur even if some sites are disconnected from the
network, but at the cost of consistency
Database System Concepts - 5th Edition, Aug 22, 2005.
22.44
©Silberschatz, Korth and Sudarshan
Deadlock Handling
Consider the following two transactions and history, with item X and transaction T1 at site
1, and item Y and transaction T2 at site 2:
T1:
T2:
write (X)
write (Y)
X-lock on X
write (X)
write (Y)
write (X)
X-lock on Y
write (Y)
wait for X-lock on X
Wait for X-lock on Y
Result: deadlock which cannot be detected locally at either site
Database System Concepts - 5th Edition, Aug 22, 2005.
22.45
©Silberschatz, Korth and Sudarshan
Centralized Approach
A global wait-for graph is constructed and maintained in a single site; the
deadlock-detection coordinator
Real graph: Real, but unknown, state of the system.
Constructed graph:Approximation generated by the controller during the
execution of its algorithm .
the global wait-for graph can be constructed when:
a new edge is inserted in or removed from one of the local wait-for
graphs.
a number of changes have occurred in a local wait-for graph.
the coordinator needs to invoke cycle-detection.
If the coordinator finds a cycle, it selects a victim and notifies all sites. The sites
roll back the victim transaction.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.46
©Silberschatz, Korth and Sudarshan
Local and Global Wait-For Graphs
Local
Global
Database System Concepts - 5th Edition, Aug 22, 2005.
22.47
©Silberschatz, Korth and Sudarshan
Example Wait-For Graph for False Cycles
Initial state:
Database System Concepts - 5th Edition, Aug 22, 2005.
22.48
©Silberschatz, Korth and Sudarshan
False Cycles (Cont.)
Suppose that starting from the state shown in figure,
1. T2 releases resources at S1
resulting in a message remove T1 T2 message from the Transaction
Manager at site S1 to the coordinator)
2. And then T2 requests a resource held by T3 at site S2
Suppose further that the insert message reaches before the delete message
resulting in a message insert T2 T3 from S2 to the coordinator
this can happen due to network delays
The coordinator would then find a false cycle
T1 T2 T3 T1
The false cycle above never existed in reality.
False cycles cannot occur if two-phase locking is used.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.49
©Silberschatz, Korth and Sudarshan
Unnecessary Rollbacks
Unnecessary rollbacks may result when deadlock has indeed occurred and a
victim has been picked, and meanwhile one of the transactions was aborted for
reasons unrelated to the deadlock.
Unnecessary rollbacks can result from false cycles in the global wait-for graph;
however, likelihood of false cycles is low.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.50
©Silberschatz, Korth and Sudarshan
Availability
High availability: time for which system is not fully usable should be extremely
low (e.g. 99.99% availability)
Robustness: ability of system to function spite of failures of components
Failures are more likely in large distributed systems
To be robust, a distributed system must
Detect failures
Reconfigure the system so computation may continue
Recovery/reintegration when a site or link is repaired
Failure detection: distinguishing link failure from site failure is hard
(partial) solution: have multiple links, multiple link failure is likely a site failure
Database System Concepts - 5th Edition, Aug 22, 2005.
22.51
©Silberschatz, Korth and Sudarshan
Reconfiguration
Reconfiguration:
Abort all transactions that were active at a failed site
Making them wait could interfere with other transactions since they may
hold locks on other sites
However, in case only some replicas of a data item failed, it may be
possible to continue transactions that had accessed data at a failed site
(more on this later)
If replicated data items were at failed site, update system catalog to remove
them from the list of replicas.
This should be reversed when failed site recovers, but additional care
needs to be taken to bring values up to date
If a failed site was a central server for some subsystem, an election must
be held to determine the new server
E.g. name server, concurrency coordinator, global deadlock detector
Database System Concepts - 5th Edition, Aug 22, 2005.
22.52
©Silberschatz, Korth and Sudarshan
Reconfiguration (Cont.)
Since network partition may not be distinguishable from site failure, the following
situations must be avoided
Two ore more central servers elected in distinct partitions
More than one partition updates a replicated data item
Updates must be able to continue even if some sites are down
Solution: majority based approach
Alternative of “read one write all available” is tantalizing but causes problems
Database System Concepts - 5th Edition, Aug 22, 2005.
22.53
©Silberschatz, Korth and Sudarshan
Majority-Based Approach
The majority protocol for distributed concurrency control can be modified to
work even if some sites are unavailable
Each replica of each item has a version number which is updated when the
replica is updated, as outlined below
A lock request is sent to at least ½ the sites at which item replicas are stored
and operation continues only when a lock is obtained on a majority of the sites
Read operations look at all replicas locked, and read the value from the
replica with largest version number
May write this value and version number back to replicas with lower
version numbers (no need to obtain locks on all replicas for this task)
Database System Concepts - 5th Edition, Aug 22, 2005.
22.54
©Silberschatz, Korth and Sudarshan
Majority-Based Approach
Majority protocol (Cont.)
Write operations
find highest version number like reads, and set new version number to old
highest version + 1
Writes are then performed on all locked replicas and version number on
these replicas is set to new version number
Failures (network and site) cause no problems as long as
Sites at commit contain a majority of replicas of any updated data items
During reads a majority of replicas are available to find version numbers
Subject to above, 2 phase commit can be used to update replicas
Note: reads are guaranteed to see latest version of data item
Reintegration is trivial: nothing needs to be done
Quorum consensus algorithm can be similarly extended
Database System Concepts - 5th Edition, Aug 22, 2005.
22.55
©Silberschatz, Korth and Sudarshan
Read One Write All (Available)
Biased protocol is a special case of quorum consensus
Allows reads to read any one replica but updates require all replicas to be
available at commit time (called read one write all)
Read one write all available (ignoring failed sites) is attractive, but incorrect
If failed link may come back up, without a disconnected site ever being
aware that it was disconnected
The site then has old values, and a read from that site would return an
incorrect value
If site was aware of failure reintegration could have been performed, but
no way to guarantee this
With network partitioning, sites in each partition may update same item
concurrently
believing sites in other partitions have all failed
Database System Concepts - 5th Edition, Aug 22, 2005.
22.56
©Silberschatz, Korth and Sudarshan
Site Reintegration
When failed site recovers, it must catch up with all updates that it missed while it
was down
Problem: updates may be happening to items whose replica is stored at the
site while the site is recovering
Solution 1: halt all updates on system while reintegrating a site
Unacceptable disruption
Solution 2: lock all replicas of all data items at the site, update to latest version,
then release locks
Other solutions with better concurrency also available
Database System Concepts - 5th Edition, Aug 22, 2005.
22.57
©Silberschatz, Korth and Sudarshan
Comparison with Remote Backup
Remote backup (hot spare) systems (Section 17.10) are also designed to
provide high availability
Remote backup systems are simpler and have lower overhead
All actions performed at a single site, and only log records shipped
No need for distributed concurrency control, or 2 phase commit
Using distributed databases with replicas of data items can provide higher
availability by having multiple (> 2) replicas and using the majority protocol
Also avoid failure detection and switchover time associated with remote
backup systems
Database System Concepts - 5th Edition, Aug 22, 2005.
22.58
©Silberschatz, Korth and Sudarshan
Coordinator Selection
Backup coordinators
site which maintains enough information locally to assume the role of
coordinator if the actual coordinator fails
executes the same algorithms and maintains the same internal state
information as the actual coordinator fails executes state information as the
actual coordinator
allows fast recovery from coordinator failure but involves overhead during
normal processing.
Election algorithms
used to elect a new coordinator in case of failures
Example: Bully Algorithm - applicable to systems where every site can
send a message to every other site.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.59
©Silberschatz, Korth and Sudarshan
Bully Algorithm
If site Si sends a request that is not answered by the coordinator within a time
interval T, assume that the coordinator has failed Si tries to elect itself as the new
coordinator.
Si sends an election message to every site with a higher identification number, S i
then waits for any of these processes to answer within T.
If no response within T, assume that all sites with number greater than i have
failed, Si elects itself the new coordinator.
If answer is received Si begins time interval T’, waiting to receive a message
that a site with a higher identification number has been elected.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.60
©Silberschatz, Korth and Sudarshan
Bully Algorithm (Cont.)
If no message is sent within T’, assume the site with a higher number has
failed; Si restarts the algorithm.
After a failed site recovers, it immediately begins execution of the same
algorithm.
If there are no active sites with higher numbers, the recovered site forces all
processes with lower numbers to let it become the coordinator site, even if there
is a currently active coordinator with a lower number.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.61
©Silberschatz, Korth and Sudarshan
Distributed Query Processing
For centralized systems, the primary criterion for measuring the cost of a
particular strategy is the number of disk accesses.
In a distributed system, other issues must be taken into account:
The cost of a data transmission over the network.
The potential gain in performance from having several sites process parts
of the query in parallel.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.62
©Silberschatz, Korth and Sudarshan
Query Transformation
Translating algebraic queries on fragments.
It must be possible to construct relation r from its fragments
Replace relation r by the expression to construct relation r from its fragments
Consider the horizontal fragmentation of the account relation into
account1 = branch_name = “Hillside” (account )
account2 = branch_name = “Valleyview” (account )
The query branch_name = “Hillside” (account ) becomes
branch_name = “Hillside” (account1 account2)
which is optimized into
branch_name = “Hillside” (account1) branch_name = “Hillside” (account2)
Database System Concepts - 5th Edition, Aug 22, 2005.
22.63
©Silberschatz, Korth and Sudarshan
Example Query (Cont.)
Since account1 has only tuples pertaining to the Hillside branch, we can eliminate the
selection operation.
Apply the definition of account2 to obtain
branch_name = “Hillside” ( branch_name = “Valleyview” (account )
This expression is the empty set regardless of the contents of the account relation.
Final strategy is for the Hillside site to return account1 as the result of the query.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.64
©Silberschatz, Korth and Sudarshan
Simple Join Processing
Consider the following relational algebra expression in which the three relations are
neither replicated nor fragmented
account
depositor branch
account is stored at site S1
depositor at S2
branch at S3
For a query issued at site SI, the system needs to produce the result at site SI
Database System Concepts - 5th Edition, Aug 22, 2005.
22.65
©Silberschatz, Korth and Sudarshan
Possible Query Processing Strategies
Ship copies of all three relations to site SI and choose a strategy for processing
the entire locally at site SI.
Ship a copy of the account relation to site S2 and compute temp1 = account
depositor at S2. Ship temp1 from S2 to S3, and compute temp2 =
temp1 branch at S3. Ship the result temp2 to SI.
Devise similar strategies, exchanging the roles S1, S2, S3
Must consider following factors:
amount of data being shipped
cost of transmitting a data block between sites
relative processing speed at each site
Database System Concepts - 5th Edition, Aug 22, 2005.
22.66
©Silberschatz, Korth and Sudarshan
Semijoin Strategy
Let r1 be a relation with schema R1 stores at site S1
Let r2 be a relation with schema R2 stores at site S2
Evaluate the expression r1
r2 and obtain the result at S1.
1. Compute temp1 R1 R2 (r1) at S1.
2. Ship temp1 from S1 to S2.
3. Compute temp2 r2
4. Ship temp2 from S2 to S1.
5. Compute r1
temp1 at S2
temp2 at S1. This is the same as r1
Database System Concepts - 5th Edition, Aug 22, 2005.
22.67
r2.
©Silberschatz, Korth and Sudarshan
Formal Definition
The semijoin of r1 with r2, is denoted by:
r1
r2
it is defined by:
R1 (r1
r2)
Thus, r1
r2 selects those tuples of r1 that contributed to r1
In step 3 above, temp2=r2
For joins of several relations, the above strategy can be extended to a series of
semijoin steps.
Database System Concepts - 5th Edition, Aug 22, 2005.
r2.
r1.
22.68
©Silberschatz, Korth and Sudarshan
Join Strategies that Exploit Parallelism
Consider r1
r2
r3
r4 where relation ri is stored at site Si. The result must
be presented at site S1.
r1 is shipped to S2 and r1
S4 and r3
r2 is computed at S2: simultaneously r3 is shipped to
r4 is computed at S4
S2 ships tuples of (r1
S4 ships tuples of (r3
Once tuples of (r1
r2) to S1 as they produced;
r4) to S1
r2) and (r3
r4) arrive at S1 (r1
computed in parallel with the computation of (r1
(r3
r2)
(r3
r4) is
r2) at S2 and the computation of
r4) at S4.
Database System Concepts - 5th Edition, Aug 22, 2005.
22.69
©Silberschatz, Korth and Sudarshan
Heterogeneous Distributed Databases
Many database applications require data from a variety of preexisting databases
located in a heterogeneous collection of hardware and software platforms
Data models may differ (hierarchical, relational , etc.)
Transaction commit protocols may be incompatible
Concurrency control may be based on different techniques (locking,
timestamping, etc.)
System-level details almost certainly are totally incompatible.
A multidatabase system is a software layer on top of existing database systems,
which is designed to manipulate information in heterogeneous databases
Creates an illusion of logical database integration without any physical database
integration
Database System Concepts - 5th Edition, Aug 22, 2005.
22.70
©Silberschatz, Korth and Sudarshan
Advantages
Preservation of investment in existing
hardware
system software
Applications
Local autonomy and administrative control
Allows use of special-purpose DBMSs
Step towards a unified homogeneous DBMS
Full integration into a homogeneous DBMS faces
Technical difficulties and cost of conversion
Organizational/political difficulties
– Organizations do not want to give up control on their data
– Local databases wish to retain a great deal of autonomy
Database System Concepts - 5th Edition, Aug 22, 2005.
22.71
©Silberschatz, Korth and Sudarshan
Unified View of Data
Agreement on a common data model
Typically the relational model
Agreement on a common conceptual schema
Different names for same relation/attribute
Same relation/attribute name means different things
Agreement on a single representation of shared data
E.g. data types, precision,
Character sets
ASCII vs EBCDIC
Sort order variations
Agreement on units of measure
Variations in names
E.g. Köln vs Cologne, Mumbai vs Bombay
Database System Concepts - 5th Edition, Aug 22, 2005.
22.72
©Silberschatz, Korth and Sudarshan
Query Processing
Several issues in query processing in a heterogeneous database
Schema translation
Write a wrapper for each data source to translate data to a global schema
Wrappers must also translate updates on global schema to updates on local schema
Limited query capabilities
Some data sources allow only restricted forms of selections
Queries have to be broken up and processed partly at the source and partly at a
different site
Removal of duplicate information when sites have overlapping information
E.g. web forms, flat file data sources
Decide which sites to execute query
Global query optimization
Database System Concepts - 5th Edition, Aug 22, 2005.
22.73
©Silberschatz, Korth and Sudarshan
Mediator Systems
Mediator systems are systems that integrate multiple heterogeneous data sources
by providing an integrated global view, and providing query facilities on global view
Unlike full fledged multidatabase systems, mediators generally do not bother
about transaction processing
But the terms mediator and multidatabase are sometimes used
interchangeably
The term virtual database is also used to refer to mediator/multidatabase
systems
Database System Concepts - 5th Edition, Aug 22, 2005.
22.74
©Silberschatz, Korth and Sudarshan
Directory Systems
Typical kinds of directory information
Employee information such as name, id, email, phone, office addr, ..
Even personal information to be accessed from multiple places
White pages
Entries organized by name or identifier
e.g. Web browser bookmarks
Meant for forward lookup to find more about an entry
Yellow pages
Entries organized by properties
For reverse lookup to find entries matching specific requirements
When directories are to be accessed across an organization
Alternative 1: Web interface. Not great for programs
Alternative 2: Specialized directory access protocols
Coupled with specialized user interfaces
Database System Concepts - 5th Edition, Aug 22, 2005.
22.75
©Silberschatz, Korth and Sudarshan
Directory Access Protocols
Most commonly used directory access protocol:
LDAP (Lightweight Directory Access Protocol)
Simplified from earlier X.500 protocol
Question: Why not use database protocols like ODBC/JDBC?
Answer:
Simplified protocols for a limited type of data access, evolved parallel to
ODBC/JDBC
Provide a nice hierarchical naming mechanism similar to file system
directories
Data can be partitioned amongst multiple servers for different parts of
the hierarchy, yet give a single view to user
– E.g. different servers for Bell Labs Murray Hill and Bell Labs
Bangalore
Directories may use databases as storage mechanism
Database System Concepts - 5th Edition, Aug 22, 2005.
22.76
©Silberschatz, Korth and Sudarshan
LDAP: Lightweight Directory Access Protocol
LDAP Data Model
Data Manipulation
Distributed Directory Trees
Database System Concepts - 5th Edition, Aug 22, 2005.
22.77
©Silberschatz, Korth and Sudarshan
LDAP Data Model
LDAP directories store entries
Entries are similar to objects
Each entry must have unique distinguished name (DN)
DN made up of a sequence of relative distinguished names (RDNs)
E.g. of a DN
cn=Silberschatz, ou-Bell Labs, o=Lucent, c=USA
Standard RDNs (can be specified as part of schema)
cn: common name ou: organizational unit
o: organization
c: country
Similar to paths in a file system but written in reverse direction
Database System Concepts - 5th Edition, Aug 22, 2005.
22.78
©Silberschatz, Korth and Sudarshan
LDAP Data Model (Cont.)
Entries can have attributes
Attributes are multi-valued by default
LDAP has several built-in types
Binary, string, time types
Tel: telephone number
PostalAddress: postal address
LDAP allows definition of object classes
Object classes specify attribute names and types
Can use inheritance to define object classes
Entry can be specified to be of one or more object classes
No need to have single most-specific type
Database System Concepts - 5th Edition, Aug 22, 2005.
22.79
©Silberschatz, Korth and Sudarshan
LDAP Data Model (cont.)
Entries organized into a directory information tree according to their DNs
Leaf level usually represent specific objects
Internal node entries represent objects such as organizational units,
organizations or countries
Children of a node inherit the DN of the parent, and add on RDNs
E.g. internal node with DN c=USA
– Children nodes have DN starting with c=USA and further RDNs
such as o or ou
DN of an entry can be generated by traversing path from root
Leaf level can be an alias pointing to another entry
Entries can thus have more than one DN
– E.g. person in more than one organizational unit
Database System Concepts - 5th Edition, Aug 22, 2005.
22.80
©Silberschatz, Korth and Sudarshan
LDAP Data Manipulation
Unlike SQL, LDAP does not define DDL or DML
Instead, it defines a network protocol for DDL and DML
Users use an API or vendor specific front ends
LDAP also defines a file format
LDAP Data Interchange Format (LDIF)
Querying mechanism is very simple: only selection & projection
Database System Concepts - 5th Edition, Aug 22, 2005.
22.81
©Silberschatz, Korth and Sudarshan
LDAP Queries
LDAP query must specify
Base: a node in the DIT from where search is to start
A search condition
Boolean combination of conditions on attributes of entries
– Equality, wild-cards and approximate equality supported
A scope
Just the base, the base and its children, or the entire subtree from the
base
Attributes to be returned
Limits on number of results and on resource consumption
May also specify whether to automatically dereference aliases
LDAP URLs are one way of specifying query
LDAP API is another alternative
Database System Concepts - 5th Edition, Aug 22, 2005.
22.82
©Silberschatz, Korth and Sudarshan
LDAP URLs
First part of URL specifis server and DN of base
ldap:://aura.research.bell-labs.com/o=Lucent,c=USA
Optional further parts separated by ? symbol
ldap:://aura.research.bell-labs.com/o=Lucent,c=USA??sub?cn=Korth
Optional parts specify
1.
attributes to return (empty means all)
2.
Scope (sub indicates entire subtree)
3.
Search condition (cn=Korth)
Database System Concepts - 5th Edition, Aug 22, 2005.
22.83
©Silberschatz, Korth and Sudarshan
C Code using LDAP API
#include <stdio.h>
#include <ldap.h>
main( ) {
LDAP *ld;
LDAPMessage *res, *entry;
char *dn, *attr, *attrList [ ] = {“telephoneNumber”, NULL};
BerElement *ptr;
int vals, i;
// Open a connection to server
ld = ldap_open(“aura.research.bell-labs.com”,
LDAP_PORT);
ldap_simple_bind(ld, “avi”, “avi-passwd”);
… actual query (next slide) …
ldap_unbind(ld);
}
Database System Concepts - 5th Edition, Aug 22, 2005.
22.84
©Silberschatz, Korth and Sudarshan
C Code using LDAP API (Cont.)
ldap_search_s(ld, “o=Lucent, c=USA”, LDAP_SCOPE_SUBTREE,
“cn=Korth”, attrList, /* attrsonly*/ 0, &res);
/*attrsonly = 1 => return only schema not actual results*/
printf(“found%d entries”, ldap_count_entries(ld, res));
for (entry=ldap_first_entry(ld, res); entry != NULL;
entry=ldap_next_entry(id, entry)) {
dn = ldap_get_dn(ld, entry);
printf(“dn: %s”, dn); /* dn: DN of matching entry */
ldap_memfree(dn);
for(attr = ldap_first_attribute(ld, entry, &ptr); attr != NULL;
attr = ldap_next_attribute(ld, entry, ptr))
{
// for each attribute
printf(“%s:”, attr);
// print name of attribute
vals = ldap_get_values(ld, entry, attr);
for (i = 0; vals[i] != NULL; i ++)
printf(“%s”, vals[i]); // since attrs can be multivalued
ldap_value_free(vals);
}
}
ldap_msgfree(res);
Database System Concepts - 5th Edition, Aug 22, 2005.
22.85
©Silberschatz, Korth and Sudarshan
LDAP API (Cont.)
LDAP API also has functions to create, update and delete entries
Each function call behaves as a separate transaction
LDAP does not support atomicity of updates
Database System Concepts - 5th Edition, Aug 22, 2005.
22.86
©Silberschatz, Korth and Sudarshan
Distributed Directory Trees
Organizational information may be split into multiple directory information trees
Suffix of a DIT gives RDN to be tagged onto to all entries to get an overall DN
E.g. two DITs, one with suffix o=Lucent, c=USA
and another with suffix
o=Lucent, c=India
Organizations often split up DITs based on geographical location or by organizational
structure
Many LDAP implementations support replication (master-slave or multi-master
replication) of DITs (not part of LDAP 3 standard)
A node in a DIT may be a referral to a node in another DIT
E.g. Ou= Bell Labs may have a separate DIT, and DIT for o=Lucent may have a
leaf with ou=Bell Labs containing a referral to the Bell Labs DIT
Referalls are the key to integrating a distributed collection of directories
When a server gets a query reaching a referral node, it may either
Forward query to referred DIT and return answer to client, or
Give referral back to client, which transparently sends query to referred DIT
(without user intervention)
Database System Concepts - 5th Edition, Aug 22, 2005.
22.87
©Silberschatz, Korth and Sudarshan
End of Chapter
Database System Concepts, 5th Ed.
©Silberschatz, Korth and Sudarshan
See www.db-book.com for conditions on re-use
Three Phase Commit (3PC)
Assumptions:
No network partitioning
At any point, at least one site must be up.
At most K sites (participants as well as coordinator) can fail
Phase 1: Obtaining Preliminary Decision: Identical to 2PC Phase 1.
Phase 2 of 2PC is split into 2 phases, Phase 2 and Phase 3 of 3PC
In phase 2 coordinator makes a decision as in 2PC (called the pre-commit decision)
and records it in multiple (at least K) sites
In phase 3, coordinator sends commit/abort message to all participating sites,
Under 3PC, knowledge of pre-commit decision can be used to commit despite coordinator
failure
Every site is ready to commit if instructed to do so
Avoids blocking problem as long as < K sites fail
Drawbacks:
higher overheads
assumptions may not be satisfied in practice
Database System Concepts - 5th Edition, Aug 22, 2005.
22.89
©Silberschatz, Korth and Sudarshan
Figure 22.3
Database System Concepts - 5th Edition, Aug 22, 2005.
22.90
©Silberschatz, Korth and Sudarshan
Figure 22.4
Database System Concepts - 5th Edition, Aug 22, 2005.
22.91
©Silberschatz, Korth and Sudarshan
Figure 22.5
Database System Concepts - 5th Edition, Aug 22, 2005.
22.92
©Silberschatz, Korth and Sudarshan
Figure 22.7
Database System Concepts - 5th Edition, Aug 22, 2005.
22.93
©Silberschatz, Korth and Sudarshan