A P2P-based high performance key-value pair storage library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Thomas Bocek a7b7b91653 [maven-release-plugin] prepare for next development iteration 2 years ago
all [maven-release-plugin] prepare for next development iteration 2 years ago
android [maven-release-plugin] prepare for next development iteration 2 years ago
benchmark cleanup and smaller fixes 7 years ago
core [maven-release-plugin] prepare for next development iteration 2 years ago
dht [maven-release-plugin] prepare for next development iteration 2 years ago
examples [maven-release-plugin] prepare for next development iteration 2 years ago
interop cleanup and smaller fixes 7 years ago
nat [maven-release-plugin] prepare for next development iteration 2 years ago
replication [maven-release-plugin] prepare for next development iteration 2 years ago
social [maven-release-plugin] prepare for next development iteration 2 years ago
storage [maven-release-plugin] prepare for next development iteration 2 years ago
task remove directories 8 years ago
tracker [maven-release-plugin] prepare for next development iteration 2 years ago
.checkstyle tomp2p release 5 initial commit 8 years ago
.checkstyle.xml tomp2p release 5 initial commit 8 years ago
.gitignore project settings update 8 years ago
.tomp2p-header-check.txt tomp2p release 5 initial commit 8 years ago
.travis.yml trying to set -Dio.netty.leakDetectionLevel=paranoid in travis 7 years ago
LICENSE.txt tomp2p release 5 initial commit 8 years ago
README.md Update README.md 7 years ago
pom.xml [maven-release-plugin] prepare for next development iteration 2 years ago
release_instructions.txt removed uneeded comment 7 years ago

README.md

TomP2P Build Status

TomP2P is a P2P library and a distributed hash table (DHT) implementation which provides a decentralized key-value infrastructure for distributed applications. Each peer has a table that can be configured either to be disk-based or memory-based to store its values.

TomP2P stores key-value pairs in a distributed manner. To find the peers to store the data in the distributed hash table, TomP2P uses an iterative routing to find the closest peers. Since TomP2P uses non-blocking communication, a future object is required to keep track of future results. This key concept is used for all the communication (iterative routing and DHT operations, such as storing a value on multiple peers) in TomP2P and it is also exposed in the API. Thus, an operation such as get or put will return immediately and the user can either block the operation to wait for the completion or add a listener that gets notified when the operation completes.

Features

  • Java6 DHT implementation with non-blocking IO using Netty.
  • XOR-based iterative routing similar to Kademlia.
  • Standard DHT operations: put(), get()
  • Extended DHT operations and support for custom operations: putIfAbsent(), add(), send(), digest()
  • Selective get() using min-max or Bloom filters
  • Direct and indirect replication.
  • Mesh-based distributed tracker.
  • Data protection based on signatures.
  • Port forwarding detection and configuration via UPNP and NAT-PMP.
  • Runs with IPv6 and IPv4.
  • Network operations support the listenable future objects concept.

Code Examples (API v4.1)

//create a peer
Peer peer = new PeerMaker(new Number160(rnd)).setPorts(port).buildAndListen();

//store object
FutureDHT f =peer.put(Number160.createHash(key)).setObject(hello world).build();

//get object
FutureDHT f = peer.get(Number160.createHash(key)).build();

//to get the result, either add listener
f.addListener(...)
//or block
f.await()

//send direct messages to a particular peer
peer.sendDirect().setPeerAddress(peer1).setObject(test).build();