lecture 9 ordered multicasting
Download
Skip this Video
Download Presentation
Lecture 9: Ordered Multicasting

Loading in 2 Seconds...

play fullscreen
1 / 18

Lecture 9: Ordered Multicasting - PowerPoint PPT Presentation


  • 53 Views
  • Uploaded on

Lecture 9: Ordered Multicasting. TVS: Section 6.2 (CDK: Section 12.4). Contents. What is an ordered multicast ? Why is it useful? How can it be done? Using logical timestamps. Multicast. 1 process sends a message to a group of other processes

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Lecture 9: Ordered Multicasting ' - macey-ramsey


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
lecture 9 ordered multicasting

Lecture 9: Ordered Multicasting

TVS: Section 6.2

(CDK: Section 12.4)

contents
Contents
  • What is an ordered multicast?
  • Why is it useful?
  • How can it be done?
    • Using logical timestamps

COMP28112 Lecture 9

multicast
Multicast
  • 1 process sends a message to a group of other processes
  • More efficient than looping in the application sending a message to each
  • May be able to guarantee that either all recipients get the message or none does.

COMP28112 Lecture 9

example duplicate bank records
Example: duplicate bank records
  • For speed of response to queries, and improved reliability, suppose a bank keeps its database replicated in geographically distant locations (e.g. London & Edinburgh)
  • Each update request is sent to both (as a multicast)
  • But this leads to an ordering constraint

COMP28112 Lecture 9

fig 6 11 from tvs
Fig 6.11 from TvS

COMP28112 Lecture 9

the updates
The Updates
  • Suppose Update 1 credits £100 to an account containing £100
  • Suppose Update 2 adds 1% interest to the account.
  • If not done in the same order, can get balances of £201 and £202 in the two databases.

COMP28112 Lecture 9

totally ordered multicast
Totally-Ordered multicast
  • To get the same answers, we need totally-ordered multicast, i.e. all messages are delivered in the same order to each receiver.
  • Can be done with Lamport’s logical clocks.
  • Consider a group of processes multicasting to each other.
  • Each message is timestamped with the logical time of the sender.

COMP28112 Lecture 9

t o multicast 2
T-O Multicast (2)
  • Assume multicast also goes to the sender
  • Assume messages from the same sender are received by any 1 receiver in the order they were sent
  • Assume that no messages are lost
  • When message is received, put it in a local queue ordered by its timestamp.
  • The receiver multicasts an ACK to all processes. (Note ACK is not queued!)
  • A process can “act on” a queued message when it is at the head of the queue, and has been ACK’d by every other process.
  • Each process has the same contents in the queue …!

COMP28112 Lecture 9

slide9

A will have to process messages in a different order

(message delivery can be anything as long as it is the

same for all processes)

A

B

C

COMP28112 Lecture 9

implications
Implications
  • Note: the need to receive ACKs from all processes reduces advantage of replication! A crashed process will cause everything to stop ….
  • Keeping replicas consistent by executing same operations in the same order is a general technique (state machine replication)

COMP28112 Lecture 9

causally ordered multicasting
Causally-Ordered Multicasting
  • Weaker than totally-ordered because unrelated messages can be processed in different orders on different machines.
  • Useful on, e.g., a bulletin board – may want messages delivered in the correct order where they are related, but not to tie down ordering between messages on unrelated topics

COMP28112 Lecture 9

c o multicasting
C-O multicasting
  • Now we use Vector clocks – but only noticing sends as events ….
  • Suppose Pj receives message m from Pi with timestamp ts(m)
  • Delay delivery to application until:
    • ts(m)[i] = VCj[i] + 1
    • ts(m)[k] <= VCj[k] for all other k

COMP28112 Lecture 9

c o multicasting 2
C-O multicasting (2)
  • The 1st condition means that this is the next message Pj was expecting from Pi
  • The 2nd means that Pj has seen all the messages seen by Pi when it sent message m.

COMP28112 Lecture 9

example
Example

(1,0,0)

(1,1,0)

P0

m*

m

m

P1

(1,1,0)

delay

m*

P2

(0,0,0)

(1,0,0)

(1,1,0)

COMP28112 Lecture 9

explanation
Explanation
  • m* from P1 arrives at P2 before m from P0
  • But m* was sent after m arrived at P1
  • Therefore delivery of m* in P2 is delayed until after m has been delivered.

COMP28112 Lecture 9

end to end argument
End-to-end argument
  • Some systems have provided T-O and C-O multicasting (e.g. ISIS)
  • Some debate about whether this is a Good Thing or not
  • Two main problems:
    • Not all causality is real (e.g. 1 sender may send unrelated messages, but the system will believe the order matters)

COMP28112 Lecture 9

e to e argument cont
E-to-E argument (cont.)
    • Not all causality may be captured. E.g. users of the bulletin board might discuss issues offline and then post related messages without reading logically preceding ones first.
  • A particular application will have its own approach, but we may or may not want to build it on top of an infrastructure which assumes the answers.

COMP28112 Lecture 9

exercise
Exercise

a

b

d

c

f

g

i

k

m

j

l

p

n

o

q

r

s

Use (i) Lamport Clocks; (ii) Vector Clocks to order the events

COMP28112 Lecture 9

ad