top | item 27414135

Ask HN: Need a simple HTTP service that allows basic string persistence

3 points| roberja90 | 4 years ago | reply

I am building a simple bot. The bot scrapes an RSS feed. The only persistence I need is the date time of the most recent item on the RSS feed. I dont want to have to spin up a DB.

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.

4 comments

order
[+] vhodges|4 years ago|reply
How durable do you need it to be?

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.

[+] roberja90|4 years ago|reply
Wow looks really cool. I was actually hoping for zero configuration on my part but this looks really exciting. Going have a play
[+] pwg|4 years ago|reply
> I am building a simple bot. The bot scrapes an RSS feed. The only persistence I need is the date time of the most recent item on the RSS feed. I dont want to have to spin up a DB.

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.

[+] roberja90|4 years ago|reply
Sorry forgot to mention one other requirement... This script will be running in cloud so cant rely on a simple local file for implementation.