-
- Downloads
DRT: implement Distributed Routing Table
This patch adds the minimal code for the DRT. This component should avoid the fact that every peer in a swarm must connects to every other peer. The idea is to get a similar algorithm we use in OpenDHT, meaning to store known devices in buckets and try to dynamically connect to some of the peers, creating a routing table, so every peer in a conversation should connect to a subset of peers. The big difference is that we must includes mobile devices (for OpenDHT push/baterry optimizations can be taken into accounts). For this, we consider a special type of node in the DRT that is considered as reachable but not connected and stored in the mobile nodes. A mobile announces itself as a mobile after bootstraping via a message in the swarm channel. In this case, if they disconnect the node is moved to a special state (mobile node) instead (known nodes). A user can know to which devices they can send messages via Routing Table's mobile nodes and connected nodes. Docs: TODO add link GitLab: #297 Change-Id: Ic061c58ca487698afee712cb2eef5e57f9c208fb
Showing
- src/gittransport.cpp 8 additions, 10 deletionssrc/gittransport.cpp
- src/jamidht/account_manager.h 0 additions, 1 deletionsrc/jamidht/account_manager.h
- src/jamidht/conversation.cpp 114 additions, 19 deletionssrc/jamidht/conversation.cpp
- src/jamidht/conversation.h 50 additions, 1 deletionsrc/jamidht/conversation.h
- src/jamidht/conversation_channel_handler.cpp 8 additions, 8 deletionssrc/jamidht/conversation_channel_handler.cpp
- src/jamidht/conversation_module.cpp 351 additions, 77 deletionssrc/jamidht/conversation_module.cpp
- src/jamidht/conversation_module.h 49 additions, 5 deletionssrc/jamidht/conversation_module.h
- src/jamidht/jamiaccount.cpp 28 additions, 14 deletionssrc/jamidht/jamiaccount.cpp
- src/jamidht/jamiaccount.h 9 additions, 42 deletionssrc/jamidht/jamiaccount.h
- src/jamidht/swarm/swarm_channel_handler.cpp 15 additions, 0 deletionssrc/jamidht/swarm/swarm_channel_handler.cpp
- src/jamidht/swarm/swarm_channel_handler.h 4 additions, 0 deletionssrc/jamidht/swarm/swarm_channel_handler.h
- src/jamidht/swarm/swarm_manager.cpp 82 additions, 41 deletionssrc/jamidht/swarm/swarm_manager.cpp
- src/jamidht/swarm/swarm_manager.h 24 additions, 10 deletionssrc/jamidht/swarm/swarm_manager.h
- src/manager.cpp 7 additions, 6 deletionssrc/manager.cpp
- src/manager.h 5 additions, 5 deletionssrc/manager.h
- test/unitTest/Makefile.am 6 additions, 0 deletionstest/unitTest/Makefile.am
- test/unitTest/swarm/nodes.h 93 additions, 0 deletionstest/unitTest/swarm/nodes.h
- test/unitTest/swarm/routing_table.cpp 1318 additions, 0 deletionstest/unitTest/swarm/routing_table.cpp
- test/unitTest/swarm/swarm_spread.cpp 479 additions, 0 deletionstest/unitTest/swarm/swarm_spread.cpp
Loading
Please register or sign in to comment