stephanenicolas / robospice

Repo of the Open Source Android library : RoboSpice. RoboSpice is a modular android library that makes writing asynchronous long running tasks easy. It is specialized in network requests, supports caching and offers REST requests out-of-the box using extension modules.
Apache License 2.0
2.95k stars 545 forks source link

Extending Robospice with request persistence #435

Open aschelch opened 9 years ago

aschelch commented 9 years ago

Hello everyone,

Robospice is quite an interesting library. I developed a similar system that goes a bit further in terms of feature. But my library is quite difficult to maintain and extend compared to Robospice. I am thinking of extending Robospice and add features that is missing for me.

The first feature is a request persistence mechanism. I explain why : I need my app to be able to execute API call (to upload some data), even if a don't have internet at the time of the request. And even after the device is shut down and restarted. My internal solution use a database to store each API query (url, params, ...).

And another feature is to keep API call order. Some API call have to be executed in a specific order. For example : /api/start /api/doSomething /api/doSomething /api/stop

The system should call these API calls in order. If the /api/start return a 500 http error for instance, we have to wait before executing the 3 other calls.

How would you do to this request persistence mechanism and call order ? By extending RequestProcessor, RequestRunner ?

Thanks in advance for your advises.

psharrma commented 8 years ago

Hi @aschelch ,

That is what exactly i found missing in this great but less known library, Did you finalize on the approach? If not may be i could be of some help.

Food for thought: one more feature i found missing(may be I am wrong here) is to launch another Request from current Request, And Still interesting UI Elements should be able to listen to the result.

Best,