Distributed database

From VuzeWiki
Jump to: navigation, search

If you are looking for implementation specific details of the DDB, you may want to read the DHT article.

What does it do?[edit]

The Distributed Database (DDB) feature of Azureus provides a facility for key-based, distributed storage of small amounts of arbitrary (meta)data. With the DHT it creates a P2P overlay network that is completely serverless, fully scalable and reasonably fast. Its decentralized character makes it somewhat immune to censorship and central regulation, although it does not provide anonymity.

The DDB basically supports 2 operations: that is, you store key -> value pairs in it, but you don't know where it will be stored, and the peers hosting those do not really do anything with those values, they simply store it. Every peer can store either 1 value, or a list of values at a given key, where the key (which itself is passed to the DHT) is created by performing a SHA-1 hash function on the key that is passed from the next higher abstraction layer, the application. For the same key, all peers can store 1 value which won't override the other peers value in case there are other peers storing values under the same key.
A removal of a value is implemented through a zero-sized store.

The second operation is the retrieval of stored values, when you query that key from the DHT you'll get all data that was stored under this certain key, thus you'll get the stores from other peers too. If that is not desired for a certain application the storer's ID can be mangled into the storage key and thus it will become very unlikely to have the same hash value as any other store.



The DDB needs an open/forwarded UDP port which is the same as the TCP listening port under Tools -> Options -> Connection unless otherwise specified in the Plugin configuration.

If you've somehow lost the connection to the DDB but it was working in the past and you're sure the port is forwarded correctly you can reseed the DDB by following those instructions:

  1. go to Tool -> Options -> Plugins -> Distributed DB
  2. hit the reseed button and wait a minute, if the usercount goes up (300.000+) and the Status indicator on the bottom is green everything is fine
  3. if not, then you can specify the IP and Port of any DDB node (Azureus peer) or dht.aelitis.com and 6881 (dht6.azureusplatform.com for IPv6 -- March 2010: Down until we can find a replacement IPv6 server.)
  4. hit the reseed button again and wait

If that procedure still fails the Port isn't unfirewalled/forwarded correctly.