-
- Downloads
DRT: integrate DRT components to conversation
This patches avoid swarm members to connect to all devices of the conversation by using a better routing mechanism. The idea is to add a component called "DRT" that will store, like a DHT, a routing table containing the known devices of the conversation. The DRT is bootstraped with the list of the devices that already wrote a message in the conversation, else with some other members that have devices present (because lot of devices may never have written any message). Moreover, because a user can import an old backup without the conversation and without other devices present, we also try to connect to 2 other random members because they may never connect if they are on an old back-up. Once bootstraped, the DRT is used to decide to who a user should be connected. And it will use approximately log(N) connections (instead of N like before). So, when sending a message, a user will send to connected peers (and some mobiles). Then, some peers in the conversation will get the message, pull it, then announce to their nearest peers (and some mobiles) until all peers got the new message. To avoid infinite loop, we check if we already got the commit and if we have something to announce. Finally, if somebody disconnect, this will cause the DRT to try to re-fill its bucket and try to connect to a new device. GitLab: #297 Change-Id: I137788c77219fe74287585882260547cc5628784
Showing
- src/account.h 13 additions, 6 deletionssrc/account.h
- src/connectivity/connectionmanager.cpp 13 additions, 6 deletionssrc/connectivity/connectionmanager.cpp
- src/connectivity/multiplexed_socket.cpp 17 additions, 17 deletionssrc/connectivity/multiplexed_socket.cpp
- src/connectivity/multiplexed_socket.h 2 additions, 0 deletionssrc/connectivity/multiplexed_socket.h
- src/im/message_engine.cpp 30 additions, 21 deletionssrc/im/message_engine.cpp
- src/im/message_engine.h 22 additions, 3 deletionssrc/im/message_engine.h
- src/jamidht/conversation.cpp 254 additions, 39 deletionssrc/jamidht/conversation.cpp
- src/jamidht/conversation.h 45 additions, 4 deletionssrc/jamidht/conversation.h
- src/jamidht/conversation_module.cpp 18 additions, 16 deletionssrc/jamidht/conversation_module.cpp
- src/jamidht/conversation_module.h 2 additions, 2 deletionssrc/jamidht/conversation_module.h
- src/jamidht/conversationrepository.cpp 34 additions, 27 deletionssrc/jamidht/conversationrepository.cpp
- src/jamidht/conversationrepository.h 12 additions, 4 deletionssrc/jamidht/conversationrepository.h
- src/jamidht/jamiaccount.cpp 301 additions, 214 deletionssrc/jamidht/jamiaccount.cpp
- src/jamidht/jamiaccount.h 21 additions, 6 deletionssrc/jamidht/jamiaccount.h
- src/jamidht/swarm/routing_table.cpp 29 additions, 0 deletionssrc/jamidht/swarm/routing_table.cpp
- src/jamidht/swarm/routing_table.h 11 additions, 1 deletionsrc/jamidht/swarm/routing_table.h
- src/jamidht/swarm/swarm_manager.cpp 138 additions, 102 deletionssrc/jamidht/swarm/swarm_manager.cpp
- src/jamidht/swarm/swarm_manager.h 97 additions, 26 deletionssrc/jamidht/swarm/swarm_manager.h
- src/manager.cpp 7 additions, 15 deletionssrc/manager.cpp
- src/manager.h 7 additions, 6 deletionssrc/manager.h
Loading
Please register or sign in to comment