Skip to content

Tribler Development Pointers

vandenheuvel edited this page Mar 20, 2017 · 25 revisions

This page will contain an informal description of implemented Tribler concepts. It can be used as a starting point for new Tribler developers. This page will be extended and improved all the time.

Communities

A Tribler community is similar to a network overlay: users can generate/join/leave a community and exchange messages over it. For each community, the type of messages that can be sent over it can be defined. Tribler offers several predefined communities and allows developers to define/build their own communities. Note that some of these may be under construction, deprecated or broken.

Available Communities

AllChannel: Auto-joined by all Tribler users. Used to spread (partial) torrent files to users so that search can indeed be decentralized. Note that these partial torrent files do not contain all file and tracker information.

Channel: TODO

Demers: Used within the Demers experiment only.

Metadata: TODO

Search: TODO

Template: Template community files.

Tunnel: Auto-joined by all Tribler users. Used to send and retrieve files anonymously using a Tor-like protocol (see Hidden Services Specifications).

Generating a master member key

Every community has a unique master member key (i.e. it's community ID). You can generate it by running createkey.py in the tool folder of the dispersy repository (note: set PYTHONPATH to %WORKSPACE%/tribler/Tribler):

./tool/createkey.py high

Createkey can create keys of various strength, run ./tool/createkey.py -h to see all.

Statistics

Dispersy uses several types of statistics (defined in dispersy/statistics.py):

  • MessageStatistics
  • DispersyStatistics
  • CommunityStatistics
  • RuntimeStatistics

These objects can be used to record statistics for Dispersy or a community. They are stored in memory and reset when Tribler restarts. Statistics are defined in the constructor as variables. For incrementing the value of a record in a dictionary associated with 'key', use Statistics.dict_inc().