design and implementation of frameworks for distributed interactive applications

37
Design and Implementation of Frameworks for Distributed Interactive Applications Peter A. Dinda

Upload: lihua

Post on 12-Jan-2016

44 views

Category:

Documents


4 download

DESCRIPTION

Design and Implementation of Frameworks for Distributed Interactive Applications. Peter A. Dinda. Outline. Interactive application model Distributing interactive applications Method invocation framework Mapping engine framework Early IDL Extensions Early Performance measurements. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Design and Implementation of Frameworks for Distributed Interactive Applications

Design and Implementation of Frameworks for Distributed Interactive Applications

Peter A. Dinda

Page 2: Design and Implementation of Frameworks for Distributed Interactive Applications

Outline

• Interactive application model

• Distributing interactive applications

• Method invocation framework

• Mapping engine framework

• Early IDL Extensions

• Early Performance measurements

Page 3: Design and Implementation of Frameworks for Distributed Interactive Applications

Interactive Application Model

User Action

Controller

View

Model(Simulation)

Execute This Code

Display ThisResponse

Page 4: Design and Implementation of Frameworks for Distributed Interactive Applications

What’s Important

Controller

View

Model(Simulation)

How LongDoes It Take?

How DoesIt Look?

Page 5: Design and Implementation of Frameworks for Distributed Interactive Applications

Digging Deeper

User Action

Controller

View

Procedure Call orMethod Invocation, pick your poison

Page 6: Design and Implementation of Frameworks for Distributed Interactive Applications

Concentration

User Action

Controller

View

Controller

Rest of Talk

Page 7: Design and Implementation of Frameworks for Distributed Interactive Applications

Distributed Interactive Applications: Freedom and Complexity

FlexibleMapping

??ControllerController

FlexibleBinding????

FlexibleData Movement

Page 8: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

StreamReceiver

StreamSender

QualityModulator

Object

Distributed Shared State System

The Framework Behind The Call

State

Page 9: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Shared State Objects

Page 10: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Shared State Objects

Page 11: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

User Action

Method Invocation

Method Invocation Begins

Page 12: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Map Request

ResourceInfo

Dist.Info

Mapping the Invocation

Page 13: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Adjust QualitySelect

RedistributeMove Args

Mapping the Invocation

Page 14: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

MoveState

Data Movement

Page 15: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Execution

Page 16: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Execution Completed

Page 17: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Data Movement

Page 18: Design and Implementation of Frameworks for Distributed Interactive Applications

ResourceManager

(REMULAC)

MappingEngine

CallingObject

ObjectSection

StreamReceiver

StreamSender

QualityModulator

ObjectSection

Object

Distributed Shared State System

ObjectSection

Data Display

Page 19: Design and Implementation of Frameworks for Distributed Interactive Applications

Mapping a Method Invocation to Optimize User Satisfaction

• Degrees of freedom– Binding of call to implementation– Mapping of execution to a node– Quality modulation parameters

• Constraints– Available resources and implementations– Space of quality modulation parameters

Page 20: Design and Implementation of Frameworks for Distributed Interactive Applications

The Mapping EngineMapping Request

ResourceInfo

Dist.Info

MeasuredUser Satisfaction

UserPrefs

ApplicationQuality ParameterConstraints

AvailableImplementations

ApplicationQualityParameters

Binding

Mapping

Page 21: Design and Implementation of Frameworks for Distributed Interactive Applications

Structure of the Mapping Engine

Cur

rent

Sta

te

Objective Function(Estimates User Satisfaction)

ResourceInfo

Dist.Info

MeasuredUser Sat.

UserPrefs

Selection Heuristic

•AQPs•Binding•Mapping

UserSatisfactionEstimate

Mapping RequestAQP ConstraintsImplementation

Constraints

Page 22: Design and Implementation of Frameworks for Distributed Interactive Applications

AQP1

AQP2

AQPn

Com

pres

sion

Est

imat

or

Res

pons

e T

ime

Est

imat

or

Mapping

Distribution Resources

Sat

isfa

ctio

n E

stim

ator

User Satisfaction

User Prefs

Binding

Page 23: Design and Implementation of Frameworks for Distributed Interactive Applications

AQP1

AQP2

AQPn

Com

pres

sion

Est

imat

or

Res

pons

e T

ime

Est

imat

or

Distribution Resources

Sat

isfa

ctio

n E

stim

ator

User Satisfaction

User Prefs

Mapping

Binding

Page 24: Design and Implementation of Frameworks for Distributed Interactive Applications

AQP1

