Live Objects Live Objects Live Objects Live Objects Krzys - - PowerPoint PPT Presentation

live objects live objects live objects live objects
SMART_READER_LITE
LIVE PREVIEW

Live Objects Live Objects Live Objects Live Objects Krzys - - PowerPoint PPT Presentation

Live Objects Live Objects Live Objects Live Objects Krzys Ostrowski, Ken Birman, Danny Dolev Krzys Ostrowski, Ken Birman, Danny Dolev Cornell University, Hebrew University * (*) Others are also involved in some aspects of this project


slide-1
SLIDE 1

Live Objects Live Objects Live Objects Live Objects

Krzys Ostrowski, Ken Birman, Danny Dolev Krzys Ostrowski, Ken Birman, Danny Dolev

Cornell University, Hebrew University* (*) Others are also involved in some aspects of this project… I’ll mention them when their work arises…

slide-2
SLIDE 2

Live Objects in an Active Web Live Objects in an Active Web

Imagine a world of Live Objects

.

Imagine a world of Live Objects…. …. and an Active Web created with “drag and drop”

slide-3
SLIDE 3

Live Objects in an Active Web Live Objects in an Active Web

Imagine a world of Live Objects

.

Imagine a world of Live Objects…. …. and an Active Web created with “drag and drop”

slide-4
SLIDE 4

Live Objects in an Active Web Live Objects in an Active Web

User builds applications much like powerpoint User builds applications much like powerpoint

  • Drag things onto a “live document” or desktop
  • Customize them via a properties sheet

p p

  • Then share the live document

Opening a document “joins” a session

  • New instance can obtain a state checkpoint
  • All see every update…
  • Platform offers privacy, security, reliability properties
slide-5
SLIDE 5

When would they be useful? When would they be useful?

Build a disaster response system…

… in the field (with no programming needed!)

Coordinated planning and plan execution Create role-playing simulations, games Integrate data from web services into

databases, spreadsheets

Visualize complex distributed state Track business processes, status of major

projects, even state of an application

slide-6
SLIDE 6

Big deal? Big deal?

We think so! We think so!

  • It is very hard to build distributed systems today. If

non-programmers can do the job numbers of such applications will soar

  • Live objects are robust to the extent that our platform

is able to offer properties such as security privacy is able to offer properties such as security, privacy protection, fault-tolerance, stability Live objects might be a way to motivate users to

j g y adopt a trustworthy technology

slide-7
SLIDE 7

The drag and drop world The drag and drop world

It needs a global namespace of objects It needs a global namespace of objects

  • Video feeds, other data feeds, live maps, etc…
  • Our thinking: download them from a repository or

g p y (rarely) build new ones Users make heavy use of live documents, share

h k d f l b

  • ther kinds of live objects

And this gives rise to a world with

  • Lots of live traffic, huge numbers of live objects
  • Any given node may be “in” lots of object groups
slide-8
SLIDE 8

Overlapping groups Overlapping groups

Control Events Background Radar Images ATC events Radar track updates Background Radar Images Multicast groups supporting live Radar track updates Weather notifications

  • bjects

Nodes running live applications

slide-9
SLIDE 9

… posing technical challenges … posing technical challenges

How can we build a system that How can we build a system that…

  • Can sustain high data rates in groups
  • Can scale to large numbers of overlapping groups

g pp g g p

  • Can guarantee reliability and security properties

Existing multicast systems can’t solve these

problems!

slide-10
SLIDE 10

Existing technologies won’t work… Existing technologies won’t work…

Kind of technology Why we rejected it

IP multicast, pt-to-pt TCP Too many IPMC addrs. Too many TCP streams Software group multicast l i (“h i h ”) Protocols designed for just one group at a time; h d I bili i l d l solutions (“heavyweight”)

  • verheads soar. Instability in large deployments

Lightweight groups Nodes get undesired traffic, data sent indirectly P bli h b ib b U t bl i l d l t d t t i di tl Publish-subscribe bus Unstable in large deployments, data sent indirectly Content-filtering event notification. Very expensive. Nodes see undesired traffic. High latency paths are common notification. High latency paths are common Peer-to-peer overlays Similar to content-filtering scenario

