ALFred Documentation
The JukeBox application
The JukeBox is a client/server based application which allows to select
and play a remote audio clip. The set of audio clips are maintained by
the server which aims to transmit them to the clients.
Overview
Clients can send to the server the following information:
-
GetList: get the list of available audio clips
-
GetClipNumber X: get audio clip X
-
Pause: pause the audio playout
-
Cont: resume the playout (after a Pause)
-
Abort: abort the current audio transmission
The following data can be sent to the clients:
-
ListOfClips: A text describing the set of audio clips available
-
EndOfClip: to inform the client that the end of clip has been reached
-
RTP packets: the RTP-encapsulated
audio data
Basically, the server waits for clients' requests at a well known address
and port number. The first clients' action is to get the list of available
audio clips (GetList) from the server. When the client receives
the information (ListOfClips), it displays it to the user. The user
can select an audio clip in the list and request its transmission by the
server (GetClipNumber X). Then, the client runs automatically the
fphone audio tool with
the right parameters and the sender starts the audio transmission (RTP
Packets) . During the transmission phase, the client can request to
pause/resume or abort the transmission (Pause/Cont/Abort). When
the end of clip is reached, the server informs the client (EndOfClip)
in order it exits the fphone process.
Note that two different transmission protocols are required for this
application:
-
a reliable, non real-time transmission protocol to send the
commands GetList, GetClipNumber, Pause, Cont, Abort, ListOfClips, EndOfClip.
-
a semi-reliable, real-time, jitter-sensitive transmission
protocol to send audio data (RTP packets)
Automatic Implementation
Using ALFred, the task of the developer is simplified.
An application is divided into two parts: the control part which
is described in ESTEREL and the data part which is described
in Java.
To write an application, the developer has to perform the following steps, according
to procedure described in Using ALFred:
-
Describe the control part of the application using ESTEREL.
Let us consider for example the JukeBox Server specification.
-
Choose the QoS specification for each ADU used by the application.
Here are the menus displayed by ALFred parser for the two types of ADUs.
By default, ALFred contains a set of communication
protocols which are selected according to the application QoS. When
specifying the partial-reliable/jitter-sensitive QoS to send audio,
ALFred will automatically generate the code using the RTP/FEC
modules. For the requests, we have chosen the reliable/non-real-time
QoS which automatically selects the TCP library as transmission
protocol.
-
Fill out the user interface skeleton provided by the ALFred.
Concerning the JukeBox Server, this yields the following files for the data interface: AlfAppliInterface.java,
COMMAND.java, and .java; and the following file for
the execution environment:
AlfAppliRun.java.
Once all the java files for application have been generated you can
compile them and run the JukeBox application.
Suppose you're going to run the automatic version of the JukeBox
client on the django machine and the automatic version of the JukeBox
server on the pif machine, you just have to do:
server side:
-----------
pif$ pwd
$HOME/JukeBox/server
pif$ java inria.alfred.lib.Run -d django
-dir ./clips/
[-manual_bw]
client side:
-----------
django$ pwd
$HOME/JukeBox/client
django$ java inria.alfred.lib.Run -d pif
-fphone_path fphone
JukeBox Screenshots for automated version
JukeBox Screenshots for manual version
The server at pif.inria.fr
pif$ java inria.alfred.lib.Run -manual_bw -d django

A Client at django.inria.fr
pim$ java inria.alfred.lib.Run -d pif
