international symposium on distributed objects and applications (doa 2002) metasockets metasockets...

15
International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services S. M. Sadjadi, P. K. McKinley, E. P. Kasten Software Engineering and Networking Systems Laboratory Department of Computer Science and Engineering Michigan State University www.cse.msu.edu/sens

Upload: miranda-may

Post on 03-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

International Symposium on Distributed Objects and Applications (DOA 2002)

MetaSocketsMetaSocketsRun-Time Support for

Adaptive Communication Services

S. M. Sadjadi, P. K. McKinley, E. P. Kasten

Software Engineering and Networking Systems Laboratory

Department of Computer Science and Engineering

Michigan State University

www.cse.msu.edu/sens

Page 2: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

Motivations Mobile computing applications must adapt to

the dynamic situations related to several cross-cutting concerns including:– Quality of Service– Security– Energy Consumption– Fault Tolerance

Solution?– Adaptive Middleware.

Page 3: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

Our Approach RAPIDware Project:

– Addresses the design of adaptive software. Adaptive Java (AJ):

– An extension to Java that provides language constructs and compiler support for developing adaptive software (previously done).

MetaSockets:– An adaptable communication component

developed in AJ as the heart of our Adaptive Middleware.

Page 4: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

Adaptive Java Background Adaptable Component Model:

– Component: the basic building block that can be equated to adaptable classes (composed of invocations).

– Meta-Object Protocol: a set of meta-level primitives (refractions and transmutations).

Page 5: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

Adaptive Java Background (cont.) Three-Dimensional Interfaces:

– Invocations: normal component imperative operations.– Refractions: operations for inspecting components.– Transmutations: operations for modifying components.

Component Absorption and Metafication:

send()

close()

joinGroup()

send()

close()

insertFilter()

removeFilter()

getStatus()

receive()

base-level invocation

send()

close()

transmutation

refraction

leaveGroup()

base-level method replaced invocation

Java MulticastSocket AJ SendMSocket Base-Component

AJ MetaMulticastSocket Meta-Compnent

Page 6: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

MetaSocket Internal Architecture

get()

get()

put()

put()

send()close()

Filter P

ipeline

put()

put()

get()

get()

receive()

joinGroup() close()

Filter P

ipeline

send()close()

receive()joinGroup()leaveGroup()close()

getStatus() getStatus()

insertFilter()removeFilter()

insertFilter()removeFilter()

FP

LP

Fltr

MT

SS

LP

FP

Fltr

MT

RS

invocationrefractiontransmutation

FP: firstPacketBuffer

SS: SendMSocketdependencypacket flow direction

RS: RecvMSocket

LP: lastPacketBufferFltr: Filter

MT: MetaSocketThread thread

MetaSendMSocketInternalArchitecture:

MetaRecvMSocketInternal Architecture:

Page 7: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

MetaSocket Absorption Codepublic component SendMSocket

absorbs java.net.MulticastSocket

{

/* constructor */

public SendMSocket(...)

{

setBase(new java.net.MulticastSocket(...));

}

/* invocations */public invocation void send(...) { base.send(...); }public invocation void close() { base.close(); }

}

Page 8: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

MetaSocket Metafication Codepublic component MetaSendMSocket metafy SendMSocket { /* constructor */ public MetaSendMSocket(SendMSocket sendMSocket) { setBase(sendMSocket); } /* invocation that "replaces" the send() invocation in SendMSocket */ public invocation void send(...) { ... firstPacketBuffer.put(packet); ... } /* refractions */ public refraction byte[] getStatus() { return filterPipeline.getStatus(); } /* transmutations */ public transmutation void insertFilter(int position, Filter filter) { ... filterPipeline.add(position, filter); ... } public transmutation Filter removeFilter(int position) { ... return filterPipeline.remove(position); } /* private fields */ private java.util.Vector filterPipeline = new java.util.Vector(); PacketBuffer firstPacketBuffer = new PacketBuffer();}

Page 9: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

MetaSocket Evaluation Audio Streaming Application (ASA)

– MetaSocket is used instead of MulticastSocket– Live audio stream from a desktop to multiple

iPAQs– Physical experiment configuration:

Access Point

Wireless Receivers

Audio Stream

Wired Sender

...

Page 10: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

ASA Components Interaction

Wired Network Wireless Network

Trader

Filter P

ipelin

e

ComponentLoader

DecisionMaker(DM)

Player

EventMediator

LP

FP

MT

RS

PB

PB

AL

NL

FD

Dependency

Reflection

Event propagation

invocationrefraction and transmutationthread

AL: RecvAppLossDetectorFD: FECDecoderNL: RecvNetLossDetector

Page 11: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

ASA Components Decision Maker: a optional component that controls all the

non-functional behavior of the subcomponents in its container component, according to its rule-base.

Component Loader: a unique component in an address space that loads components from a trader, according to a set of policies.

Trader: a server that works as yellow pages and replies to component requests.

Event Mediator: Supports asynchronous interaction among decoupled components using a publisher-subscriber pattern.

Player: plays the incoming audio stream.

Page 12: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

Wireless networks produce dynamic and location dependent packet loss because of signal strength, interference, antenna alignment.

802.11b MAC layer does not provide link-level acknowledgement for multicast frames.

FEC can be used to improving reliability by introducing redundancy into the data channel.

Block Erasure Code Operation

Page 13: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

MetaFECEncoder: a component in AJ that absorbs a FECEncoder class. MetaFECDEcoder: a component in AJ that absorbs a FECDecoder class.

Forward Error Correction Filters

invocationrefraction

transmutation

FE: FECEncoder dependency

event propagation paththread

(a) MetaFECEncoder

start()stop() setSrcPacketBuffer()

setDstPacketBuffer()setNK()

FE

getSrcPacketBuffer()getDstPacketBuffer()getNK()

start()stop() setSrcPacketBuffer()

setDstPacketBuffer()setNK()

FD`

getSrcPacketBuffer()getDstPacketBuffer()getNK()

FilterMismatchEventFECMismatchNKEvent

FD: FECDecoder

(b) MetaFECDecoder

Page 14: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

MetaSocket Performance Evaluation FEC Filters inserted automatically at time 8, when loss rate exceeds 30%. FEC Filters removed automatically at time 45, when loss rate drops below 10%. Inserted again at time 60. Removed again at time 80.

Page 15: International Symposium on Distributed Objects and Applications (DOA 2002) MetaSockets MetaSockets Run-Time Support for Adaptive Communication Services

Conclusions and Future Directions Conclusions:

– Adaptive Java provides language support for run-time adaptation.– Experiments show that MetaSockets are an effective means to QoS-

oriented adaptation. Future Directions:

– A MetaSocket is only one type of adaptable components. Any AJ component can be metafied and adapted at run time.

– Other cross-cutting concerns (security, power consumption, and fault-tolerance) can be addressed with AJ components.

Acknowledgements: – This work was supported in part by the U.S. Office of Naval

Research under Grant No. N00014-01-1-0744, and in part by National Science Foundation grants CDA-9617310, NCR-9706285, CCR-9912407, EIA-0000433, and EIA-0130724.

– Special thanks to Dr. Kurt Stirewalt for his contribution to this work.