\section{Application Scenarios}
\label{scenarios}

Hive has been utilized in a number of other applications in addition
to the kitchen demonstration described in Section \ref{netkitchen}.
These systems have provided further examples of Hive's capabilities.


\subsection{``Honey, I Shrunk the CDs''}
\label{jukebox}

\pmarginpic{hivejpdemo.ps}{``Honey, I Shrunk the CDs'' demo}

Consider a bowl full of small discs, each representing a song or
artist.  One of these discs is selected and placed on a surface in
front of the bowl.  The corresponding music plays, and the disc is
thrown back in the bowl.

\par

As a demonstration of Hive, a music playing system,
``Honey, I Shrunk the CDs''\footnote{In reference to the film ``Honey,
I Shrunk the Kids''\cite{histk}}, was developed.  This was a system of
three agents and two shadows constructed to provide a novel interface
to playing music.

\par

The demonstration was composed of a Radio Frequency Identification
(RFID) tag reader which had a series of small circular tags with a
resemblance to small CDs (hence the name of the system) and an MP3
based jukebox.  Figure
\ref{histcdsfig} shows the basic software configuration for the
scenario represented by ``Hive Cell 1'' and ``Hive Cell 2''.  ``Hive
Cell 3'' shows the extensions made to the system, as discussed in
Section \ref{scenextend}.

\begin{figure}[hbt]
\begin{center}
\mbox{\epsfxsize=5in \epsfbox{histcds.ps}}
\end{center}
\caption{``Honey, I Shrunk the CDs'' software configuration}
\label{histcdsfig}
\end{figure}

The three agents, shown in cells 1 and 2 of the figure were the {\em
TagReaderAgent}, which watched the tag reader for the appearance of
disappearance of tags, the {\em JukeboxAgent}, which was responsible
for playing requests, reporting songs played and reporting when the
end of a song was reached, and the {\em HoneyIShrunkTheCDs} agent,
which managed the entire application.  Each of the {\em JukeboxAgent} and
{\em TagReaderAgent} communicated with a corresponding shadow.

\par

The {\em HoneyIShrunkTheCDs} agent contained all of the real
application intelligence for this scenario.  On startup, it would do a
series of lookups using the lookup system described in Section
\ref{semantic} to locate the demonstration system tag reader and the
jukebox, and would connect itself to each.  If one or neither was
available, it would wait until they were.  Once these connections were
established, it would translate incoming information about the tags on
the tag reader into either changes in its internal state (such as
whether the request should be continuous or one time only), or
requests to the jukebox to play a song.

\par

While a very simple application, it proved to be a good test of the
stability of the Hive software over long periods of time.  The
demonstration system ran continuously for weeks under regular use,
without any substantial problems, including successfully handling
numerous interactions that were intended to crash the system, as well
as many less maliciously intended extensions to the system, as
described below.

\subsubsection{Extending the Scenario}
\label{scenextend}

Once the scenario was in regular use, a number of extensions were
implemented.  Some of these were for actual use, to make the system
more useful as a jukebox in a public space, and others were simply to
show what was possible.

\par

The first extension was string based control of the jukebox.  Often,
it was desirable to request a particular song without associating a
particular RFID tag with that song.  This was accomplished without
writing any new code; A {\em StringSendingAgent}, which allows a user
to enter a string, could simply be connected to the {\em JukeboxAgent}
and songs could be requested by name.  This exhibited one of the key
features that Hive was designed for: ability for interaction between
components that weren't conceived of as interacting when they were
first designed.  The Jukebox was designed with only the tag reading
system in mind, and the string sending agent was a simple standard
utility agent.

\par

Second, as a demonstration of the ease of interoperability, a bar code
reader was able to be put into the setup in the same role as the RFID
tag reader.  Just as the {\em HoneyIShrunkTheCDs} agent translated
RFID tags into song names, it could do so (once again, with no code
modifications) for bar codes.

\par

\pmarginpic{brb.ps}{The ``Big Red Button''}

