I'm writing an app that needs to periodically send data to a web host. Because I want to handle the situation when there is temporarily no connectivity, I need to be able to store data that I am currently unable to send, and then try to send it again later. And, of course, sending it later might fail too.
So, I thought that a FIFO buffer might be the right kind of "device" to use. And it looks like the B4A LIST function does almost everything needed, except for an easy way to remove items from the buffer, oldest first. I guess I can't expect all of the work to be done for me!
Anyway, what I propose is that I store my http POST transactions into the buffer, then have a sub that tries to send the buffer one item at a time. If this fails, I'll set a timer to timer to retry every 15 minutes, until the buffer is empty.
Does anyone forsee any problems with this scheme, or have any alternative ideas?
So, I thought that a FIFO buffer might be the right kind of "device" to use. And it looks like the B4A LIST function does almost everything needed, except for an easy way to remove items from the buffer, oldest first. I guess I can't expect all of the work to be done for me!
Anyway, what I propose is that I store my http POST transactions into the buffer, then have a sub that tries to send the buffer one item at a time. If this fails, I'll set a timer to timer to retry every 15 minutes, until the buffer is empty.
Does anyone forsee any problems with this scheme, or have any alternative ideas?