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 release of TomP2P 4.1.2-preview. The changes are:

  • upgrade to latest JDBM
  • switched to logback for logging
  • added support for Bloom filters in get() and digetst()
  • better handling of "connection reset by peer"
  • fixed PeerConnection
  • improved success evaluation for futures
  • added examples for similarity search, distributed segment trees, and Bloom filters

New major release of TomP2P 4.1.1-preview. The changes are:

  • TCP options set in try-catch to suppress warning if an option could not be set
  • suppress “connection reset by peer” in Windows
  • expose storage.map() to user
  • fixed CacheMap and ConcurrentCacheMap
  • improved bootstrapping, which includes connecting to random peers
  • fixed tracker replication
  • added more examples

Lecture / Tutorial slides online. These slides were presented by Thomas Bocek at the University of Zurich during the P2P lecture and show some of the new features in the TomP2P 4.1 release.

New major release of TomP2P 4.1.0-preview. The changes are:

  • Removed Guava, switched back to Java collections
  • Removed BerkeleyDB, switched to JDBM, rewrote storage
  • Added build-pattern to create peers
  • Switched from Java5 to Java6
  • Many, many bugs fixed
  • Added new examples
  • Further preparation for MapReduce

New major release of TomP2P 4.0.7. The changes are:

  • Preparation for MapReduce
  • Changes for SimGrid integration
  • Potential peer discovery fix for multiple interfaces
  • TomP2P-4.0.7-dist.zip now contains all the required dependencies

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.