by roberja90 on 6/6/21, 4:18 PM with 4 comments
What would be great is a service that allows something like the following simple-storge.com/account-id?data=the-date-i-want-to-store
Anyone know of anything like this that exists?
Any help greatly appreciated.
by vhodges on 6/6/21, 4:28 PM
A small go service writing to a sqlite db would be pretty easy (and probably pretty performant) but needs streaming replication to improve robustness/durability. For that see:
https://litestream.io/ and https://mtlynch.io/litestream/ (an example) Edit: I just re-read the mylynch.io post and it probably has all the code you need.
Probably could run it on the fly.io free tier + S3/B2 storage costs.
by pwg on 6/6/21, 4:44 PM
So, open a local file, overwriting any old contents, and write out the date and time of the most recent item retrieved when done.
Then, before starting the next fetch, open the file and read in the saved date/time to use to determine which new items to fetch.