120 likes | 232 Views
QoS Provisioning in CORBA Aspects & Composition Filters. Mehmet Aksit * [aksit@cs.utwente.nl] Ali Noutash + [ali_noutash@oti.com] Marten van Sinderen* [sinderen@ctit.utwente.nl] Lodewijk Bergmans* [lbergmans@acm.org] * University of Twente, Enschede, The Netherlands
E N D
QoS Provisioning in CORBAAspects & Composition Filters Mehmet Aksit * [aksit@cs.utwente.nl] Ali Noutash +[ali_noutash@oti.com] Marten van Sinderen* [sinderen@ctit.utwente.nl] Lodewijk Bergmans* [lbergmans@acm.org] * University of Twente, Enschede, The Netherlands + Object Technology Int. (OTI), Ottawa, Canada
Introduction • Context: AMIDST project: • QoS-aware Middleware • a generic, framework-based approach • Enhances middleware to reason about QoS requirements and meet those needs. • Architecture adopts a feed-back control loop. • This talk: • Propose Aspect-Orientation & Composition Filters • Motivate for enhancing middleware • with Specialized Composition Filters • for dedicated transport plugins
Aspect-Orientationa.k.a. Multi-Dimensional Separation (& Composition) of Concerns • Key characteristics • addresses tangled code if it is due to crosscutting concerns • by making each concern a module abstraction • concerns are structured along (multiple) separate dimensions • functional & non-functional • mapping between crosscutting concerns: • 1 class, n methods • n classes, n methods • wildcards • imposition of behavior • inverse dependencies because of m
AOP with Composition Filters external objects internal object(s) {… , … } A quick overview of features Example filter specs: BoundedBuffer assert:Error={ElemOk=>*}; sync:Wait={ FreeSpace=>put, ElemsLeft=>get, *\{put, get} }; cntr:Meta={ CntOn=>[*]stats.count }; disp:Dispatch={ [alloc]MemMan.*, inner.*, simpleBuf.* }; stats kernel SimpleBuf MemMan conditions
CORBA OCI Server Object Client Object ORB ORB Interface (IDL) GIOP (RPC Protocol) GIOP (RPC Protocol) Interface (IDL) Buffer Buffer Transport Layer Transport Layer Network
Aspects: • Buffering • Distribution • Synchronization Simplified OCI-IIOP interaction Receiving RPC Sending RPC 1 4 3 2 GIOP Call Receive (RPC-Message) Call writeBuffer (abstract) (buffer) Call Send (abstract) (RPC-Message) Call ReadBuffer (buffer) Interface (IDL) Buffer Buffer Buffer Buffer Send(buffer) { java.io.OutputStream out = socket_.getOutputStream(); out.write(buf.data(), pos(), length()); out.flush();} Receive(buffer){java.io.InputStream in =socket_.getInputStream(); int result = in.read(buf.data()} Transport Layer TCPIP (socket)
Simplified OCI-UDPIOP interaction Receiving RPC Sending RPC 1 4 2 3 GIOP Call Receive(RPC-Message) Error:Buffer isn't Full Call writeBuffer(buffer) Call Send(RPC-Message) Call ReadBuffer(buffer) Interface (IDL) Buffer Buffer Buffer Buffer Transport Layer UDPSocket.Receive (datagramPacket=1k) Socket.Send (datagramPacket=1k) UDPIP (socket)
OCI-UDPIOP implementation Receiving RPC quality of service access points (delegation points) GIOP Call Receive(RPC-Message) Call ReadBuffer(buffer) Interface (IDL) TCPIP Receive(dataUnit=%10Buffer) Receive(RPC-Message) Buffer Fork UDPIP Receive (dataUnit=%25Buffer) Dynamic transport wrapper Transporter() { loop(buffer isnot FULL) { Receive(dataUnit) prossesBuffer(dataUnit,buffer) if (buffer is Full) notify () } } Blocker() {Suspend()} readHeader (12Bytes,buffer) Read&DeleteBuffer (allBuffer,buffer)
Synchronization aspect attribute bufferSize /*determines the size of buffer */ attribute bufferCounter /*determines amount of data filled/red to/from buffer */ suspendCondition = (bufferCounter<bufferSize) Thread 1(main thread) Blocker(){ Suspend() } Thread 2 Transporter() { While (NOT suspendCondition) { receive/send (dataUnit) processBuffer(dataUnit,buffer) if (buffer is Full) notify () } /* End up the suspended main thread }
Composing QoS aspect with Synchronization aspect attribute bufferSize /*determines the size of buffer */ attribute bufferCounter /*determines amount of data to be filled/red to/from buffer */ suspendCondition = {bufferCounter<bufferSize} attribute EndOfNetworkProcess /* boolean variable to be set by QoS Manager attribute EndOfBufferProcess / * boolean variable to be set by GIOP suspendCondition= {suspendCondition AND EndOfNetworkProcess AND EndofBufferProcess) Thread 1(main thread) /* Block main thread*/ Suspend(); Thread 2 While (NOT suspendCondition) If (not endOfNetworkProcess) send /receive (data) If (not EndofBufferProcess) processBuffer(data,buffer) IF (EndOfSuspend) /* End up the suspended main thread Notify()
delegation Dynamic transport wrapper with Composition Filter Object Model Multithread (thread fork) dispatch filter(synchronization aspect) fork loop Wait filter (synchronization aspect) meta filter (synchronization aspect) IP Multicast transport dispatch filter(QoS and Synch aspects) TCPIP transport Dispatch filter (QoS and synch aspects) Processbuffer Send/receivedata UDPIP transport
Conclusions • We need dynamic adaptability for QoS provisioning • We need Aspect Oriented Transport Layer • We need Reflective Transport Layer • We need QoS access points in Transport Layer Future work • Implementing Transport wrapper • Implement run-time transport plug-ins • Implement Quality of Service access points 1) for switching Transport Plug-ins 2) Switching Buffering processes