Conference PaperPDF Available

Towards Unmanaged Multimedia Adaptations using Automated Aspect Weaving.

Authors:

Abstract and Figures

The goal of this research is to devise a new architecture for integrating aspect oriented methodologies existing in the software engineering community to develop an Adaptive Composition and Runtime Environment (ACRE) for unmanaged adaptation of multimedia applications. The architecture of ACRE presented in this paper can transform non-adaptive applications by injecting adaptive behaviors into them and then execute them in a QoS-aware manner. The integrated environment presented in this paper, works at the level of JVM and the underlying OS for application transformation and adaptive resource handling. The proposed environment can be used to provide a sufficient degree of user perceived QoS in smart home/ office environments, without programming adaptive behaviors in the applications.
Content may be subject to copyright.
Towards Unmanaged Multimedia Adaptations using
Automated Aspect Weaving
Muhammad A. Khan
Institute of Operating Systems & Computer Networks
Technical University of Braunschweig
Germany
khan@ibr.cs.tu-bs.de
Stefan Fischer
Institute of Telematics
University of Luebeck
Germany
fischer@itm.uni-luebeck.de
Abstract—The goal of this research is to devise a new architecture for integrating aspect oriented methodologies
existing in the software engineering community to develop an Adaptive Composition and Runtime Environment
(ACRE) for unmanaged adaptation of multimedia applications. The architecture of ACRE presented in this paper can
transform non-adaptive applications by injecting adaptive behaviors into them and then execute them in a QoS-aware
manner. The integrated environment presented in this paper, works at the level of JVM and the underlying OS for
application transformation and adaptive resource handling. The proposed environment can be used to provide a
sufficient degree of user perceived QoS in smart home/ office environments, without programming adaptive behaviors
in the applications.
Keywords – Aspects, Middleware, Adaptation.
1. INTRODUCTION
The existing Quality of Service (QoS) API’s need expert knowledge to program adaptive behaviors into the
applications, whereas in the future environments (like smart home/office) computers are becoming ubiquitous, and we
are likely to see a significant increase in the number of computing devices with a correspondingly increasing number
of applications and distributed interactions. This will render the design of adaptive applications very complex and their
interactions un-manageable, especially when certain quality of service is required. Since it is not possible to have that
many human experts to cope with this situation, the solution lies in development of systems which require no or
minimal user involvement to adapt their functionality to varying operating environments.
2. BACKGROUND AND RELATED WORK
Adaptive mobile applications are generally built using two approaches; either the adaptation is performed by the
system which underpins the application or the application itself monitors and adapts to change [1]. These two
approaches differ from each other in the levels of efficiency and flexibility. Programming adaptive behaviors into
applications is more efficient, but is practically very cumbersome, it is difficult for the application designer to predict
the runtime behavior of an application and in particular, to estimate all possible scenarios which can occur at runtime
on a system-wide basis [2]. Handling the adaptation responsibility to the underlying system (usually middleware) is
less efficient but more flexible, since the application code does not need to explicitly handle adaptive behaviors. Most
of the recent research has benefited from the latter approach by using different techniques to develop QoS middleware,
among which are included Meta Object Protocols (MOPS) [8] for separation of concerns and behaviors [9], reflection
[5] [6] and Aspect oriented Programming [7]. A wealth of research is available in literature, mainly in the area of
adaptive, reflective and in particular aspect oriented middleware, where specific languages for describing QoS aspects
[11] have been developed, and existing middleware has been custom tailored to provide QoS [12]. A comprehensive
comparison of different aspect weavers and aspect oriented middleware is provided in [13]. While different aspect
oriented middleware systems have their own pros and cons, a commonality found in them is the assumption that, the
applications running on top of such systems are using the API’s provided by the middleware. The systems based on
this assumption give the benefit of interoperability, and will generally be capable of adapting a wide range of
applications, if aspects are directly woven into the application code, this will be more efficient and will be feasible if
adaptation is required for a specific class of applications and can be used to transform non-adaptive applications into
adaptive ones. An example of this is found in TRAP/J project [10]. While TRAP/J can be used as a tool to make
applications adaptive, this requires selecting classes to be adapted and defining adaptive behaviors for them. Our
approach can be seen as an example of the same principles, however, since it is in the context of a framework (Java
Media Framework : JMF), where the structure of applications is pre-defined, it gives us the benefit of specifying
adaptive concerns at a higher level of abstraction and system-wide manner in the form of profiles and makes the
adaptations more self-managed, at the cost of limiting the applicability to a specific framework.
Adaptation, in all its forms (software, resource or service), affects multiple elements of a system and has been
identified as a cross-cutting concern, particularly in the context of pervasive computing [3]. Because managing a
system’s quality of service in a dynamic, adaptive way requires knowledge of both the applications and infrastructure,
middleware is the proper place to insert it. This needs to be done statically as well as dynamically, since QoS
management will depend upon design, configuration, deployment and runtime information [4]. The system we are
describing in this paper is although not a full fledged middleware, it features static customization and adaptive
(re)configuration and execution of applications as well as adaptive resource management.
3. ARCHITECTURE & IMPLEMENTATION OF ACRE
We implemented our test system using Java Media Framework (JMF), which defines a number of interfaces
abstracting different media processing components and devices, found as hardware in real life. The main components
of the Adaptive Composition and Runtime Environment (ACRE) are shown in Fig1 and Fig 2.
Profiles are described in xml and each profile describes a set of possibilities specific to a particular system element,
however, all the possibilities cannot be realized in all situations. Application profile describes the application category
Network Profile
Aspect Engine
JMF API Provided Application Code
Aspectized Code
M
a
pi
n
g
In
tr.
Fig 1: Static Customization
Application Profile
….Others….
Device Profile
Resource Monitor / Manager
Battery Network CPU RAM
Adaptation Engine Comm. Interface
Aspectized Code
Fig 2 : Dynamic Reconfiguration
Adaptation Preferences
Operating Context
(streaming media, email, point to point video etc) and possible operating modes (e.g, if the application is capable of
rendering more than one video formats). It also specifies the application priority indicator for each application, which
is a numeric value used by the resource manager to distribute resources across different applications at application
start-up time and then re-distribute during execution. The Network profile describes the types of network (e.g; LAN,
WLAN, GSM/GPRS) across which an application may switch during its life. This determines how expensive an
adaptation would be (since different networks may have different charging policies; connection-time based, amount of
data transmitted based or free of charge). The system can be extended to incorporate any other profiles.
The Mapping Interface maps these system-wide concerns onto provided application(s). Conflicting adaptation
requirements may arise when the user specified adaptation preferences to be taken into account at runtime, cannot be
realized by the possible reconfigurations mapped onto the code. In real implementation it means non-existence of
certain “adaptation hook” in the aspectized code to which an advice could be attached. The aspectized code produced
statically is reconfigured at runtime, taking into account adaptation preferences and checking the operating context of
the application. The differences between profiles used during static customization and adaptation preferences used at
runtime is that the profiles describe the ‘possibilities’ while the adaptation preferences are the user’s adaptation
requirements, all of which may or may not be realizable.
In actual implementation, adaptation requirements are translated onto different plug-ins of the JMF. Therefore the
process of mapping different profiles and preferences to make applications adaptive is effectively a two step process.
In the first step, aspects are generated from profiles and are woven across different plug-ins constituting a JMF
application. In the second step, adaptation preferences dynamically reconfigure the plug-ins. For example, normal
codecs are made rate-adaptive by inserting mechanism for frame dropping and adaptive bit-rate control, special effects
like converting a colored image to grey scale are adaptive enabled/disabled at runtime, while insertion of hooks takes
place statically. This reconfiguration of media processing elements facilitates fine-grain adaptation and management of
complete RTP sessions. In our test system, a receiver is always an ‘adaptation slave’ while the sender is the master, i-
e; if the adaptation is to be invoked because, only the receiver needs it (e.g, because of the low battery level or cpu
power dropping which are device-owned resources), it can send a request to the sender, and wait for the
acknowledgement of the adaptation request, however, if the sender wants to adapt, it will check the receiver but, does
not need to wait for the acknowledgement (it has the system state information). Our implementation benefits from
adaptation and resource management at two levels: adaptations inside the JVM and resource distribution at the
operating system level. In our test system, in addition to JVM, we are using linux virtual machines for resource
monitoring and (re)distribution among the applications.
4. CONCLUSIONS & OUTLOOK
0
10
20
30
40
50
60
70
80
90
1 2 3 4 5 6 7 8 9 101112131415161718192021222324252627282930313233343536373839404142
Time Points
CPU Load
0
1
2
3
4
5
6
7
8
9
10
% Packet Loss
Server CPU Load
Client CPU Load
% Packet Loss
Fig 3 : Sample Adaptation w.r.t bandwidth variations
The implementation was tested to adapt a pre-written (non-adaptive) video conferencing application transmitting
H.263 coded CIF size frames in WLAN, to adapt to bandwidth variations. The results are shown in the Fig 3.The
application was configured to adapt down (decrease frame rate) and adapt up (increase frame rate) according to the
two threshold values (arbitrarily set). As an example of adaptation policy in this case, reaching the upper threshold
value of percentage packet loss triggers the ‘adapt-down’ behavior, while staying in the ‘adapt-down state’ for five
consecutive time-points triggers the ‘adapt-up’ behavior. In Fig 3, ‘adapt-down’ is invoked at time-point 13, upon
crossing the threshold of 5% loss, and again at time-point 25, while ‘adapt-up’ is invoked at after 5 stable time-points
at 30.
In our current implementation, the ‘operating context’ shown in Fig 2, is limited to smart home WLAN, but will be
expanded to other environments in future. While the proposed environment facilitates adaptations with minimal user
involvement, the applicability is limited to applications written using JMF API. In our current implementation, the
adaptation policy is programmed statically in the Adaptation Engine. In order to make it more flexible, we are
implementing it in a more dynamic way, so that the current limitation is removed by remotely updateable policy. This
will entail investigating a compromise between the distribution of control between the user preferences and
administratively updatable adaptation policy, such that the system as a whole still relies on minimal user involvement,
while resorting very little to some sort of administrator for updateable adaptation policy. This will be a very limited
compromise on autonomy of the system, thus keeping it significantly distinguished from other approaches requiring
the user to program adaptation behaviors, while offering comparable flexibility.
REFERENCES
[1] C. Efstratiou, K. Cheverst, N. Davies and A. Friday, “Architectural Requirements for the Effective Support of
Adaptive Mobile Applications”, Middleware 2000.
[2] M. A. Khan and S. Fischer, “A Reflective Runtime Environment for Dynamic Adaptation of Streaming Media on
Resource Constrained Devices”, (HICSS-38), 2005.
[3] A. Rashid and G. Kortuem, “Adaptation as an Aspect in Pervasive Computing”, Workshop on Building Software
for Pervasive Computing, (OOPSLA 2004)
[4] G. Duzan, J. Loyall, R. Schantz, R. Shapiro and J. Zinky, “Building Adaptive Distributed Applications with
Middleware and Aspects”, (AOSD 2004).
[5] G. Blair, G. Coulson, N. Davies, P. Robin and T. Fitzpatrick, “Adaptive Middleware for mobile Multimedia
Application”, (NOSDAV, 1997)
[6] David, P.C., Ledoux, T., Bouraqadi-Saadani, M.N., “Two-step Weaving with Reflection using AspectJ”,
(OOPSLA 2001)
[7] G. Kiczales et al, “Aspect Oriented Programming”, (ECOOP 1997)
[8] G. Kiczales, J. Rivieres and D. Bobrow, “The Art of Metaobject Protocols”, MIT Press, 1992
[9] A. Oliva and L. E. Buzato, “Composition of Metaobjects in Guarana”, (COOTS 1999).
[10] S. M. Sadjadi, P. K. McKinley, B. H. C. Cheng and R. E. K. Stirewalt, “TRAP/J: Transparent Generation of
Adaptable Java Programs”, (DOA-2004)
[11] J. P. Loyall et al, “QoS Aspect Languages and Their Runtime Integration”, 4th Workshop on Languages,
Compilers, and Run-time Systems for Scalable Computers, 1998.
[12] N. Wang et al, “Total Quality of Service Provisioning in Middleware and Applications”, The Journal of
Microprocessors and Microsystems, Elsevier, vol. 26, number 9-10, January 2003.
[13] N. Loughran et al, “Survey of Aspect-oriented Middleware”, http://www.comp.lancs.ac.uk/computing/aop/
ResearchGate has not been able to resolve any citations for this publication.
Article
Full-text available
Adaptation is one of the key characteristics of pervasive computing applications. However, implementing adaptation using conventional development techniques is challenging as adaptation requirements tend to affect multiple elements of a pervasive environment. In this paper, we present our experience with implementing adaptation using aspect-oriented programming (AOP). We argue that the use of AOP not only provides an improved modularisation of the adaptation concern but also makes it easier to adapt the pervasive application to both changes in data and reorganisation of the pervasive environment itself.
Conference Paper
Full-text available
Middleware technologies allow the development of distributed applications without explicit knowledge of the networking involved. However, in the face of changing network and CPU conditions across the distributed system, these applications often will need to adapt their behavior to maintain an acceptable quality of service (QoS), which implies a knowledge of these conditions. This adaptation is neither part of the application logic nor part of the distribution middleware, and so represents a separate concern which needs to be addressed.This paper describes an aspect-based approach to programming QoS adaptive applications that separates the QoS and adaptation concerns from the functional and distribution concerns. To simplify aspect development for these applications, our approach integrates a domain-specific adaptation specification with a novel aspect language which includes distribution and adaptation-specific join points in its join point model. We compare and contrast this with existing aspect-oriented language approaches and illustrate our approach with an example distributed system application.
Article
Full-text available
Mobile applications are required to operate in environments that change. Specifically, the availability of resources and services may change significantly during typical system operation. As a consequence, mobile applications need to be capable of adapting to these changes to ensure they offer the best possible level of service to the user. Our experiences of developing adaptive applications have led us to believe that existing middleware fails to provide the necessary support for such applications. Moreover, we believe that current research in this area is also failing to address the core requirements of adaptive mobile systems. In this paper we present a set of requirements for future mobile middleware which have been derived by considering the shortcomings of existing approaches and the needs of application developers. Key among these requirements is the need to support coordinated action between application and system components and the resolution of conflicts caused by the need to adapt to multiple contextual triggers. The paper concludes with the presentation of an architectural framework within which middleware researchers can deploy solutions to the problems identified.
Conference Paper
Full-text available
. Distributed object middleware, such as CORBA, hides systemand network-specific characteristics of objects behind functional interface specifications. This simplifies development and maintenance of distributed objects, contributing to their growing acceptance. Critical applications have Quality of Service (QoS) requirements, however, such as real-time performance, dependability, or security, that are hidden by middleware. Because of this, application developers often bypass distributed object systems, thus gaining little or no advantage from the middleware. We have developed Quality Objects (QuO), a framework for developing distributed applications with QoS requirements. QuO provides a set of aspect languages, called Quality Description Languages (QDL), for specifying possible QoS states, the system resources and mechanisms for measuring and controlling QoS, and behavior for adapting to changing levels of available QoS at runtime. This paper describes QuO's aspect languages, their usa...
Book
The authors introduce this new approach to programming language design, describe its evolution and design principles, and present a formal specification of a metaobject protocol for CLOS. The CLOS metaobject protocol is an elegant, high-performance extension to the CommonLisp Object System. The authors, who developed the metaobject protocol and who were among the group that developed CLOS, introduce this new approach to programming language design, describe its evolution and design principles, and present a formal specification of a metaobject protocol for CLOS. Kiczales, des Rivières, and Bobrow show that the "art of metaobject protocol design" lies in creating a synthetic combination of object-oriented and reflective techniques that can be applied under existing software engineering considerations to yield a new approach to programming language design that meets a broad set of design criteria. One of the major benefits of including the metaobject protocol in programming languages is that it allows users to adjust the language to better suit their needs. Metaobject protocols also disprove the adage that adding more flexibility to a programming language reduces its performance. In presenting the principles of metaobject protocols, the authors work with actual code for a simplified implementation of CLOS and its metaobject protocol, providing an opportunity for the reader to gain hands-on experience with the design process. They also include a number of exercises that address important concerns and open issues. Gregor Kiczales and Jim des Rivières, are Members of the Research Staff, and Daniel Bobrow is a Research Fellow, in the System Sciences Laboratory at Xerox Palo Alto Research Center.
Conference Paper
Over the past few years, a considerable amount of effort has been made in improving the QoS in computer networks. The associated problems become further complicated when the applications are resource intensive, links involved are wireless and the applications are required to execute on small mobile devices (e.g; PDAs). In such scenarios, the applications are desired to adapt to changing network/environmental conditions to give a relatively stable user perceived QoS or in the worst case, go for a graceful degradation. In this paper we describe the architecture, implementation and evaluation of our adaptive runtime environment (ARE) which runs on top of JVM. We exploit application-side adaptation and our approach is based around aspect oriented programming (AOP) to design a reflective runtime environment, spatially and temporally optimized for small foot-print devices. A key feature of this environment is that it is completely free of any user involvement for QoS specification, even then, intelligent enough to make any a/v application adaptive.
Article
The traditional approach to developing middleware platforms is to adopt a “black box” philosophy whereby the platform offers a fixed programming model to applications together with fixed per-platform implementations. In this paper, we describe research which is exploring an open approach to the implementation of middleware platforms. Our motivation is to accommodate the demanding requirements for quality-of-service (QoS) adaptation as imposed by mobile multimedia applications. We use an extended CORBA computational model featuring the concept of explicit open bindings. This provides an architectural framework for openness and QoS adaptation. The paper concludes by considering the more general application of an open systems philosophy; in particular, we introduce the concept of reflective middleware
Article
The traditional approach to developing middleware platforms is to adopt a `black box' philosophy whereby the platform offers a fixed programming model to applications together with a fixed per-platform implementation. In this paper we describe research which is exploring an open approach to middleware implementation. Our motivation is to accommodate the demanding requirements for quality of service adaptation which are imposed by mobile multimedia applications. We use an extended CORBA computational model which supports the concept of explicit open bindings which provide an architectural framework for openness and quality of service adaptation. The paper offers examples of the programming style facilitated by our architecture and reports on our implementation experience to date. 1. INTRODUCTION Middleware has emerged as a key architectural component in supporting distributed applications. The role of middleware is to present a unified programming model to application writers and to m...
  • G Kiczales
G. Kiczales et al, "Aspect Oriented Programming", (ECOOP 1997)