You are on page 1of 21

Scalable Consistency Protocol

CONTENTS

1. INTRODUCTION 2. DESIGN PRINCIPLES & EXPL N TION 2.1. !ODULE DESCRIPTIOIN ". PRO#ECT DICTION R$ ".1. D T %LO& DI GR !S ".2. USE C SE DI GR ! ".". CL SS DI GR ! '. %OR!S & REPORTS '.1. I(O S !PLES ). TESTING *. +I+ILIOGR P,$

1. INTRUDECTION EXISTING SYSTEM s co-./tin0 beco-es -ore .er1asi1e2 local area net3or4s are beco-in0 lar0er an5 better interconnecte5. &it6 t6is 0ro3t6 o7 interconnecte5 co-./tin02 6i06ly interacti1e a..lications 3ill s.an -any local net3or4s. E8a-.les o7 s/c6 a..lications co-e 7ro- t6e 5o-ain o7 co-./ter s/..orte5 coo.erati1e 3or4 as 3ell as 1irt/al reality base5 5istrib/te5 0a-es2 s6o..in0 an5 ot6ers. T6ese a..lications nee5 to be s/..orte5 by 5istrib/te5 ser1ices t6at .ro1i5e lo3 latency access to 5yna-ically c6an0in0 s6are5 state. T6e .roble- o7 scalable an5 consistent access is also i-.ortant 7or 5yna-ic content on t6e 3eb. +/t e8istin0 syste- 7ollo3s sync6roni9ation an5 Co--/nication in 5istrib/te5 en1iron-ent 36ic6 lea5s to increase latency ti-e. DRAWBACKS OF EXISTING SYSTEM In interacti1e a..lications ti-ely 5isse-ination o7 an /.5ate is re:/ire5. It is ob1io/s2 .rotocols t6at i-.le-ent stron0 consistency2 are -ore e8.ensi1e an5 5o not .er-it any ;la0< t6at -ay be acce.table in 5isse-inatin0 t6e e77ects o7 /.5ate o.erations. se:/ential consistency. &e no3 6a1e e8.lore5 a notion o7 stron0 consistency t6at 0/arantees seriali9ation o7 all ob=ect accesses as in ,o3e1er2 it allo3s client no5es control o1er 6o3 :/ic4ly t6ey 3ant to beco-e a3are o7 /.5ates to cac6e5 ob=ects. O/r belie7 is t6at s/c6 7le8ible control o1er /.5ate 5isse-ination is necessary 7or 5e1elo.in0 scalable .rotocols 7or stron0 consistency.

PROPOSED SYSTEM co--on 3ay to a55ress scalability re:/ire-ents o7 5istrib/te5 ser1ices in e8istin0 syste- is to e-.loy ser1er re.lication an5 client cac6in0 o7 ob=ects to -aintain t6at enca.s/late t6e ser1ice state. T6e .er7or-ance o7 s/c6 syste- co/l5 5e.en5 1ery -/c6 on t6e .rotocol i-.le-ente5 by t6e systet6at ne1er re:/ires sync6roni9ation an5 Co--/nication bet3een all no5es t6at 6a1e co.ies o7 relate5 ob=ects. &e ac6ie1e t6is by 5e1elo.in0 a no1el a..roac6 calle5 local consistency>LC?. T6e basic i5ea o7 LC -ec6anis- is as 7ollo3s. In tra5itional stron0 consistency .rotocols2 no5es t6at /.5ate a s6are5 ob=ect 8 ta4e t6e res.onsibility o7 noti7yin0 no5es t6at 6a1e co.ies o7 8 abo/t t6e /.5ates. &6en s/c6 no5es are 3i5ely 5istrib/te52 /.5ate latencies can be 1ery lar0e. In LC base5 .rotocols2 6o3e1er2 no5es t6at /.5ate s6are5 state are not res.onsible 7or in7or-in0 ot6er no5es abo/t /.5ates@ instea52 a no5e nee5s to beco-e a3are o7 an e8ternal /.5ate2 t6e no5e e8ec/tes consistency actions to in1ali5ate local ob=ect co.ies t6at -ay be o1er3ritten 3it6 res.ect to t6e ne3ly arri1e5 ob=ect. ccess latencies can be lo3er in LC base5 .rotocols beca/se t6ey allo3 bot6 rea5 an5 3rite accesses to co-.lete 3it6o/t re:/irin0 co--/nication 3it6 all no5es t6at 6a1e co.ies o7 t6e accesse5 ob=ect. No5es can 7etc6 co.ies o7 ob=ects eit6er on 5e-an5 or ne3 co.ies can be sent to no5es2 36ic6 can intro5/ce t6e- into t6eir cac6es in a consistent -anner. T6/s2 bot6 ./s6 an5 ./ll style /.5ate 5isse-ination is .ossible in LC base5 .rotocols. consistency a-on0 ob=ect co.ies. &e e8.lore scalable consistency .rotocols

