[Thali-talk] Retry logic

Yaron Goland yarong at microsoft.com
Fri Jun 19 00:04:30 EDT 2015


Note: This is the public list. We need to start using it more often.

For story 0 we have an issue with retry logic. The problem is that the P2P connections on both Android and iOS will fail randomly and for no apparent reason. That is completely separate from failures due to users getting out of range. Normally we could just set PouchDB to auto-retry but that won't work in story 0 because iOS for sure and I strongly suspect Android won't have the right logic in place to reconnect at the P2P layer after the TCP relay fails during story 0.

So to help us get story 0 out the door I propose a simplification.

We should configure PouchDB to NOT automatically retry. Instead if there is a failure we should catch it and kill the replication completely. We should then call the api to connect to a peer again and get a new port and then retry the replication that way. We should keep this up until we finally get a notification from discovery that the user is out of range.

This *should* (famous last words) work well with the TCP bridges in both iOS and Android and certainly meets the bar for Story 0. If it works reasonably well then I'm happy leaving it in place for a while as we fill in functional gaps and treating it as a perf issue.

Thoughts?

                              Yaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist10.pair.net/pipermail/thali-talk/attachments/20150619/c34e8207/attachment.html>


More information about the Thali-talk mailing list