Finally, the ``Big Red Button'' was hooked up to cause the jukebox to
play a random song.  This required minimal code modifications, as the
button agent did not generate string events, as the tag reader, bar
code reader and string sending agents did.  It also could have been
accomplished with no code modification and the creation of a new agent
which would monitor the button and submit new requests to the jukebox.

\par

In order for this system to be useful as a mechanism for playing music
as well as as a demonstration system, even more convenient interfaces
need to be constructed.  Currently, control of the system is either
through the tag reader, or by starting a Hive cell with local agents,
such as a string sender, and connecting to the jukebox.  More
convenient for most users would be a web browser based interface.  The
beginnings of a web based mechanism for controlling agents has been
implemented and it will be straightforward to utilize in this
scenario.

\subsection{Personal Location using RF Locusts}
\label{wearable}

Another application of Hive was the implementation of a personal
location service using RF Locusts\cite{locusts} and a wearable
\marginpic{wearable.ps}{Brad Rhodes with wearable\\{\small Photo credit: Webb Chappell}}
computer, by Brad Rhodes.  A ``locust'' is a device which transmits
a location beacon.  The original locusts did so using infrared, and a
later revision\cite{rflocusts} transmitted RF at 416 MHz.  A user with
a wearable computer receives this transmission, and can
identify its location.  The wearable computer then chooses how to
utilize this information, whether to publish it for consumption by
outside applications, or to act on it.

\par

Hive enables sophisticated actions to be performed based on this data.
A simple initial application caused a particular song to be played on a
jukebox (the same code as the one in the previous example) when a
person arrived in a particular room.  Additionally, Hive allows for
easy selection of whether or not to make the location available to the
outside world.  The case of the arrival song is an example of limited
publication.  In this case, entering a particular room, causes an
action, which may been caused by another source, and entering other
rooms may not cause any effect.

\par

Additionally, further development of this scenario will utilize the
location component of semantic descriptions to allow a wearable to
identify resources available to it when it enters a particular room.
That is, a room may have a jukebox, display, or other devices that the
wearable could utilize if it was ``aware'' of the fact that it is in
the same room.  Hive and semantic descriptions enable this.  This is
discussed in more detail in \cite{hivelocusts}.

\subsection{Hive Demonstration System}

A Hive demonstration system was constructed with a variety of generic
devices to use to exhibit Hive's features.  These included a number of
screen based agents as well as a number of physical devices.  The
screen based agents included buttons, image displays, flashing dots,
and string inputs.  The physical devices included the ``Big Red
Button'', a toggle switch, a ``Tickle Me Cookie Monster'', a AC relay
\marginpic{cookie.ps}{``Tickle Me Cookie Monster'' with electronic guts}
used to toggle a light, a number of cameras, a motion detector, and a
cricket\cite{crickets} (a small lego robot).

\par

These devices were connected together in a wide variety of ways.  Most
of the connections were one-to-one connections of the various event
sources to the event receivers.  Examples included the big red button
causing cookie monster to laugh, using the toggle switch, or cookie
monster's tickle sensor to trigger a light, using the motion detector to
trigger movement of the cricket, and use of the button in the Cookie
Monster doll to cause a picture to be taken.  This demonstration
showed the flexibility of Hive in connecting devices in ways not
anticipated in the device's original design.

\subsection{Other and Future Work}

A number of other projects within the Media Lab are utilizing Hive.
Craig Wisneski has built a variety of tangible interfaces that are
connected to Hive.  Brygg Ullmer is developing ``Strata'', a project
exploring the design of layered, electronically-augmented physical
models that serve as tangible interfaces to specific dataspaces, that
uses Hive to connect displays to data sources.  

\par

Future applications of Hive may include connecting Brad Geilfuss' Net
\marginpic{netweight.ps}{Net Weight prototype}
Weight and Inner View\cite{netweight} projects, as well as providing
low-level transport mechanisms for Hive, such as via Hyphos, by Rob
Poor.
