Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implementing a Persistent Data Queue for guaranteed cloud sync on Android

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?

like image 950
Nowa Concordia Avatar asked Apr 26 '26 09:04

Nowa Concordia


1 Answers

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.

like image 184
MarkySmarky Avatar answered Apr 27 '26 23:04

MarkySmarky