## 3 The Friendly-Sharing Approach
### Message Diffusion  
Message diffusion is based on epidemic dissemination, a concept similar to the spreading of infectious diseases. Basically, when an infected node (i.e., a node that has a message) contacts another node, it infects it by transmitting the message. Epidemic dissemination obtains the minimum delivery delay at the expense of increased buffer usage and increased number of transmissions. The critical factor affecting diffusion is the duration of the contact, which depends on the mobility patterns of the user. It can vary from a few seconds (a short contact in the street) to hours (for example, during a class at school), and it determines the number and size of the messages that can be exchanged.  
A way to improve the effectiveness of this diffusion is to increase the number and duration of contacts. Our proposal, called Friendly-Sharing, has to be integrated into mobile applications that will therefore ask the user to wait for some more time to extend the exchange window. The basic assumption is that installing and being interested in using such an application indicates that the user wants to actively collaborate in the diffusion of the information. Moreover, our proposal allows the applications to inform the users about how much time is needed for interchanging the messages, thus providing a friendly way to stop for a short time. We demonstrate our proposal with a proof-of-concept application, called GRChat [15].  
GRChat is an Android app that can establish connections among two or more phones and transmit data and images using Bluetooth. Moreover, the user can create and subscribe to groups in order to send/receive messages. GRChat works like any messaging app where the user can watch previous messages/images and write new ones. When the user pushes the send button, GRChat connects to any nearby devices and sends the newly created message, as shown in Figure 1a; meanwhile, it also receives the new messages from the other devices. When a device gets a new message, it also tries to connect to other devices in order to complete the diffusion of the message. When no messages are sent, the application is periodically searching for nearby devices.  
When the GRChat app detects a new device, it establishes a new pairwise connection and automatically starts the interchange of messages. The application notifies both users about the new connection playing a sound or vibrating. This way, the users can decide to wait some extra time in order to extend the message sharing session. The required time to complete the message interchange is shown in the application, so both users are aware of the pending time (see Figure 1b). This is an effective way to increase cooperation as the user knows exactly the time it should wait. Nevertheless, due to the cooperative approach, users are not forced to wait until all messages are exchanged.  
We evaluate three different user behaviours:  
* _No-wait_: The users do not stop any additional time. In this case, the number of messages exchanged between nodes will depend on how long they remain within the communication range and clearly on the data rate of the channel. If this contact duration is very small, no messages will be transmitted.
* _Full-wait_: The users wait during the time required to exchange all the messages. In this case, the owner of each mobile device will control this exchange by stopping and waiting until the message transmission is fully completed.
* _Finite-wait_: To avoid interfering too much with the user mobility, users wait only for some extra time to send and receive some of the pending messages.