slide-11
SLIDE 11

Steps to a new system! Steps to a new system!

1.

First, we’ll look at group overlap and will show that we , g p p can simplify a system with overlap and focus on a single “cover set” with a regular, hierarchical overlap

2.

Next, we’ll design a simple fault-tolerance protocol for high-speed data delivery in such systems

3.

We’ll look at its performance (and arrive at surprising insights that greatly enhance scalability under stress) g g y y )

4.

Last, ask how our solution can be enhanced to address need for stronger reliability security need for stronger reliability, security

slide-12
SLIDE 12

Coping with Group Overlap Coping with Group Overlap

In a nutshell: In a nutshell:

  • Start by showing that even if groups overlap in an

irregular way, we can “decompose” the structure into a collection of overlayed “cover sets”

  • Cover sets will have regular overlap

Clean hierarchical inclusion Clean, hierarchical inclusion Other good properties

slide-13
SLIDE 13

Regular Overlap Regular Overlap

groups nodes

Likely to arise in a data center that replicates services

and automates layout of services on nodes

slide-14
SLIDE 14

Live Objects Live Objects ⇒ Irregular overlap Irregular overlap

Likely because users will have different interests Likely because users will have different interests…

slide-15
SLIDE 15

Tiling an irregular overlap Tiling an irregular overlap

Build some (small) number of regularly

u d so e (s a ) u be o egu a y

  • verlapped sets of groups (“cover sets”) s.t.
  • Each group is in one cover set
  • Cover sets are nicely hierarchical
  • Traffic is as concentrated as possible

Seems hard: O(2G) possible cover sets

f ’ d l d l l

In fact we’ve developed a surprisingly simple

algorithm that works really well. Ymir Vigfusson has been helping us study this: has been helping us study this:

slide-16
SLIDE 16

Algorithm in a nutshell Algorithm in a nutshell

1

Remove tiny groups and collapse identical ones

1.

Remove tiny groups and collapse identical ones

2.

Pick a big, busy group

  • 1. Look for another big, busy group with extensive overlap
  • 1. Look for another big, busy group with extensive overlap
  • 2. Given multiple candidates, take the one that creates the

largest “regions of overlap”

3.

Repeat within overlap regions (if large enough)

A B A B Nodes only in group A Nodes only in group B Nodes in A and B

slide-17
SLIDE 17

Why this works Why this works

  • in general, it wouldn’t work!

… in general, it wouldn t work! But many studies suggest that groups would have

power-law popularity distributions power law popularity distributions

  • Seen in studies of financial trading systems, RSS feeds
  • Explained by “preferential attachment” models

In such cases the overlap has hidden structure…

and the algorithm finds it!

It also works exceptionally well for obvious cases

such as exact overlap or hierarchical overlap

slide-18
SLIDE 18

It works remarkably well It works remarkably well!

Lots of processes join 10% of thousands of Lots of processes join 10% of thousands of

groups with Zipf-like (α= 1.5) popularity….

15 de 2000 e in

  • ns

H il l d d

6 9 12 egions / nod 500 1000 1500 des that are s many regio

Heavily loaded

total 3 1 2 3 4 5 6 7 8 9 10 re number of groups (thousands) 250 500 750 1000 2000 1 4 7 10 13 16 19 22 25 28 nod this regions / node ll i 95% t l d d i 250 500 750 1000 2000 all regions 95% most loaded regions

Nodes end up in very few i (100 1 ti ) And even fewer “busy” i (1000 1 ti )! regions (100:1 ratio…) regions (1000:1 ratio)!

slide-19
SLIDE 19

Effect of different stages Effect of different stages

Each step of the algorithm “concentrates” load Each step of the algorithm concentrates load Initial groups Remove small or identical groups Run algorithm

slide-20
SLIDE 20

… but not always … but not always

It works very poorly with “uniform random” It works very poorly with uniform random

topic popularity