AQP2

AQPn

Com

pres

sion

Est

imat

or

Res

pons

e T

ime

Est

imat

or

Distribution Resources

Sat

isfa

ctio

n E

stim

ator

User Satisfaction

User Prefs

Mapping

Binding

Page 25: Design and Implementation of Frameworks for Distributed Interactive Applications

AQP1

AQP2

AQPn

Com

pres

sion

Est

imat

or

Res

pons

e T

ime

Est

imat

or

Distribution Resources

Sat

isfa

ctio

n E

stim

ator

User Satisfaction

User Prefs

Mapping

Binding

Page 26: Design and Implementation of Frameworks for Distributed Interactive Applications

AQP1

AQP2

AQPn

Com

pres

sion

Est

imat

or

Res

pons

e T

ime

Est

imat

or

Distribution Resources

Sat

isfa

ctio

n E

stim

ator

User Satisfaction

User Prefs

Mapping

Binding

Page 27: Design and Implementation of Frameworks for Distributed Interactive Applications

AQP1

AQP2

AQPn

Com

pres

sion

Est

imat

or

Res

pons

e T

ime

Est

imat

or

Distribution Resources

Sat

isfa

ctio

n E

stim

ator

User Satisfaction

User Prefs

Mapping

Binding

Page 28: Design and Implementation of Frameworks for Distributed Interactive Applications

When a method is invoked on the model, choose AQP1…AQPn, mapping, and binding such that the satisfaction estimate is maximized given the contraints imposed by the ranges of AQP1…AQPn , the available candidate mappings, and resource availability and state distributions.

Over the lifetime of application execution, modify the user satisfaction transfer functions based on changing User Preferences, improve the Satisfaction Estimator based on actual measured Satisfaction, and improve the Response Time Estimator based on actual response time measurements.

Page 29: Design and Implementation of Frameworks for Distributed Interactive Applications

Extending OMG CORBA IDL for My Nefarious Purposes

• Interface options

• Variable size arrays

• State declarations

• Operation state use declarations

Page 30: Design and Implementation of Frameworks for Distributed Interactive Applications

Interface Options

• Object attributes– Serializeable, Mobile, Persistent, Secure,

Replicable

• Communication attributes– HTTP, UDP, TCP– ConnectionOriented

• Nannyed

• Distributed

Page 31: Design and Implementation of Frameworks for Distributed Interactive Applications

Interface Option Examples

interface Quoter [TCP, HTTP] { … }

interface AudioSimulation2D [Nannyed, Distributed] { }

interface ConvolutionEngine [Nannyed, Replicable] { }

Page 32: Design and Implementation of Frameworks for Distributed Interactive Applications

Variable sized arrays

struct ImpulseResponse {

unsigned long numsamples;

double sample[variable:numsamples];

};

Page 33: Design and Implementation of Frameworks for Distributed Interactive Applications

State Declarationsinterface AudioSimulation2D [Nannyed, Distributed] {

state SpaceAttributes {unsigned long numboundaryrects;unsigned long sizex;unsigned long sizey;

};state SimulationSpace {

double space[3][variable:sizey][variable:sizex];};state ImpulseResponses {

ImpulseResponse responses[variable:num_sources] [variable:num_listeners];

};

Page 34: Design and Implementation of Frameworks for Distributed Interactive Applications

State Use Declarations

interface AudioSimulation2D [Nannyed, Distributed] {

void Compute(in unsigned long numiters)

reads {SpaceAttributes,SourceAttributes,

ListenerAttributes,BoundaryInfo}

writes {SimulationSpace, ImpulseResponses}

modifies {SimulationAttributes} ;

Page 35: Design and Implementation of Frameworks for Distributed Interactive Applications

Method Invocation Throughput

Description Rate (Kcall/s)CompilerCall(Intrathread only)

32000

StreamCall(Intrathread withMemoryStreams)

250

StreamCall(Intrathread withoptimization)

20000

StreamCall(Interprocess TCP usingpersistent connections)

11.1

Null Call, No Arguments, 200 MHz Ppro, NT 4.0, VC++ 4.2

Page 36: Design and Implementation of Frameworks for Distributed Interactive Applications

Data Transfer Throughput

Description MB/sIN 5.7OUT 9.4INOUT 7.3

Process to Process, 256 KB argument, No Conversion, 200 MHz Ppro, NT 4.0, VC++ 4.2

Page 37: Design and Implementation of Frameworks for Distributed Interactive Applications

Conclusions

• IDL compiler supports extensions

• Currently extending run-time

• …