Simultaneous Insertions in Tapestry Kris Hildrum, UC Berkeley - - PowerPoint PPT Presentation

simultaneous insertions in tapestry
SMART_READER_LITE
LIVE PREVIEW

Simultaneous Insertions in Tapestry Kris Hildrum, UC Berkeley - - PowerPoint PPT Presentation

Simultaneous Insertions in Tapestry Kris Hildrum, UC Berkeley hildrum@cs.berkeley.edu Joint work with John Kubiatowicz, Satish Rao, and Ben Y. Zhao This is going to be different Please stop me if 4 Im confusing. 3.5 3 This


slide-1
SLIDE 1

Simultaneous Insertions in Tapestry

Kris Hildrum, UC Berkeley hildrum@cs.berkeley.edu Joint work with John Kubiatowicz, Satish Rao, and Ben Y. Zhao

slide-2
SLIDE 2

This is going to be different…

  • Please stop me if

I’m confusing.

  • This will be your
  • nly graph.
  • Now for the hard

(but very cool) stuff…

0.5 1 1.5 2 2.5 3 3.5 4 This Talk Kayaking Proofs Graphs Sun

slide-3
SLIDE 3

Related Work

(no, this wasn’t in the original talk)

  • Tapestry mesh inspired by paper by

Plaxton, Rajaraman and Richa from SPAA 1997.

  • Other peer-to-peer object location

systems include

– Chord – CAN – Pastry

slide-4
SLIDE 4

4 2 3 3 3 2 2 1 2 4 1 2 3 3 1 3 4 1 1 4 3 2 4 NodeID 0xEF34 NodeID 0xEF31 NodeID 0xEFBA NodeID 0x0921 NodeID 0xE932 NodeID 0xEF37 NodeID 0xE324 NodeID 0xEF97 NodeID 0xEF32 NodeID 0xFF37 NodeID 0xE555 NodeID 0xE530 NodeID 0xEF44 NodeID 0x0999 NodeID 0x099F NodeID 0xE399 NodeID 0xEF40 NodeID 0xEF34

Basic Tapestry Mesh

(from PRR97)

slide-5
SLIDE 5

Use of Tapestry Mesh Randomization and Locality

slide-6
SLIDE 6

Why simultaneous?

  • Inserts will not always happen one at a time.

– Not practical to have one gateway to serialize

  • Most simultaneous inserts completely

harmless (no interference), but handling bad

  • nes correctly is important
  • Assumptions:

– No concurrent deletes (can be worked around) – Messages always arrive, though no guarantee on timely delivery

slide-7
SLIDE 7

(Simultaneous) Insertion

  • Find node with closest matching ID (surrogate)

and get preliminary neighbor table

– If surrogate’s is hole-free, so is this one.

  • Find all nodes that need to put new node in

routing table via multicast

  • Optimize neighbor table

– Very tricky & fun, touched on here.

  • Want:

No fillable holes.

slide-8
SLIDE 8

Neighbor Map For “2175” (Octal) Routing Levels

1 2 3 4

1xxx 2175 0xxx 3xxx 4xxx 5xxx 6xxx 7xxx 20xx 2175 22xx 23xx 24xx 25xx 26xx 27xx 210x 211x 212x 213x 214x 215x 216x 2175 2170 2171 2172 2173 ø 2175 2176 2177

Neighbor Table

1 NodeID 0xE932 3 3 2 2 2 4 3 NodeID 0xEFBA NodeID 0xEF37 NodeID 0xE324 NodeID 0xE555 NodeID 0xEF44 NodeID 0xEFB4

slide-9
SLIDE 9

Need-to-know nodes

  • Need-to-know = a node with a hole in

neighbor table filled by new node

  • If 1234 is new node, and no 123s existed, must

notify 12?? nodes

  • Acknowledged multicast to all matching nodes
  • During this time, object requests may go

either to new node or former surrogate, but

  • ld and new can forward requests
  • New node knows old destination
  • Once pointers moved, pre-insertion

destination knows new node.

slide-10
SLIDE 10

Acknowledged Multicast Algorithm

Locates & Contacts all nodes with a given prefix

  • Create a tree based on IDs as we go
  • Starting node knows when all nodes reached
  • Nodes send acks when all children reached

54345 54340

543??

5434?

