21
Scalable Consistency Protocol CONTENTS 1. INTRODUCTION 2. DESIGN PRINCIPLES & EXPLNTION 2.1. !ODULE DESCRIPTIOIN ". PRO#ECT DICTIONR$ ".1. DT%LO DIGR!S ".2. USE CSE DIGR! ".". CLSS DIGR! '. %OR!S & REPORTS '.1. I(O S!PLES ). TESTING *. +I+ILIOGRP,$

Scalable Consistency Protocol for Distributed Systems

Embed Size (px)

Citation preview

Page 1: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 1/21

Scalable Consistency Protocol

CONTENTS

1. INTRODUCTION

2. DESIGN PRINCIPLES & EXPLNTION

2.1. !ODULE DESCRIPTIOIN

". PRO#ECT DICTIONR$

".1. DT%LO DIGR!S

".2. USE CSE DIGR!

".". CLSS DIGR!

'. %OR!S & REPORTS

'.1. I(O S!PLES

). TESTING

*. +I+ILIOGRP,$

Page 2: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 2/21

1. INTRUDECTION

EXISTING SYSTEM

s co-/tin0 beco-es -ore erasie local area net3or4s are beco-in0

lar0er an5 better interconnecte5. it6 t6is 0ro3t6 o7 interconnecte5

co-/tin0 6i06ly interactie alications 3ill san -any local net3or4s.

E8a-les o7 s/c6 alications co-e 7ro- t6e 5o-ain o7 co-/ter s/orte5

cooeratie 3or4 as 3ell as irt/al reality base5 5istrib/te5 0a-es s6oin0

an5 ot6ers.

T6ese alications nee5 to be s/orte5 by 5istrib/te5 serices t6at roi5e

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 eniron-ent 36ic6 lea5s to increase latency ti-e.

DRAWBACKS OF EXISTING SYSTEM

In interactie alications ti-ely 5isse-ination o7 an /5ate is re:/ire5. It

is obio/s rotocols t6at i-le-ent stron0 consistency are -ore e8ensie

an5 5o not er-it any ;la0< t6at -ay be accetable in 5isse-inatin0 t6e

e77ects o7 /5ate oerations. e no3 6ae e8lore5 a notion o7 stron0

consistency t6at 0/arantees seriali9ation o7 all ob=ect accesses as in

se:/ential consistency. ,o3eer it allo3s client no5es control oer 6o3

:/ic4ly t6ey 3ant to beco-e a3are o7 /5ates to cac6e5 ob=ects. O/r belie7

is t6at s/c6 7le8ible control oer /5ate 5isse-ination is necessary 7or

5eeloin0 scalable rotocols 7or stron0 consistency.

 

Page 3: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 3/21

PROPOSED SYSTEM

co--on 3ay to a55ress scalability re:/ire-ents o7 5istrib/te5 serices in

e8istin0 syste- is to e-loy serer relication an5 client cac6in0 o7 ob=ects

t6at encas/late t6e serice state. T6e er7or-ance o7 s/c6 syste- co/l5

5een5 ery -/c6 on t6e rotocol i-le-ente5 by t6e syste- to -aintain

consistency a-on0 ob=ect coies. e e8lore scalable consistency rotocols

t6at neer re:/ires sync6roni9ation an5

Co--/nication bet3een all no5es t6at 6ae coies o7 relate5 ob=ects.

e ac6iee t6is by 5eeloin0 a noel aroac6 calle5

local consistency>LC?.

T6e basic i5ea o7 LC -ec6anis- is as 7ollo3s. In tra5itional stron0 consistency

rotocols no5es t6at /5ate a s6are5 ob=ect 8 ta4e t6e resonsibility o7

noti7yin0 no5es t6at 6ae coies o7 8 abo/t t6e /5ates. 6en s/c6 no5es are

3i5ely 5istrib/te5 /5ate latencies can be ery lar0e. In LC base5 rotocols

6o3eer no5es t6at /5ate s6are5 state are not resonsible 7or in7or-in0

ot6er no5es abo/t /5ates@ instea5 a no5e nee5s to beco-e a3are o7 an

e8ternal /5ate t6e no5e e8ec/tes consistency actions to inali5ate local

