
| Interface name | amp; Description | amp; Applicable classes |
| compress | amp; Apply a lossless compression to the media | amp; uncompressed media |
| scale | amp; reduce media to display in a smaller size | amp; Video, Images |
| reduce | amp; Apply lossy compression | amp; all |
| toAscii | amp; Translate media into some ASCII equivalent, typically a description of what the media represents | amp; all |
| toBmp | amp; Convert an image to an X-Bitmap | amp; image |
| toGiff | amp; Convert an image to a Giff | amp; image |
| toHtml | amp; Convert a media to some html representation | amp; all |
| toProgressive | amp; Convert a JPEG to a progressive scan representation | amp; JPEG |
| toBaseline | amp; describe JPEG using Huffman coding only | amp; JPEG |

The decision about what set of transformations to apply to a given piece
of multimedia is made within the applet. This decision comes from the interpretation
of an instance of what we have termed the Media Policy Language mpl.
This script is at the heart of the configurability of our system it weaves
the transformations and media together. As the name suggests, mpl defines
policies on what to do to media in particular situations of bandwidth availability
and display characteristics described in section below.
The policy objects have been used to control the preferences users have in how images are viewed across the Web. However, the principle applies equally to other multimedia application (networked or otherwise) and indeed to any application that wants to scale it's interface. User, authorial and default policies could be devised to allow an application's widgets to present themselves in a sensible manner on differing platforms and visual displays.
The mpl is a rule based language that allow the mapping of certain actions or mutations to specific groups or subgroups of media according to the various current networking and display conditions.
The general format is:
path : condition : action [, submission]
Path means apply action to the specified media type if the condition is true and some rule belonging to a different rule group doesn't override the path. Conditions are legal boolean expressions.
We use environment variables to hold values of networking and
display conditions and attributes of the media, as determined by the run-time
environment (Sharples,
1997). Each environment variable has a unique name and has a type.
Currently variables are:
FILESIZE - int
MEDIA-HEIGHT - int
MEDIA-WIDTH - int
MEDIA-DEPTH - int
DISPLAY-WIDTH - int
DISPLAY-HEIGHT - int
DISPLAY-DEPTH - int
BANDWIDTH - int (in Bytes/second)
RATE - int (flow rate for streams eg. frames per sec)
MIME - string (mime type of media object)
META - string (used for passing any other info)
Actions are compress (lossless), reduce (quality: lossy compression), scale (Dimension), and transform (from one media to another) etc, as in Table 1.
For instance, if a user wishes to compress all objects over 10k
media.* : SIZE >= 10*1024 : compress
or if a user has a monochrome browser
media.image.* : true : toMono
or for a more complicated expression when the browsers is always used over low bandwidth links.
media.image.jpeg : meta(progressive) == false : toProgressive, submit
default
media.* : true : scale 75, submit author media.* : true : reduce
50, submit author
media.* : true : compress 10
Policies can be combined with information to the environment to select paths of degradation depending upon the available constraints, so if the user wishes to ensure that all download times are less than five seconds, they first attempt to reduce the quality, then if this fails, they scale the object, using the resolution process (described below),
media.* : SIZE/BANDWIDTH>5 : reduce 50
media.* : SIZE/BANDWIDTH>5 : scale 75
media.* : true : compress 10
An author's policy to make sure that a JPEG fits in the available space:
media.image.jpeg."www.site.org/pics/mypic.jpeg" : MEDIA-WIDTH >
DISPLAY-WIDTH : scale (MEDIA-WIDTH / DISPLAY-WIDTH)
When the policy is activated (asked to transform its media), it goes through a number of parsing and resolution phases. These phases determine which rules are relevant to the associated multimedia object, which rules can be removed or overridden by others and they establish a definitive precedence order between rules from different policy sources.
Initially any rule which applies to media other than that of the attached
multimedia object are removed. Then rules which clash are resolved according
to the following criteria:
\begin{description}
| Transformation | Transformation involves firing rules that transform the multimedia object from one type in the media hierarchy (figure 1). Rules that utilise the transformation interface are key to the writing of policies that cope with difficult display attributes and location dependant data. |
| Reduction | Reduction involves firing rules that utilise the reduce interface thus reducing the quality of the attached multimedia object and so improving down load time. The reduction phase is a multi-pass operation. Each pass of the rules further reduces the multimedia object. Passes are repeated until no rule is fired, that is, all of the media's size and quality requirements are met. Of course this may never happen! So, the multi-pass mechanism is constrained by a set of heuristics which can identify looping, the exhaustive limits of compression and rules which reduce the multimedia object to the edge of our perception. |
| Scaling | Scaling is the process of altering the dimension of the Media. Images are scaled in the X,Y dimension as are Video (although they also have the frames per second dimension). For some media types scaling is not meaningful or takes on a different meaning. For example it is not meaning to scale ASCII and it only meaning to scale audio in terms of amplitude or tone -- qualities that can be adjusted to suit the user, but do not effect the download time. |
| Compression | Compression is a simple one-pass treatment of using non-lossy compression where possible. Media that benefit from this are those which, unlike JPEG and MPEG, do not support their own compression technique. Anything under the mime type mime:text/* can benefit from the use of non-destructive compression (The GZIP compression utility is used as a publically available non-destructive algorithm). |
This multi-phase multi-pass process of resolution is at the heart of
what makes the policy work. It combines the disparate needs of user, author
and the system designers.
``An adaptive application is one in which the application changes its behaviour according to the perceived constraints in the environment, so as to maintain the semantics of the application for the user.''

If we take the above definition as our starting point, then we can immediately break the problem of designing an adaptive application into various stages. The constraints in the environment for the application should first be determined. For mobile computing applications, the likely constraints are network quality of service, battery power and display capabilities.
We must next define the semantics of the application. What is the application trying to achieve? This is user and task specific, and can vary from context to context. As we will argue, the more generic the application, the more difficult it is to determine the application semantics. Having made a best guess at the semantics, a design goal is to ensure that the semantics of the application remain invariant across the constraint-reacting behaviours of the application. By doing so, we hope that the utility of the application to the user remains high.
In order to maintain the semantics, the changes in behaviour
of the application should ensure that the application continues to work
whilst adapting to the changing constraints. If the behaviour is changing
to adapt to a restriction of some needed resource, such as bandwidth, the
change should inflict the minimum damage upon the essential functionality
of the application. This leads us to a solution in which the implementation
of the application should be opened up so as to allow the choice of some
equivalent but less resource-hungry implementation. We thus come to the
first design point in our methodology -
For more complex applications, each component may provide other choices of implementation which are orthogonal to each other in that they can reduce resource usage in different ways. If we can add redundancy to the speech encodings, using some of our bandwidth to provide data to repair lost packets at the expense of greater latency, then we provide another set of choices of about how to use valuable bandwidth.
If we regard each component as supplying an OI interface which can be adjusted independently of the other components, the designer thus has a choice over each component of an implementation. The number of independent axes which contain implementation choices is the degree of freedom of the application. Adjusting the Open Implementation of a component can be viewed as placing the component at some new point in the space of (implementation choice, resource usage, application utility) space. As we select a new set of implementation choices to decrease the resource usage of a component, we generally decrease the utility of the overall application.
Thus for each of the possible implementations of the component, we could
theoretically measure the utility of the resultant application. The designer
must understand this space of possible implementations, for it is from
this set of implementation choices that the designer chooses a path of
degradation in the face of resource constraints.
Design-time behaviours include the use of reactive protocols in the face of congestion, such as in the video conferencing tools vic and ivs. These are fixed policies of degradation, or fixed trajectories through the implementation space. In general design-time policies are easier to encode.
However, as the applications become more generic and are used for more
disparate tasks, then the semantics of the application are increasingly
determined by the context of use, and the utility of the application is
difficult to pinpoint. An application which simply reports the state of
some object has simple semantics and will only be used in a very limited
set of contexts, and thus the behaviour can be pre-determined. The user
can either have an update or not. On the other hand, a web browser is used
by users in many different ways \cite{light98:_inter_web,marchionini96:_brows},
( Light 1998 ;)and the semantics
of the retrieved pages depend highly upon context. As designers, we can
only make best guesses about the utility of various implementations, and
so we can only select trajectories through implementation space that approximate
the profile of some imaginary user. In real situations, we must allow users
to override profiles to determine which aspects of the application semantics
are important to them at run-time.
The choice of fixed trajectories has a large impact on whether users
will use an application and so is a very important part of the design process.
We believe that the context and associated semantics can only be determined
by users, so as designers we must bring users into the design process.
If possible, we should study them \emph{in situ}, but if this is not feasible
due to project budgetary constraints they should at least be used in experimental
mock-ups.
The open implementation of the components provides abstractions within the application domain to allow manipulation of behaviour. However, these abstractions may be far removed from the experience and understanding of the user. In particular, the various nuances and abstractions of networked and distributed applications are rarely understood by programmers, so it is unlikely the the user will be able to comprehend behaviour specification in terms of networking abstractions.
Instead, the abstractions of the application must be mapped from the
system image onto metaphorical controls which build upon the experiences
of the user. By using metaphors from the experience of the user, we can
educate the user to have an appropriate mental model of the application
(Clarke and Sasse, 1997).