This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
development:dht_protocol:apis [2014/01/30 13:09] jpfox |
development:dht_protocol:apis [2014/01/30 13:30] (current) jpfox |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== General notes ===== | ===== General notes ===== | ||
- | - Libtorrent’s DHT security extension is enforced, requiring the Node ID to be restricted by the external IP. | + | - [[http://www.libtorrent.org/dht_sec.html|Libtorrent’s DHT security extension]] is enforced, requiring the Node ID to be restricted by the external IP. |
- Default’s libtorrent’s parameters are used: search_branching (alpha) = 5, bucket_size (k) = 8 and agressive_lookup = true. | - Default’s libtorrent’s parameters are used: search_branching (alpha) = 5, bucket_size (k) = 8 and agressive_lookup = true. | ||
- | - Stored resources meant for persistence in DHT network (like profile, avatar etc) are refreshed every hour. Previous studies have shown (Paper: Profiling a million user dht) that, under some assumptions and configurations, long-term data persistence may be achieved by refreshing every couple of hours. | + | - Stored resources meant for persistence in DHT network (like profile, avatar etc) are refreshed every hour. Previous studies have shown ([[http://dl.acm.org/citation.cfm?id=1298325|Paper: Profiling a million user dht]]) that, under some assumptions and configurations, long-term data persistence may be achieved by refreshing every couple of hours. |
- Persisted resources are also saved to disk and restored when twister daemon restarts. | - Persisted resources are also saved to disk and restored when twister daemon restarts. | ||
Line 53: | Line 53: | ||
response = {"t":"aa", "z":"r", "r": {"id":"mnopqrstuvwxyz123456"}} | response = {"t":"aa", "z":"r", "r": {"id":"mnopqrstuvwxyz123456"}} | ||
</code> | </code> | ||
+ | |||
+ | See [[development:dht_protocol:structures#general structure]] for content detail. | ||
Note: target_id is the hash of bencoded ''"target"'' field. | Note: target_id is the hash of bencoded ''"target"'' field. | ||
Line 67: | Line 69: | ||
{"p":"data2", "sig_p":"fg40958ejfdg", "sig_user":"twister" ] }} | {"p":"data2", "sig_p":"fg40958ejfdg", "sig_user":"twister" ] }} | ||
</code> | </code> | ||
+ | |||
+ | See [[development:dht_protocol:structures#general structure]] for content detail. | ||
Note: target_id is the hash of bencoded ''"target"'' field. | Note: target_id is the hash of bencoded ''"target"'' field. | ||