ob=ect coies t6at -ay be oer3ritten 3it6 resect to t6e ne3ly arrie5 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 6ae coies o7 t6e accesse5 ob=ect. No5es can 7etc6 coies o7

ob=ects eit6er on 5e-an5 or ne3 coies can be sent to no5es 36ic6 can

intro5/ce t6e- into t6eir cac6es in a consistent -anner. T6/s bot6 /s6 an5

/ll style /5ate 5isse-ination is ossible in LC base5 rotocols.

Page 4: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 4/21

2. DESIGN PRINCIPLES & EXPLANATION

2.1. MODULE DESCRIPTIOIN

Local Con!"#nc$ A%%oac'

In t6e syste- -o5el ass/-e5 6ere s6are5 ob=ects are store5 at serer no5es.

Client no5es can cac6e ob=ect coies an5 access t6e- locally. Ob=ects can be

relate5 an5 consistency re:/ire-ents can be 5e7ine5 across relate5 ob=ects. %or

e8a-le i7 8 an5 y are t3o relate5 5oc/-ent ob=ects >e.0.8 contains res/lts o7

an e8eri-ent an5 y contains a 5isc/ssion o7 t6ese res/lts?an5 a /ser 7irst

/5ates 8 an5 t6en y it is 5esirable t6at anot6er /ser t6at accesses t6e

/5ate5 coy o7 y 3ill also see t6e ne3 coy o7 8. since no5es 6ae coies o7

s/c6 ob=ects t6ey are intereste5 in /5ates to ob=ects accesse5 t6e-. 3e

5e7ine a syste- 0lobal ie3 an5 no5e ie3s to cat/re t6e al/es o7 ob=ects

t6at can be accesse5 by no5es.

LC Ba#( Po"ocol)

1. In LC base5 rotocols 36en a serer trans7ers 3rite access to a ne3

no5e e8istin0 rea5ers are not sent inali5ation -essa0es. in 7act

rea5ers o7 an ob=ect can coe8ist 3it6 a 3riter by rea5in0 al/es 7ro- ol5

b/t consistent no5e ie3s. T6/s not only inali5ation -essa0es are

aoi5e5 a no5e 5oes not nee5 to receie 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 a5ancin0

no5e ie3s in a consistent -anner. t t6e ti-e a ne3 ob=ect coy is

a55e5 to a no5e cac6e t6e no5e er7or-s local consistency actions to

ens/re t6at c/rrently store5 coies o7 s6are5 ob=ects are ali5 in t6e ne3

no5e ie3. S/c6 consistency actions re:/ire no co--/nication beca/se

t6ey only inali5ate5 beca/se t6ey only inali5ate local coies t6at

otentially oer3ritten in t6e ie3.

Page 5: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 5/21

". client no5e -/st co--/nicate 3it6 an ob=ectAs serer 36en it eit6er

5oes not 6ae 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 serer can a5ance

t6e clients ie3.in a55ition client ie3s can be a5ance5 3it6 erio5ic

co--/nication t6at can be initiate5 by t6e serer or t6e client ie3s an5

t6e 0lobal ie3 is bo/n5e5. T6/s 36ile 0/aranteein0 t6at ob=ect accesses

can be seriali9e5 LC base5 rotocols o77ers t6e 7le8ibility to control t6e

c/rrency o7 cac6e5 ob=ect coies base5 on reso/rce aailability an5

alication nee5s.

  O*+#c" L!,#"!-# Ba#( Po"ocol

In t6is rotocol 3e ass/-e t6at relate5 ob=ects are artitione5 a-on0

serers an5 t6e serer 7or an ob=ect re-ains 7i8e5.

In LC base5 rotocol 36en a no5eAs ie3 a5ances beca/se o7 a ne3ly

cac6e5 ob=ect coy it nee5s to 4no3 36at e8istin0 ob=ect coies 6ae been

oer3ritten in t6e ne3 no5e ie3. e ta4e an aroac6 in 36ic6 -eta5ata

associate5 3it6 ob=ect coies are /se5 to 5eter-ine 36at e8istin0 ob=ect

coies are still ali5 36en a no5e -oes to a ne3er ie3.