The node then sends to any ?0345, any ?1345, any ?3345, etc. if possible

5431?

slide-11
SLIDE 11

Multicast Breaks

  • A is only 123
  • B is only 124
  • They need to find
  • ut about each other
  • But they don’t!

NodeID 0x1224 NodeID 0x1220 B 0x1244 A 0x1230

A B B A

slide-12
SLIDE 12

What Goes Wrong?

  • Suppose A & B add themselves.

– A is only 123 – B is only 124 – Both talk to same set (all 12 nodes) – 123 is a “Need-to-Know” node for 124 & vice-versa – But multicasts could pass each other…

slide-13
SLIDE 13

But it Gets Worse…

  • Suppose X has prefix 12.
  • A=1231 arrives. X adds A to table.
  • B =1232 arrives.

– X adds B to table, drops A. – Sends B’s message to A.

  • C = 1233 arrives.

– X sends C’s message to B.

  • B gets C’s message.
  • A gets message about B’s.

A does not know about C!!

slide-14
SLIDE 14

We Fill All Holes - Outline

  • Multicast reaches all completely

inserted or core nodes. (Lemma 1)

  • Any same-hole insertion arriving at a

node before A is found before A finishes its multicast. So A has found all such nodes by end. (Lemma 2)

  • Any two different-hole insertions must

find each other.

slide-15
SLIDE 15

Locking Pointers

  • Problem in same hole case:
  • multicast assumed that chosen node can

forward message

  • Inserting nodes have incomplete information.

So…

  • Pointers are added as “locked”. When

multicast for that node returns, pointers are unlocked.

  • Multicasts are sent to one unlocked pointer and

all locked pointers.

  • Locked pointers may not be deleted.
slide-16
SLIDE 16

Any unlocked pointer can reach all other unlocked pointers. Suppose it is true for all unlocked pointers until

  • A. Now consider next unlocked pointer.

– Knows all unlocked before its arrival, by hypothesis. – Knows locked when A arrived, since A’s message was sent to them. – Knows later arrivals, since they must have sent message down A.

⇒ If X sends to one unlocked and all locked, all nodes X has seen will get message.

slide-17
SLIDE 17

Modified Multicast

  • Message now includes:

– Hole node is filling – A “watch list” of unfilled holes in neighbor table

  • Receivers now

– Forward multicast to hole if hole filled – Send any nodes matching holes in watch list to originator

slide-18
SLIDE 18
  • We want:

When A finishes its multicast, it has informed all core need-to-know nodes and it knows all the core nodes it needs to. (no unfilled holes) Two insertions conflict if there can be no agreement on which the order in which the insertions occurred.

slide-19
SLIDE 19

New Multicast Fixes Problem

  • A is only 123
  • B is only 124
  • They need to find
  • ut about each other
  • A needs to arrive

before B at only ONE node.

NodeID 0x1224 NodeID 0x1220 B 0x1244 A 0x1230

A B B A B A

slide-20
SLIDE 20

Proof

  • Multicast reaches all completely

inserted nodes. (Lemma 1)

  • Any same-hole insertion arriving at a

node before A is found before A finishes its multicast. So A has found all such nodes by end. (Follows from pointer locking)

  • Any different-hole insertion must either

arrive

– Before or conflict (ok) – After (then A gets multicast)

slide-21
SLIDE 21

Lemma 1: Core Nodes Reached

  • Core node: multicast finished.
  • Suppose some core node unreached.

Consider X, which was supposed to send it towards core node.

– X is not finished inserting. Cannot be, since X only fills holes. – X is done inserting. But it must not have a hole.

slide-22
SLIDE 22

Finding Nearest Neighbor

  • Let j be such that

surrogate matches new node in last j digits of node ID

  • G = surrogate
  • A. G sends j-list to new

node; new node pings all nodes on j-list.

  • B. If one is closer, G =

closest, goto A. If not, done with this level, and let j = j-1 and goto A.

j-list is closest k=O(log n) nodes matching in j digits

01234 01334

61524 32134 11111

slide-23
SLIDE 23

Delete

republish republish republish republish republish

slide-24
SLIDE 24

Conclusions

  • Simultaneous insertion works.
  • Deletion and details on insertion in

paper.

  • Questions:

– How does delete interact with insert? – Can we make optimization algorithm better?