Amazing app from EE579

  P2P file sharing system with a central server

In recent years, a number of P2P systems like BitTorrent, Napster has been come into attention. It would be certain that the P2P sharing system will be widely used on the mobile networks as well. In the project, we would like to setup an android p2p file sharing system and enable the communication between android phones. In this project, we start from the one to one node p2p communication to the one to many nodes. The whole idea is that we combine the Wifi-direct and p2p communication together. We have a wifi-direct p2p mobile communication.

We use several activity to achieve the goal.  Main Activity contains the Network Manager Component. The function of the main component is to for the Network registration. The Browse Peer Activity is used for the network connection and peer Manager. The File Download Activity is used for the file transfer and downloading.
In our architecture, we use the group owner as a center-server ,rotated all the group owner then we can implement the feature of the Wifi-direct architecture.

The more detailed architecture is we send the we set up a p2p communication with two devices.
First, we set up a socket. The client asks for a peer request. Then the server receives the require. After that, the client confirm the information in the Client. Then the two pair can communication with each other. It is also applicable in the muti-client communication. When the connection is established, the client search for the file which wants to request, then the server give the file the client want. With a simple algorithm, we can allocate resource.  

Here is the simple algorithm for the resource allocation
Small file size, high transfer speed for 2~3MB per second
No need to divide file into chunk
Our algorithm focus on seeking the idle client so that the client can request service from another one
Send request message ;
If (file search match && the client is idle){
          if (one client found)
                   pick a client with best Wi-Fi direct connection quality;
else wait for a timeout to send the request again ;


We also find some potiental problem that may useful for the future research

1Connection in a group owner & client way, do not support client and client direct communication

2Client is the initiator of the file transfer

3Only group owner support the wireless connection


Possible solution:

1Pure peer to peer network (negative)

2Use PC as central server (negative)

3Use group owner as the central server and relay, implement message transfer between server and client to enable client to client communication.

Create socket to enable the direct communication among clients



Email address: