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
Interactive Application Model
User Action
Controller
View
Model(Simulation)
Execute This Code
Display ThisResponse
What’s Important
Controller
View
Model(Simulation)
How LongDoes It Take?
How DoesIt Look?
Digging Deeper
User Action
Controller
View
Procedure Call orMethod Invocation, pick your poison
Concentration
User Action
Controller
View
Controller
Rest of Talk
Distributed Interactive Applications: Freedom and Complexity
FlexibleMapping
??ControllerController
FlexibleBinding????
FlexibleData Movement
ResourceManager
(REMULAC)
MappingEngine
CallingObject
StreamReceiver
StreamSender
QualityModulator
Object
Distributed Shared State System
The Framework Behind The Call
State
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Shared State Objects
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Shared State Objects
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
User Action
Method Invocation
Method Invocation Begins
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Map Request
ResourceInfo
Dist.Info
Mapping the Invocation
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Adjust QualitySelect
RedistributeMove Args
Mapping the Invocation
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
MoveState
Data Movement
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Execution
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Execution Completed
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Data Movement
ResourceManager
(REMULAC)
MappingEngine
CallingObject
ObjectSection
StreamReceiver
StreamSender
QualityModulator
ObjectSection
Object
Distributed Shared State System
ObjectSection
Data Display
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
The Mapping EngineMapping Request
ResourceInfo
Dist.Info
MeasuredUser Satisfaction
UserPrefs
ApplicationQuality ParameterConstraints
AvailableImplementations
ApplicationQualityParameters
Binding
Mapping
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
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
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
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
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
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
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
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.
Extending OMG CORBA IDL for My Nefarious Purposes
• Interface options
• Variable size arrays
• State declarations
• Operation state use declarations
Interface Options
• Object attributes– Serializeable, Mobile, Persistent, Secure,
Replicable
• Communication attributes– HTTP, UDP, TCP– ConnectionOriented
• Nannyed
• Distributed
Interface Option Examples
interface Quoter [TCP, HTTP] { … }
interface AudioSimulation2D [Nannyed, Distributed] { }
interface ConvolutionEngine [Nannyed, Replicable] { }
Variable sized arrays
struct ImpulseResponse {
unsigned long numsamples;
double sample[variable:numsamples];
};
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];
};
State Use Declarations
interface AudioSimulation2D [Nannyed, Distributed] {
void Compute(in unsigned long numiters)
reads {SpaceAttributes,SourceAttributes,
ListenerAttributes,BoundaryInfo}
writes {SimulationSpace, ImpulseResponses}
modifies {SimulationAttributes} ;
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
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
Conclusions
• IDL compiler supports extensions
• Currently extending run-time
• …