Showing posts with label p2p. Show all posts
Showing posts with label p2p. Show all posts

Apr 8, 2010

Adapting BitTorrent to wireless ad hoc networks

By : Mohamed Karim Sbai, Chadi Barakat, Jaeyoung Choi,

Anwar AlHamra and Thierry Turletti


Abstract:

BitTorrent is one of the Internet's most efficient content distribution protocols. It is known to perform very well over the wired Internet where end-to-end performance is almost guaranteed. However, in wireless ad hoc networks, many constraints appear as the scarcity of resources and their shared nature, which make running BitTorrent with its default configuration not lead to best performances. To these constraints it adds the fact that peers are both routers and end-users and that TCP-performance drops seriously with the number of hops. We show in this work that the neighbor selection mechanism in BitTorrent plays an important role in determining the performance of the protocol when deployed over a wireless ad hoc network. It is no longer efficient to choose and treat with peers independently of their location. A first solution is to limit the scope of the neighborhood. In this case, TCP connections are fast but there is no more diversity of pieces in the network: pieces propagate in a unique direction from the seed to distant peers. This prohibits peers from reciprocating data and leads to low sharing ratios and suboptimal utilization of network resources. To recover from these impairments, we propose an enhancement to BitTorrent which aims to minimize the time to download the content and at the same time to enforce cooperation among peers. Our solution considers a restricted neighborhood to reduce routing overhead and to improve throughput, while establishing few connections to remote peers to improve diversity of pieces. With the help of extensive NS-2 simulations, we show that these enhancements to BitTorrent significantly improve the file completion time while fully profiting from the incentives implemented in BitTorrent to enforce fair sharing.

Paper:

Mohamed Karim Sbai, Chadi Barakat, Jaeyoung Choi, Anwar Al Hamra, Thierry Turletti, "Adapting BitTorrent to wireless ad hoc networks" to appear in proceedings of 7th International conference on ad hoc networks and wireless 2008 (AD-HOC NOW), Sophia Antipolis, France, September 2008. download

NS-2 Simulator code and scripts:

Click here to download code.

Apr 27, 2007

Peer-to-Peer (P2P) Simplified protocol


P2PS (Peer-to-Peer Simplified) is a lightweight infrastructure for peer-to-peer service discovery and pipe-based communication. As its names suggests, P2PS aims to provide a simple platform on which to develop peer-to-peer style applications, hiding the complexity of other similar architectures such as JXTA.

The P2PS protocols allow ad-hoc peer networks to be created containing everything from super-computer peers to PDAs. P2PS peers can create and advertise services within the network and discover the services offered by other peers. Services usually have at least one pipe associated, an abstract communication channel used to contact the service. Pipes are only bound to specific transport protocols (e.g. TCP/IP) at connection time and allow peers to communicate over multiple protocols.

The current P2PS reference implementation is written using Java, however as P2PS is based on XML protocols interoperability should exist with other implementations. The Java implementation provides a straightforward API for creating and advertising a peer within a network and for discovering the capabilities of other peers. Pluggable endpoint resolvers allow additional transport protocols to be inserted transparently to the application.

P2PS is an open-source project.

The source code is available from the download section of this website.

tags: , , , , , , , , ,



Apr 24, 2007

Simulation of BitTorrent Peer-to-Peer (P2P) Networks in ns-2

Overview:
Peer-to-peer (P2P) networks can reduce the distribution cost of large media files for the original provider of the data significantly. Thereby, the BitTorrent protocol is widely used in the Internet today. Most research work studies the protocol analytically, by simulations at the flow-level or real world experiments. Thereby, for flow-level simulations the influence of neglecting packet-level characteristics is not yet quantified.

Therefore, we implemented a BitTorrent-like protocol for the network simulator ns-2. We denote it as BitTorrent-like, because we do not intend to implement a specific version of BitTorrent, but aim at assessing the differences between a full simulation of all network layers and simplified simulations on the application-layer. Thus, some functionalities were simplified and others were omitted. In detail, in our simulator no torrent file is used and the downloaded data is not checked for data integrity by hash values. The HTTP tracker protocol is not implemented. That is, all tracker traffic is directly given to the peers rather than being transmitted over the network. We use this simplification because we are predominantly interested in the efficiency of the data transfers between the peers. Each peer runs the original unchoking algorithm. Thereby, anti-snubbing and the endgame-mode are neglected. We omitted the endgame mode in our implementation because it is not clearly specified when a peer switches to the endgame mode. Hence, different implementations realize it differently. Furthermore, anti-snubbing was omitted because it can result in situations where a peer does not contribute its upload bandwidth although it can transfer data to other peers. This can cause inefficiency in the network.

However, we implemented the super-seeding functionality because it improves considerably the performance for the flash crowd scenario. The BitTorrent implementation is modular. That is, the peer and the piece selection algorithms can be replaced by alternatives. Thus, different implementations of BitTorrent-like networks can be compared easily by simulations.

Reference:

K. Eger, T. Hoßfeld, A. Binzenhöfer, G. Kunzmann: "Efficient Simulation of Large-Scale P2P Networks: Packet-level vs. Flow-level Simulations", 2nd Workshop on the Use of P2P, GRID and Agents for the Development of Content Networks (UPGRADE-CN'07), in conjunction with 16th IEEE HPDC (High Performance Distributed Computing), June 25-29, 2007, Monterey Bay California, USA.

Source code:
Patch for ns-allinone-2.29
Sample script for packet-level simulation
Sample script for flow-level simulation

The patch changes the source code of agent.cc, agent.h, node.cc, node.h, tcp-full.cc, tcp-full.h and Makefile.in. Additionally, it adds the folder bittorrent/ with the corresponding files of the BitTorrent implementation. To apply changes run

patch -p1 < bittorrent.patch
in the ns-2.29 folder.
The two sample scripts simulate a flash crowd with initially only one seed and a number of leechers in the network.

Website Extracted from here

Kolja Eger
Hamburg University of Technology (TUHH)
Communication Networks
fon: +49-40-42878-3480
fax: +49-40-42878-2941
e-mail: eger@tuhh.de
web: http://www.tu-harburg.de/et6/staff/eger.html

tags :