Denote t6e coy o7 ob=ect 8 t6at stores al/e be 8>?. T6e -etaB5ata

associate5 3it6 8>? is calle5 its li7eti-e. Int/itiely t6e li7e ti-e o7 an

ob=ect coy is t6e ti-e interal 5/rin0 36ic6 t6e coy can be accesse5

3it6o/t iolatin0 consistency. T6is is 5one by associatin0 a ali5 ti-e. I7

eac6 ob=ect coy cac6e5 at a no5e 6as a li7e ti-e associate5 3it6 it a

strai06t 7or3ar5 test can be 5eeloe5 to 5eter-ine i7 a set o7 cac6e5

coies belon0 to a consistent 0lobal ie3.

In lar0eBscale 5istrib/te5 syste-s 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. Instea5

lo0ical cloc4s are /se5 to recor5 ob=ect li7e ti-es.

Page 6: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 6/21

. PRO/ECT DICTIONARY

.1. DATAFLOW DIAGRAMS

Conte8t leel 5i0s leelB

Login user  Process Distributor 

Customer 

Data base

Distributor  Process

Add books

Delete books

Edit books

Issue books

ProcessCustomer Distributed

system

Page 7: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 7/21

Adding books Process

Data base

Deleting books Process

Data base

Editing books Process

Data base

Issuing books Process

Data base

Page 8: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 8/21

Conte8t leel 5i0s leelB

Multiplerequests from

customer Process

Data base

ProcessCustomer Distributed

system

Login user  Process Distributor 

Data base

Page 9: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 9/21

User

RequestsDistributo

Local

serer

!it"database

Connected serer #

Connected serer $

Connected serer %

Connected serer n

Page 10: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 10/21

User

Requests

Localserer 

Local Data base

Distributor 

&erer#&erer# ' ' ' &erer#Multiple requests

from clients

Local serer 

Data base

Page 11: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 11/21

 

user 

Recive the Response

Read-hit

send a request

Write Hit Write-Fault

Write-Miss

 

USE0CASE DIAGRAM

Page 12: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 12/21

 

Remote<<Interface>>

NameServerIntf 

NameServerImpl

Runnable

nicastRemote!b"ect

Hash#able

 

CLASS DIAGRAM

 (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%&

e

s 5ia0ra- reresents t6e ario/s -et6o5s i-le-ente5 in eac6 o7

classes reresente5 aboe. ,ere t6e UnicastRe-oteOb=ect class

i5es t6e re-ote ob=ect re:/ire5 to rocess t6e serice in case

ob=ect is not resent in t6e 6as6table>collection? on t6e local

er

Page 13: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 13/21

 

) user 

)NameServerIntf )NameServer  Impl

)Hash#able )nicastRemote!b"ect

send request

identif* server I+address

connect to server  search forrequested

ob"ect

for'ard result ifob"ect available

return messa$e ifob"ect not available

request readpermission ofob"ect from

remote server 

return resultfrom ob"ect ofremote server 

Page 14: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 14/21

 ) user 

)NameServerIntf 

)NameServerImpl

)Hash

#able

)nicastRemote!b"ect

,) identif* server I+ address

-) send request

.) connect to server 

/) return messa$e ifob"ect not available

0) search forrequested ob"ect

1) for'ardresult if

ob"ectavailable

2) request read permission ofob"ect from remote server 

3) return result from ob"ectof remote server 

Page 15: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 15/21

. FORMS & REPORTS

.1. IO SAMPLES

Page 16: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 16/21

RE3UEST FORM

Page 17: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 17/21

READ RE3UEST FORM WIT4 ANOT4ER FORM DISPLAYING SER5ERS

ONLINE

Page 18: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 18/21

ENTERING TO UPDATE FORM

Page 19: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 19/21

UPDATE RE3UEST FORM

Page 20: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 20/21

UPDATE FORM W4EN DATA 4AS UPDATED

Page 21: Scalable Consistency Protocol for Distributed Systems

8/13/2019 Scalable Consistency Protocol for Distributed Systems

http://slidepdf.com/reader/full/scalable-consistency-protocol-for-distributed-systems 21/21

 DISPLAYING T4E UPDATED RESULTS IN READ FORM