(Something you could make a video out of @JeffreyWay ?)
Checksum between two systems
Hello,
In my application, I have to sync large amounts of data between Android devices and my Laravel based Api. I can't tell you what it does exactly (due to copyright etc.) so I'll try my best to explain the situation
Once complete, I then get Laravel to queue the unprocessed data to process and cache the end result in Redis.
Once the user presses a button on my Android application, the Android application first sends an initial request to tell the Api to create a new entity and return the ID. Then the Android application proceeds to send chunks of 50 rows from its own internal Sqlite database to Laravel attaching the ID Laravel gave it.
At the end, the Android application then tells the Api that it is done and the Api lets it know whether it received it all successfully or not.
The Android application then clears the data out of its own internal database once the Api says it has received it.
So, the problem I have is, if (for instance) a chunk was missed for some reason (bad connection etc). What is the best way for Android and my Api to verify whether they are both looking at the same data? That the data made its way successfully all together on the Api side?
My first thought is possibly at the end, Android sending a generated checksum that the Api can compare with its own checksum.
How can I do this? Or is there a better way to ensure that the large amounts of data made it to my Api (and my Database)?
Cheers.
Please or to participate in this conversation.