From fd86e50b21698c72545314a58de43aa1e818334b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Brada?= Date: Thu, 29 Oct 2015 20:29:51 +0100 Subject: [PATCH] notes to dht impl and related --- Deliver.pas | 8 ++++++++ dht.pas | 11 +++++++++++ opcode.pas | 5 +++++ tmux | 1 - todo.txt | 14 ++++++++++++++ 5 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Deliver.pas diff --git a/Deliver.pas b/Deliver.pas new file mode 100644 index 0000000..fd75ee2 --- /dev/null +++ b/Deliver.pas @@ -0,0 +1,8 @@ +unit Deliver; +{message delivery} +{ + search recipient in dht + else try "friends" + else nearest to inverse in dht + (not direct: recipient unable to search for self) +} \ No newline at end of file diff --git a/dht.pas b/dht.pas index a30772b..475e5a5 100644 --- a/dht.pas +++ b/dht.pas @@ -3,6 +3,8 @@ unit DHT; implementation of custom dht, based on pastry and kademlia. keyspace is divided into buckets of limited capacity node belongs to bucket, where at least 'depth' bits match 'prefix' + old>new, + new>dead } {used by: messages, fileshare} @@ -16,4 +18,13 @@ procedure Get(const id:tPID; out result:array of tNetAddr); IMPLEMENTATION +{communication: + ping-pong; + request for ... key + ...: node, file, profile, ?dir + profile: key, firends, dirs + nodes + values +} + END. \ No newline at end of file diff --git a/opcode.pas b/opcode.pas index ec2f3b1..a6448fe 100644 --- a/opcode.pas +++ b/opcode.pas @@ -8,6 +8,11 @@ const {dgram opcode} tceack=7; tcdata_no_report=8 unimplemented; {10-16 reserver for dht} + dhtping=10; + dhtpong=11; + dhtfind=12; + dhtnodes=13; + dhtvalues=14; const {chat init} upFileServer=2; const {FS opcodes} diff --git a/tmux b/tmux index e836c94..904b743 100644 --- a/tmux +++ b/tmux @@ -1,2 +1 @@ -#!/bin/bash session_name="brdnet" diff --git a/todo.txt b/todo.txt index eddcd67..ebca2c9 100644 --- a/todo.txt +++ b/todo.txt @@ -1,3 +1,17 @@ +depend: +dht: messaes, fileshare + +directory: +- group files of common category +- allow nodes select what they host +- tag files in dir, allow easy filter +? key for dir + - hash of name: popular dirs will overload nodes + ? flood routing + - outdated listing +? moderation +? voting + To-Do list - Chat: OnTimeout, ExceptReply - handle timeouts in Download -- 2.11.4.GIT