TomP2P

TomP2P is an extended DHT, which stores multiple values for a key. Each peer has a table (either disk-based or memory-based) to store its values. A single value can be queried / updated with a secondary key. The underlying communication framework uses Java NIO to handle many concurrent connections.

Keywords: Overlay Network, Peer-to-Peer (P2P), Distributed Hash Table (DHT), Java DHT implementation, Kademlia.

Latest News

New major release of TomP2P 4.0.4. The new major features are:

  • An RPC for compareAndPut. For more information, see http://lists.tomp2p.net/pipermail/users/2012-January/000088.html
  • Moved from SVN to Git. Migration complete.
  • Bugfix: Add empty constructor for FutureTracker.
  • Upgraded Netty to 3.3.0 with patches.
  • Refined connection reservation. The user does not need to reserve connection in advance. In situations where deadlocks can occur, an new thread is started. If too many threads are started, the user is warned.

TomP2P moved from Subversion to Git. The project source code can be found on GitHub. The subversion repository is still read-only accessible.

New major release of TomP2P 4.0.3. The new major features are:

  • Cleanup and documentation of package net.tomp2p.connection.
  • Fixed bug in add() that behaved as putIfAbsent
  • Classcast exception fix for Android
  • Fixed bug in handling XMLUtils, which requires to be called synchronized
  • Upgraded Netty to 3.2.7
  • Added support for digest() and digestAll()

New major release of TomP2P 4.0.2. The new major features are:

  • Fixes for Java5 (Android) compatibility

New major release of TomP2P 4.0.1. The new major features are:

  • Distinguish in routing between DHT and bootstrap operation to set success or failure correctly
  • New facades (PeerAddress and Peer.remove)
  • Added evaluation of digest information from the routing process to make get() more efficient
  • Smaller fixes and cleanups

Feature List of TomP2P

  • Java5 DHT implementation with non-blocking IO.
  • XOR-based iterative routing similar to Kademlia.
  • Standard DHT operations: put, get
  • Extended DHT operations and support for custom operations
  • Direct and indirect replication.
  • Mesh-based distributed tracker.
  • Data protection based on signatures.
  • Port forwarding detection and configuration via UPNP.
  • Runs with IPv6 (tested with Linux) and IPv4.
  • Network operations support the listenable future objects concept.
  • Scales up to 2160 peers (more than you can address with IPv6)

Applications using TomP2P

TomP2P is used in academia in several projects at the Communication Systems Group and several papers were published that used TomP2P. The target version of TomP2P is Java 5 and TomP2P also has been sucessfully tested and used on Android. TomP2P is distributed under the Apache License, Version 2.0.

  • LiveShift
  • DRFS
  • P2PFastSS
  • PeerVote
  • PSH/CompactPSH
  • P2P-PTT, a P2PSIP based PTT service

Testimonial

" ... With your implementation I was able to overcome two exams with honors last week, making an application based on DHT. [...] Thank you again, Alessandro ... "

Academic Background

TomP2P has been successfully used in academic projects: EC-GIN (Europe-China Grid InterNetworking), EMANICS (European Network of Excellence for the Management of Internet Technologies and Complex Services), and "SmoothIT (Simple Economic Management Approaches of Overlay Traffic in Heterogeneous Internet Topologies):http://www.smoothit.org/. Within these projects features and bug fixes have been added to make TomP2P a stable and flexible P2P library.

Similar Projects

The following list provides an overview over similar Java DHT implementations that have recently showed activity (mailing list, releases). If you think that a project is missing here, please concact me!

  • Overlay Weaver is an overlay construction toolkit, which supports overlay algorithm designers in addition to application developers.
  • FreePastry is an open-source implementation of Pastry intended for deployment in the Internet.

History of TomP2P

The first TomP2P version was created in 2004 by Thomas Bocek and used for his master’s thesis for a distributed DNS. This version used blocking IO operations and did not scale well. Thus, TomP2P version 2 has been created and used Apache MINA. This second version with the asynchronous communication framework scaled better, but TomP2P was not well designed for non-blocking operations and a third version has been designed from scratch. The third version of TomP2P uses Netty, which is a high performance Java NIO framework. The design of the third version was tailored to non-blocking operations and have been used successfully in many academic projects.