It works incredibly well with artificially generated It works incredibly well with artificially generated

power-law popularity of a type that might arise in some real systems, or with artificial group layouts (as seen in IBM Websphere)

But the situation for human preferential

h l h attachment scenarios is unclear right now… we’re studying it

slide-21
SLIDE 21

Digression: Power Laws… Digression: Power Laws…

Zipf: Popularity of k’th-ranked group ≈ 1/kα Zipf: Popularity of k th ranked group ≈ 1/k A “law of nature”

slide-22
SLIDE 22

Zipf Zipf-

  • like things

like things

Web page visitors, outlinks, inlinks Web page visitors, outlinks, inlinks File sizes Popularity and data rates for equity prices Popularity and data rates for equity prices Network traffic from collections of clients Frequency of word use in natural language Frequency of word use in natural language Income distribution in Western society

  • and many more things

… and many more things

slide-23
SLIDE 23

Dangers of “common belief” Dangers of “common belief”

Everyone knows that if something is Zipf-like, Everyone knows that if something is Zipf like,

instances will look like power-law curves

Reality? These models are just approximate…

  • With experimental data, try and extract statistically

p , y y supported “model”

  • With groups, people plot log-log graphs (x axis is the

t i l it k d i t b ib ) topic popularity, ranked; y-axis counts subscribers)

  • Gives something that looks more or less like a straight

line… with a lot of noise e t a ot o

  • se
slide-24
SLIDE 24

Dangers of “common belief” Dangers of “common belief”

* * * *

Power law with α = 2.1

* * * * * * * * * * * * * * * * * * * * * * *

slide-25
SLIDE 25

But… But…

Much of the structure is in the noise Much of the structure is in the noise Would our greedy algorithm work on “real Would our greedy algorithm work on real

world” data?

  • Hard to know: Live Objects aren’t widely used in the

j y real world yet

  • For some guesses of how the real world would look,

th i fi di l ith h ld k f th the region-finding algorithm should work… for others, it might not… a mystery until we can get more data!

slide-26
SLIDE 26

When in doubt…. Why not just b ild d h i d ? build one and see how it does?

slide-27
SLIDE 27

Building Our System Building Our System

First, build a live objects framework

st, bu d a e objects a e o

  • Basically, a structure for composing components
  • Has a type system and a means of “activating”

components The actual components may not require

  • components. The actual components may not require

code, but if they do, that code can be downloaded from remote sites User “opens” live documents or applications

  • … this triggers our runtime system, and it activates

the objects the objects The objects make use of communication streams

that are themselves live objects j

slide-28
SLIDE 28

Example Example

Even our airplanes Even our airplanes

were mashups

