I'm developing a real time data collection application of Android. Currently I produce ~1.2 KB of data each second, and i need to upload them each second to a remote server through a REST API.
Problem is that this data is critical and I can't tolerate any loss. So I need to cache them on disk and upload the data to remote server. After a confirmed delivery of each data, it can be deleted from the cache, otherwise cache must be preserved until it gets uploaded successfully, even after a device reboot.
What are the the best approached to solve this problem in your point of views? What are the tools/frameworks/libraries that might be helpful in creating the solution?
I would go with Square Tape (http://square.github.io/tape/) it guarantees that data will be written to disk no matter what. You can handle then your own logic of syncing it and re-queueing in case of a failure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With