Peer-to-Peer Networking and Applications

, Volume 12, Issue 1, pp 60–73 | Cite as

Ad-hoc messaging infrastructure for peer-to-peer communication

  • Michael Lescisin
  • Qusay H. MahmoudEmail author


Traditional means of communication rely on a centralized service provider in order to function. With a traditional cellular service provider, when somebody (Alice) wants to send a text message to someone else (Bob), the message is sent from Alice’s phone to a cellular network and then finally to Bob. This process happens regardless if they are located on opposite sides of the world or are in the same room. In this paper, we present the design, implementation and evaluation of a peer-to-peer (P2P) network that will route text messages along the shortest reliable path. By “shortest path” we mean that if Alice and Bob’s phones are in wireless range of each other, the message passes only through their phones over the wireless link. If Alice and Bob are located further apart and their wireless radios are out of range, then a repeater node which can be reached by both Alice and Bob can be deployed and the message will pass through this node, again taking the shortest path. The network can be deployed with inexpensive off-the-shelf microcomputers, such as the Raspberry Pi, which can run off batteries in the event of a power outage. These nodes can be easily deployed and need not be trusted as the messages are encrypted and signed. In our tests, we were able to send text messages across a building over our mesh-network of Raspberry Pi microcomputers running our software and using ad-hoc Wi-Fi for neighbour-to-neighbour links. In addition, our simulation results show the feasibility of the proposed protocol.


P2P communication Ad-hoc messaging Raspberry pi 


  1. 1.
    Conti M, Giordano S (2007) Multihop ad hoc networking: the reality. IEEE Commun Mag 45(4):88–95CrossRefGoogle Scholar
  2. 2.
    DeLisle CJ. cjdns. 15 June 2014. (Online). Available: Accessed 20 June 2014
  3. 3.
    Corbet J. Mesh networking with batman-adv. 8 February 2011. (Online). Available: Accessed 7 Oct 2016
  4. 4.
    Tox Developers. A New Kind of Instant Messaging. The Tox Project, (Online). Available: Accessed 11 Oct 2016
  5. 5.
    Open Garden (2016) How to. (Online). Available: Accessed 23 Mar 2017
  6. 6.
    Conti M, Maselli G, Turi G, Giordano S (2004) Cross-layering in mobile ad hoc network design. Computer 37(2):48–51CrossRefGoogle Scholar
  7. 7.
    Isaacman S, Martonosi M (2008) Potential for collaborative caching and prefetching in largely-disconnected villages. In: Proceedings of the 2008 ACM workshop on wireless networks and Systems for Developing Regions, San FranciscoGoogle Scholar
  8. 8.
    Marlinspike M. Safety number updates. Open Whisper Systems, 17 November 2016. (Online). Available: Accessed 9 Aug 2017
  9. 9.
    Guha R, Kumar R, Raghavan P, Tomkins A (2004) Propagation of trust and distrust. In: Proceedings of the 13th international conference on world wide web, New YorkGoogle Scholar
  10. 10.
    Han B, Pan H, Kumar VA, Marathe MV, Pei G, Srinivasan A (2010) Cellular traffic offloading through opportunistic communications: a case study. In: Proceedings of the 5th ACM workshop on challenged networks, ChicagoGoogle Scholar
  11. 11.
    Salopek D, Vasic V, Zec M, Mikuc M, Vasarevic M, Koncar V (2014) A network testbed for commercial telecommunications product testing. In: 22nd international conference on software, telecommunications and computer networks (SoftCOM), splitGoogle Scholar
  12. 12.
    Boettiger C (2015) An introduction to Docker for reproducible research. SIGOPS Oper Syst Rev 49(1):71–79CrossRefGoogle Scholar
  13. 13.
    BeanChat Docker Simulation. UOIT DNA Lab BeanChatP2P-DockerSimulation. 28 October 2017. (Online). Available:
  14. 14.
    BeanChat Opportunistic Routing Simulation. UOIT DNA Lab Opportunistic Routing Simulation. 28 October 2017. (Online). Available:

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2017

Authors and Affiliations

  1. 1.Department of Electrical, Computer and Software EngineeringUniversity of Ontario Institute of TechnologyOshawaCanada

Personalised recommendations