xemantic / github-users

Lists GitHub users. Minimal app demonstrating cross-platform app development (Web, Android, iOS) where core logic is shared and transpiled from Java to JavaScript and Objective-C.
GNU General Public License v3.0
6 stars 2 forks source link

Service layer methods should have retry-on-fail mechanism #10

Open morisil opened 6 years ago

morisil commented 6 years ago

The UserService, when implemented on different platforms, should provide retry-on-fail for each method, and also exponential backoff mechanism which is quite easy to deliver on top of RxJava. Still it seems that some shared utilities might be needed for this purpose (ahkh project). Exceptions specific to the transport layer should be analyzed because some of them are not eligible for retry (e.g. API rate limit exceeded).

References: https://en.wikipedia.org/wiki/Exponential_backoff