4 ms·
I'm writing a small webapp and I'm hosting it on a PAAS which is stateless between deploys. I merely need to persist a single string between deploys, which get
by tester457 3y ago
I'm writing a small webapp and I'm hosting it on a PAAS which is stateless between deploys.
I merely need to persist a single string between deploys, which gets changed when the app is running.
And buying another service like S3, or hosting postgres or a databse is overkill.
So this seems promising!
- WA 3y agoMaybe you need this: https://textdb.dev/ https://textdb.dev/
- tester457 3y agoThis is cool thanks!
- kqr 3y agoHuh, that is a very interesting problem to have. It's certainly not the scale or complexity or security or reliability requirements that make storing your data difficult -- it's the choice of hosting technology! That sounds dismissive but I don't mean it that way. I'm sure you've chosen wisely. I just find the problem intriguing because I don't know of any obvious solution and it's not one of the common problems people have with persistence. I'm trying to think of what sort of stateful servers you might be using anyway that you can piggyback for this. Some ideas: - SSH to any Unix box really - Email - Web-based pastebin service with an API - Regular Twitter tweets - Something stored on whatever you are using to conduct the deployment - An image uploaded to imgur where the image data are the string you need - DNS records - Any web service where you have a user profile editable through an API you could use one of the profile fields to store the string The list is getting more stupid as I go so I should probably stop there. But if you have written the service such that you can reject a deployment unless you're sure it worked, you are technically free to use quite stupid ways to store the data because worst case the deployment just fails and the old code chugs on.
- tester457 3y agoThanks for considering my problem intriguing. I didn't find your comment dismissive at all and I appreciate your thorough response. Also your ideas are interesting! The last one especially. > But if you have written the service such that you can reject a deployment unless you're sure it worked, you are technically free to use quite stupid ways to store the data because worst case the deployment just fails and the old code chugs on. I do and there's lots of error handling, so I'm not worried about doing a fun idea like editing a user profile via API. Your suggestions have my gears turning.
- rvense 3y agoHow big is the string? Does it really need to go on a server? Have you considered just using the brower's local storage?
- tester457 3y agoIt is 10 characters long max. I haven't considered browser local storage before. I want to use the string as a single source of truth but I appreciate your suggestion!
- rvense 3y agoNot knowing anything at all about what you're doing I'm sure my suggestions are extremely good :) But at 10 characters I'd use local storage and instead of having any sort of account system or such, if it needs to be shared you could just use a link with the string as a query parameter.
- Ingon 3y agoIf you wanna also preserve history, this could be an option for you https://klev.dev https://klev.dev . It lets you persist changes, get the last value, or get all values you've stored.