Design and analysis of a mobile file sharing system for opportunistic networks
Design and Analysis of a Mobile
• Design and analyze a mobile file sharing system
over opportunistic networks using Bluetooth
• To enable a mobile device to download desired
files from available devices in its neighborhood and
also allow its files to be disseminated to the
network with the facilitation of opportunistic
• The key challenges to be address are system
automation and file sharing efficiency.
• Now a days many devices can support spontaneous
interaction among mobile users through wireless
links, such as Bluetooth and Wi-Fi. The resulted
network is often referred as an opportunistic
network(Oppnet). In these networks, contacts
among users are usually opportunistic and
connections among devices are intermittent.
File sharing scenario of the system can be described as follows:
• Mobile devices search for available devices in their
• Request for file sharing services
• Establish the connection
• At the same time, these mobile devices serve as service
providers and respond to requests sent from their neighbors
• The Transaction can be
• File Pulling
• File Pushing
File Pulling & File Pushing
• File pulling is to download files from neighbors.
• File pushing is to distribute files(Ex- Conference)
• There are two different pairs of roles in our file
• (puller, pullee)
• (pusher, pushee)
• Puller is the one who requests for pulling service and
desires to download files from the service provider called
• Pusher is the one who requests for pushing services and
wants to distribute its owned files to the service provider
The connectivity mechanism is designed to
handle connection for a mobile device for its
• Device discovery
• Neighbor selection
• Connection establishment.
Connectivity mechanism - Device discovery
• Bluetooth technology for short range communication
which scans for available devices in the neighborhood
• Experimentally the device discover neighbors within 17
seconds if there exists at least one in the neighborhood.
Connectivity mechanism -Neighbor selection
• Once available neighbors are discovered
• The neighbor selection strategy is applied for file puller and
pusher to choose a neighbor.
• The file puller maintains a list locally which traces all the
mobile devices that have unfinished file transferring in
their last connections with the puller.
• If such neighbor is found then file transferring completes
• Else the file puller chooses the connection candidate from
all available neighbors randomly.
Connectivity mechanism - Neighbor selection
• A file pusher also maintains a list locally which
records all the mobile devices which it has pushed
• If discovered neighbors exist in the list, the file
pusher will avoid selecting them as connection
candidate, since pusher does not want to push files
to the same device repeatedly.
• Then the file pusher chooses the connection
candidate randomly from all the other available
Connectivity mechanism - Connection Establishment 1
The system involves two pairs of roles i.e (puller, pullee) and
(pusher, pushee) and connection only occurs between
puller and pullee or pusher and pushee respectively.
• For the pair of file puller and pullee, search criterion is
used to announce its file requirement including file types it
requests. ie. jpeg, .mp3 etc.
• search criterion is send to file pullee
• file pullee accepts the service request if at least one file in
its possession meets the criterion and sends back
acceptance notice with its provided files information.
• After receiving the acceptance notice from file pullee,the
connection b/w puller and pullee is established
Connectivity mechanism - Connection Establishment - 2
• For file pusher and pushee, the pushed file information is
used by the pusher to announce files that it desires to
distribute to the network.
• The file pusher sends out pushing request along with the
pushed file information.
• A selected neighbor acting as file pushee accepts the
service request and sends back an acceptance notice.
• The connection is announced to be established
ROLES AND FILE INFORMATION LISTS
Each mobile device is capable of serving up to 4 types of
roles whose connection processes for file puller, pullee,
pusher and pushee can be described by the following four
After the connection established, download control
handles file transferring process. The challenge of
download control is
• To reduce file transferring duration
• Improve file sharing efficiency
As puller and pushee are the ones that download files
from pullee and pusher, they can customize their
download sequences with the help of prioritizing
sequence of these files.
• The puller or pushee breaks all the prioritized files that are
about to be downloaded into certain size of pieces.
• Piece information is recorded in a meta file.
• Using file piece has two advantages.
– Firstly, it allows a file to be downloaded from multiple devices as
a device can request different pieces of a file from multiple
– Secondly, it facilitates connection break handling.
• Similar to connectivity mechanism, download control
manages the downloads for the mobile device in different
roles and the download control processes can be described
by the following Algorithm.
Connection Break Handling
• Due to device mobility in opportunistic networks,
opportunistic contacts occur and disappear
frequently. As a result the transfer of data is not
completed successfully. Here the break handler
works which store all existing pieces of unfinished
files temporarily and request for the rest pieces
when the connection is rebuilt.
EVALUATION - I
The file transferring data rate – limiting the peer number to 4
will maximize the data rate
EVALUATION - II
The time taken to merge pieces into a file is minimal when the
file piece size is 100 KB.
EVALUATION - III
File compression is applied on the file provider to reduce file size,
thereby reducing the file transferring duration.
The time taken to download files can be reduced significantly for some
file types, such as .txt and .bmp.
EVALUATION - IV
Finally the whole system efficiency is measured considering
the time taken not only for the file transferring but also the
preparation operations before the transferring and the merging
•Preparation operations includes
•establishing connection with the selected neighbor
•Initiation work in download control.
EVALUATION - V
The time taken to transfer files and merge pieces into files are
directly related to the file size
• The mobile file sharing system proposed in this paper provides
an efficient solution for mobile devices in opportunistic
networks to acquire interested files from neighbors and also
distribute files to the network. It is implemented on HP iPAQ
910 smart phones equipped with Bluetooth interfaces. It
allows one mobile device to download or upload files from or
to multiple neighbors and achieves up to 417 KB per second
data rate for file transferring. It is indicated that limiting the
peer number to 4 maximizes the data rate and enhances the
system efficiency. The use of file piece enables connection
break handling. It is clearly shown that file piece with 100 KB
size can minimize the extra time cost according to our