oppia / oppia-android

A free, online & offline learning platform to make quality education accessible for all.
https://www.oppia.org
Apache License 2.0
322 stars 523 forks source link

Retry Policy for Retrofit #76

Open rt4914 opened 5 years ago

rt4914 commented 5 years ago

The data module is responsible for all the API calls and there should be a retry policy when API call fails. Retrofit does not have retry policy by default. We should probably use OkHttp interceptor to solve this issue. We will be handling standard error codes centrally and the error codes 408-Request Timeout, 502-Bad Gateway, 503-Service Unavailable and 504-Gateway Timeout will result in exponential backoff policy with limited number of retries. For example, we can have 3 retries (with 2, 4 and 10-second waits between successive retries). The exponential policy with limited retires will avoid overloading the Oppia backend and will also use limited mobile data of the user.

This is blocked on #5

Mehul-Bisht commented 3 years ago

Is this issue still blocked?