Use "send the sender" trick for all Database interfaces
realcr opened this issue · 1 comments
realcr commented
Change all the request/response style interfaces with the Database module to use "send the sender" trick. In other words: Add to all request messages a field response_sender: mpsc::Sender. The Database module will then use the obtained sender to send the response.
In addition, we need to add the possibility of failure when trying to obtain something from the database. ResponseLoadFriendToken and ResponseLoadNeighborToken for example, should be able to indicate that no such Friend or no such Neighbor exist.
@kamyuentse: It is possible that some code at the Database module needs to be changed to allow these modifications. I will check this.