Question: possible reliability issues
Hi! I'm a huge Jami enthusiast, but I'm struggling with a big problems with sending and receiving messages. So I've spent a couple of days at reading the docs and trying to investigate the problem using adb and own TURN-server logs.
I'm a completely newbie to the OpenDHT, TURN and Jami, so it's a little bit hard to get everything right so fast for me. I have some suggestions about the potential cause of my problems, so I ask for your help with clarification on how Jami works.
Alice and Bob want to communicate. Both of them are behind the NAT, so they have to use TURN.
Both Alice and Bob periodically announce their public IP-addresses to the OpenDHT, let's call this periods
t_an_b respectively. So, I guess, it looks like:
Alice --> TURN_a : gets a public address and port Bob --> TURN_b : gets a public address and port Alice --> DHT_node_x : publish her public address and port Bob --> DHT_node_y : publish his public address and port
DHT nodes are replicating to each other, so there's a potential little lag.
Further Alice wants to message Bob, so she has to discover Bob's addresses in the OpenDHT and then connect to him and send message
Alice --> DHT_node_1 : where's Bob's address? Alice <-- DHT_node_1 : it's at DHT_node_2 Alice --> DHT_node_2 : gets Bob's address Alice --> (TURN_b) --> Bob : sends the message
But, as I understand, TURN sessions have a limited lifetime, let's call it
t_tu_b for Bob. So, if
t_an_b > t_tu_b, it may cause the next situation:
Bob --> TURN_b : gets a public address and port Bob --> DHT_node_y : publish his address and port Alice --> DHT_node_1 : where's Bob's address? Alice <-- DHT_node_1 : it's at DHT_node_2 Bob <-- TURN_b : session expired Bob --> TURN_b : makes a new connection with a new port Bob --> DHT_node_y : publish his address and a new port Alice --> DHT_node_2 : gets Bob's address and _old_ port Alice --> (TURN_b) : tries to connect to the closed old port Alice <-- (TURN_b) : connection refused _REPEAT_
- what are my mistakes in the understanding of the Jami mechanism?
- if I am close to the truth, how is this situation mitigated? Can it be a real problem?