20-10-2012, 02:01 PM
Fundamentals of Mobile and Pervasive Computing
Fundamentals of Mobile.pdf (Size: 240.56 KB / Downloads: 26)
Middleware for Application Development: Adaptation
and Agents
Application development for mobile computers is a difficult task—on
their own, applications are faced with a myriad of challenges: limited
power and processing speed, varying levels of network connectivity,
completely disconnected operation, and discovery of needed services.
The goal of mobile middleware is to provide abstractions that reduce
development effort, to offer programming paradigms that make developing
powerful mobile applications easier, and to foster interoperability
between applications. Service discovery, or the art of dynamically
discovering and advertising services, is the subject of the next chapter.
This chapter examines two other important types of middleware for
mobile computing—adaptation and agents. The first, adaptation, was
first discussed in Chap. 1. We revisit this topic in this chapter. Recall
that adaptation helps applications to deal intelligently with limited or
fluctuating resource levels. The second type of middleware, mobile
agents, provides a powerful and flexible paradigm for access to remote
data and services.
Adaptation
Mobile computers must execute user- and system-level applications
subject to a variety of resource constraints that generally can be ignored
in modern desktop environments. The most important of these constraints
are power, volatile and nonvolatile memory, and network bandwidth,
although other physical limitations such as screen resolution
are also important. In order to provide users with a reasonable computing
environment, which approaches the best that currently available
resources will allow, applications and/or system software must adapt to
limited or fluctuating resource levels. For example, given a sudden
severe constraint on available bandwidth, a mobile audio application
might stop delivering a high-bit-rate audio stream and substitute a
lower-quality stream.
The spectrum of adaptation
At one end of the spectrum, adaptation may be entirely the responsibility
of the mobile computer’s operating system (OS); that is, the software for
handling adaptation essentially is tucked under the OS hood, invisible
to applications. At the other end, adaptation may be entirely the responsibility
of individual applications; that is, each application must address
all the issues of detecting and dealing with varying resource levels.
Between these extremes, a number of application-aware strategies are
possible, where the OS and individual application each share some of
the burden of adaptation. While applications are involved in adaptation
decisions, the middleware and/or OS provides support for resource monitoring
and other low-level adaptation functions. The spectrum of adaptation
is depicted in Fig. 6.1. In this part of the chapter, we are concerned
primarily with middleware for adaptation, that is, software interfaces
that allow applications to take part in the adaptation process. Pure
system-level adaptation strategies, those which take place in a mobileaware
file system such as Coda (e.g., caching and hoarding), are covered
elsewhere in this book.
Characterizing adaptation strategies
The Odyssey project (Noble et al., 1997; Noble, 2000) at Carnegie Mellon
University was one of the first application-aware middleware systems,
and it serves as a good model for understanding application-aware adaptation.
In describing the Odyssey system, Satyanarayanan proposed several
measures that are useful for classifying the goodness of an adaptation
strategy. We describe these—fidelity, agility, and concurrency—below.
A sample Odyssey application
We now turn to one of the sample applications discussed in Nobel and
colleagues (1997): the xanim video player. The xanim video player was
modified to use Odyssey to adapt to varying network conditions, with
three fidelity levels available—two levels of JPEG compression and
black-and-white frames. The JPEG compression frames are labeled 99
and 50 percent fidelity, whereas the black-and-white content is labeled
1 percent fidelity. Integration of xanim with Odyssey is illustrated in
Fig. 6.3. A “video warden” prefetches frames from a video server with
the appropriate fidelity and supplies the application with metadata
for the video being played and with individual frames of the video.
More adaptation middleware
Puppeteer. For applications with well-defined, published interfaces, it
is possible to provide adaptation support without modifying the applications
directly. The Puppeteer architecture allows component-based
applications with published interfaces to be adapted to environments
with poor network bandwidth (a typical situation for mobile hosts) without
modifying the application (de Lara, Wallach, and Zwaenepoel, 2001).
This is accomplished by outfitting applications and data servers with
custom proxies that support the adaptation process. A typical application
adaptation under Puppeteer is a retrofit of Microsoft PowerPoint
to support incremental loading of slides from a large presentation or support
for progressive JPEG format to speed image loading. Both these
adaptations presumably would enhance a user’s experience when handling
a large PowerPoint presentation over a slow network link.