Four objects (at XNA display interface Four objects (at

least), with type-checked

Airplane Model GPS di t ( t)

event channels connecting them ll

GPS coordinates (x,y,z,t) Multicast protocol Most apps will

use a lot of objects…

Multicast protocol

slide-29
SLIDE 29

When is an “X” an object? When is an “X” an object?

Given choice of implementing X or A+ B Given choice of implementing X or A+ B…

  • Use one object if functionality is “contained”
  • Use two or more if there is a shared function and

then a plug-in specialization function Idea is a bit like plug-and-play device drivers Enables us to send an object to a strange

environment and then configure it on the fly to

  • k p ope l

in that pa tic la setting work properly in that particular setting

slide-30
SLIDE 30

Type checking Type checking

Live objects are type-checked Live objects are type checked

  • Each component exposes interfaces
  • Events travel on these, and have types

, yp

  • … types must match

In addition, objects may constraint their peers

  • I expect this from my peer
  • I provide this to my peer
  • Here’s a checker I would like to use

Multiple opportunities for checking

  • Design time… mashup time… runtime
slide-31
SLIDE 31

Reflection Reflection

At runtime, can At runtime, can

  • Generate an interface: B’s interface just for A
  • Substitute a new object: B’ replaces B

j p

  • Interpose an object: A+ B becomes A+ B’+ B

Tremendously flexible and powerful

  • But does raise some complicated security issues!
slide-32
SLIDE 32

Overall architecture Overall architecture

User-Visible User Visible Application Objects Live Objects Platform QuickSilver Ricochet Gossip QuickSilver Scalable Multicast Ricochet Time-Critical Multicast Gossip Objects Plaform

slide-33
SLIDE 33

So… why will it scale? So… why will it scale?

Many dimensions that matter Many dimensions that matter

  • Lots of live objects on one machine, maybe using

multicore

  • Lots of machines using lots of objects

In remainder of talk focus on multicast scaling…

slide-34
SLIDE 34

Building QSM Building QSM

Given an “enterprise” (for now, LAN-based) Given an enterprise (for now, LAN based)

  • Build a “map” of the nodes in the system
  • … annotated by the live objects running on each

y j g Feed this into our cover set algorithm… it will

  • utput a set of covers

Each node instantiates QSM to build the needed

communication infrastructure for those covers

slide-35
SLIDE 35

Building QSM Building QSM

Given a regular cover set, break it into regions Given a regular cover set, break it into regions

  • f identical group membership

Assign each region its own IP multicast address Assign each region its own IP multicast address

slide-36
SLIDE 36

Building QSM Building QSM

To send to a group, multicast to regions it spans To send to a group, multicast to regions it spans

If ibl t t ffi i t h i

If possible, aggregate traffic into each region

slide-37
SLIDE 37

Building QSM

A hierarchical recovery architecture recovers A hierarchical recovery architecture recovers

from message loss without overloading sender

slide-38
SLIDE 38

… memory footprint: a key issue … memory footprint: a key issue

  • At high data rates, performance is dominated by
  • At high data rates, performance is dominated by

the reliability protocol

  • Its latency turns out to be a function of
  • Its latency turns out to be a function of
  • 1. Ring size and hierarchy depth,
  • 2. CPU loads in QSM,
  • 3. Memory footprint of QSM (!!)
  • This third factor was crucial… it turned out to

determine the other two! determine the other two!

  • QSM has a new “memory minimizing” design
slide-39
SLIDE 39

… oscillatory behavior … oscillatory behavior

We also struggled with a form of thrashing We also struggled with a form of thrashing

12000 6000 8000 10000 12000 ges /s 2000 4000 6000 messag 250 400 550 700 850 time (s)

slide-40
SLIDE 40

Overcoming oscillatory behavior Overcoming oscillatory behavior

Essence of the problem: Essence of the problem:

  • Some message gets dropped
  • But the recovery packet is delayed by other data

y p y y

  • By the time the it arrives… a huge backload forms
  • The repair event triggers a surge overload… causing

l Th b i ill more loss. The system begins to oscillate A form of priority inversion!

slide-41
SLIDE 41

Overcoming oscillatory behavior Overcoming oscillatory behavior

Solution mimics emergency vehicles on a

crowded roadway: pull over and let them past! crowded roadway: pull over and let them past!

slide-42
SLIDE 42

The bottom line? It works! The bottom line? It works!

QSM sustains high data rates (even under

10000

QSM sustains high data rates (even under

stress) and scales well….

9000 9500 10000 ges / s 8000 8500 messag 7500 50 100 150 200 b f d number of nodes 1 sender 2 senders

slide-43
SLIDE 43

The bottom line? It works! The bottom line? It works!

  • and with the number of groups (topics)

Scalability limited by memory & … and with the number of groups (topics)

8000

y y y CPU loads at the sender… … as confirmed by artificially inflating sender’s per-group costs

7500 8000 ges / s 6500 7000 messa 6500 2000 4000 6000 8000 number of topics number of topics normal "heavyweight" (profiling on)

slide-44
SLIDE 44

What next? What next?

Live objects in WAN settings

with enriched

Live objects in WAN settings… with enriched

language support for extensions

Gossip Objects Pl tf Configuration Platform

  • Mgt. Svc

Port to Linux PPLive/LO Properties F k Framework

slide-45
SLIDE 45

Learning more Learning more

http://liveobjects.cs.cornell.edu