2. DESIGN PRINCIPLES & EXPLANATION 2.1. MODULE DESCRIPTIOIN Local Con ! "#nc$ A%%&oac' In t6e syste- -o5el ass/-e5 6ere2 s6are5 ob=ects are store5 at ser1er no5es. Client no5es can cac6e ob=ect co.ies an5 access t6e- locally. Ob=ects can be relate5 an5 consistency re:/ire-ents can be 5e7ine5 across relate5 ob=ects. %or e8a-.le2 i7 8 an5 y are t3o relate5 5oc/-ent ob=ects >e.0.28 contains res/lts o7 an e8.eri-ent an5 y contains a 5isc/ssion o7 t6ese res/lts?2an5 a /ser 7irst /.5ates 8 an5 t6en y2 it is 5esirable t6at anot6er /ser t6at accesses t6e /.5ate5 co.y o7 y 3ill also see t6e ne3 co.y o7 8. since no5es 6a1e co.ies o7 s/c6 ob=ects2 t6ey are intereste5 in /.5ates to ob=ects accesse5 t6e-. 3e 5e7ine a syste- 0lobal 1ie3 an5 no5e 1ie3s to ca.t/re t6e 1al/es o7 ob=ects t6at can be accesse5 by no5es. LC Ba #( P&o"ocol) 1. In LC base5 .rotocols2 36en a ser1er trans7ers 3rite access to a ne3 no5e2 e8istin0 rea5ers are not sent in1ali5ation -essa0es. in 7act2 rea5ers o7 an ob=ect can coe8ist 3it6 a 3riter by rea5in0 1al/es 7ro- ol5 b/t consistent no5e 1ie3s. T6/s2 not only in1ali5ation -essa0es are a1oi5e52 a no5e 5oes not nee5 to recei1e an5 .rocess -essa0es eac6 ti-e an ob=ect cac6e5 by it is /.5ate5 at anot6er no5e. 2. LC base5 .rotocols or5er all accesses to relate5 ob=ects by a51ancin0 no5e 1ie3s in a consistent -anner. t t6e ti-e a ne3 ob=ect co.y is a55e5 to a no5e cac6e2 t6e no5e .er7or-s local consistency actions to ens/re t6at c/rrently store5 co.ies o7 s6are5 ob=ects are 1ali5 in t6e ne3 no5e 1ie3. S/c6 consistency actions re:/ire no co--/nication beca/se t6ey only in1ali5ate5 beca/se t6ey only in1ali5ate local co.ies t6at .otentially o1er3ritten in t6e 1ie3.

".

client no5e -/st co--/nicate 3it6 an ob=ectAs ser1er 36en it eit6er 5oes not 6a1e t6e ob=ect in its or it 3ants to /.5ate t6e ob=ect b/t 6as only rea5 .er-ission. S/c6 co--/nication 3it6 t6e ser1er can a51ance t6e clients 1ie3.in a55ition2 client 1ie3s can be a51ance5 3it6 .erio5ic co--/nication t6at can be initiate5 by t6e ser1er or t6e client 1ie3s an5 t6e 0lobal 1ie3 is bo/n5e5. T6/s2 36ile 0/aranteein0 t6at ob=ect accesses can be seriali9e52 LC base5 .rotocols o77ers t6e 7le8ibility to control t6e c/rrency o7 cac6e5 ob=ect co.ies base5 on reso/rce a1ailability an5 a..lication nee5s.

