TomP2P is an advanced 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

TomP2P 5 Beta finally arrived. Check out the latest beta version.

I recommend to switch from TomP2P 4 to TomP2P 5 as TomP2P 4 will not be maintained anymore. Please change your pom.xml to:


Some methods changed from get*() to *() -> getPeerMap() to peerMap(). The API is considered stable, but small changes may happen.

Another TomP2P 5 Alpha has been released. Stubs for disk-based storage were added and several smaller bugfixes. Check out the latest alpha version.

If you want to switch from TomP2P 4 to TomP2P 5, just change your pom.xml to:


Some methods changed from get*() to *() -> getPeerMap() to peerMap() and more methods will be renamed for the beta release of TomP2P 5. Another big change is that FutureDHT is now split into FutureGet, FuturePut, etc.

TomP2P 5 is around the corner with several new additions. One of the larger changes is the support for relays as described here. Check out the latest alpha version.

New release of TomP2P 4.2. The major changes are:

New release of TomP2P 4.1.2-preview. The changes are:

Feature List of TomP2P

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 6 and TomP2P also has been sucessfully tested and used on Android. TomP2P is distributed under the Apache License, Version 2.0 (with the exception of net.tomp2p.natpmp, which is LGPL).


" ... 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): 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!

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.