O*+#c" L!,#"!-# Ba #( P&o"ocol In t6is .rotocol 3e ass/-e t6at relate5 ob=ects are .artitione5 a-on0 ser1ers an5 t6e ser1er 7or an ob=ect re-ains 7i8e5. In LC base5 .rotocol2 36en a no5eAs 1ie3 a51ances beca/se o7 a ne3ly cac6e5 ob=ect co.y2 it nee5s to 4no3 36at e8istin0 ob=ect co.ies 6a1e been o1er3ritten in t6e ne3 no5e 1ie3. &e ta4e an a..roac6 in 36ic6 -eta5ata associate5 3it6 ob=ect co.ies are /se5 to 5eter-ine 36at e8istin0 ob=ect co.ies are still 1ali5 36en a no5e -o1es to a ne3er 1ie3. Denote t6e co.y o7 ob=ect 8 t6at stores 1al/e be 8>1?. T6e -etaB5ata associate5 3it6 8>1? is calle5 its li7eti-e. Int/iti1ely2 t6e li7e ti-e o7 an ob=ect co.y is t6e ti-e inter1al 5/rin0 36ic6 t6e co.y can be accesse5 3it6o/t 1iolatin0 consistency. T6is is 5one by associatin0 a 1ali5 ti-e. I7 eac6 ob=ect co.y cac6e5 at a no5e 6as a li7e ti-e associate5 3it6 it2 a strai06t 7or3ar5 test can be 5e1elo.e5 to 5eter-ine i7 a set o7 cac6e5 co.ies belon0 to a consistent 0lobal 1ie3. In lar0eBscale 5istrib/te5 syste-s2 it is not reasonable to ass/-e t6e e8istence o7 a sync6roni9e5 0lobal cloc4 to 5e7ine t6e ob=ect li7e ti-es. So 3e 7ollo3e5 a .rotocol t6at 5oes not re:/ire sync6roni9e5 cloc4s. Instea52 lo0ical cloc4s are /se5 to recor5 ob=ect li7e ti-es.

.. PRO/ECT DICTIONARY ..1. DATAFLOW DIAGRAMS

Distributed system

Process

Customer

Conte8t le1el 5i0s le1elBC

Data base

Login user

Process

Distributor

Customer

Add books

Delete books Distributor Process Edit books

Issue books

Data base

Adding books

Process

Data base

Deleting books

Process

Data base

Editing books

Process

Data base

Issuing books

Process

Distributed system Conte8t le1el 5i0s le1elBC

Process

Customer

Data base

Login user

Process

Distributor

Data base

Multiple requests from customer

Process

Connected ser er # Connected ser er $ User Requests Local ser er !it" database Distributo r Connected ser er %

Connected ser er n

Local Data base

User Requests Multiple requests from clients

Local ser er

Distributor

Local ser er &er er#

&er er#

'''
Data base

&er er#

USE0CASE DIAGRAM

send a request

user

Read-hit

Write Hit

Write-Fault

Recive the Response

Write-Miss

CLASS DIAGRAM

<<Interface>> Remote

nicastRemote!b"ect NameServerIntf

NameServerImpl Runnable Hash#able

(ote) t"is diagram represents t"e relations"ip among arious classes used to build t"e system'

NameServerIntf boolean re$ister%& void 'ithdra'%& Strin$ $et(ddress%&

NameServerImpl ht ) Hashtable NameServerImpl%& boolean re$ister%& void 'ithdra'%& Strin$ $et(ddress%&

NameServer static void main%&

NoteD T6is 5ia0ra- re.resents t6e 1ario/s -et6o5s i-.le-ente5 in eac6 o7 t6e classes re.resente5 abo1e. ,ere t6e UnicastRe-oteOb=ect class .ro1i5es t6e re-ote ob=ect re:/ire5 to .rocess t6e ser1ice in case t6e ob=ect is not .resent in t6e 6as6table>collection? on t6e local ser1er

)NameServerIntf send request ) user

)NameServer Impl

)Hash#able

) nicastRemote !b"ect

identif* server I+ address

connect to server

search for requested ob"ect

for'ard result if ob"ect available return messa$e if ob"ect not available request read permission of ob"ect from remote server

return result from ob"ect of remote server

,) identif* server I+ address

.) connect to server -) send request )Name ServerIntf

)NameServe rImpl

2) request read permission of ob"ect from remote server ) user /) return messa$e if ob"ect not available

0) search for requested ob"ect

3) return result from ob"ect of remote server

1) for'ard result if ob"ect available ) nicastRemote !b"ect

)Hash #able

1. FORMS & REPORTS 1.1. I2O SAMPLES

RE3UEST FORM

READ

RE3UEST

FORM

WIT4

ANOT4ER

FORM

DISPLAYING

SER5ERS

ONLINE

ENTERING TO UPDATE FORM

UPDATE RE3UEST FORM

UPDATE FORM W4EN DATA 4AS UPDATED

DISPLAYING T4E UPDATED RESULTS IN READ FORM

You might also like