Ask HN: What's your favourite way to store/host <1KB of state on the Web?
I do a lot of web-based hobby/fun apps/games for fun. An issue I keep running into is preserving basic state (eg. progress, save data, etc.) It's always tiny: <1KB. I could use `localstorage` but I want to share that state across devices.
Because these are toys, I don't need security, backups, scale, or size. Which makes almost any choice I professionally know about feel like overkill. I do not want to have to worry about or maintain a web server.
I feel like I am looking for a service something like this:
1. Make an account and receive a token.
2. Embed the token in my game.
3. Use the token to make GET and POST to the service.
4. Don't abuse it or my token gets rescinded and now nobody can access their high scores or whatnot.
5 comments
[ 3.4 ms ] story [ 23.5 ms ] threadBut more in depth, it's a good question!
You could get innovative and use localstorage combined with WebRTC to create a p2p storage "mesh". :)
Honestly tho I would use GitHub gists. They have an API. There's a token you can get. You could use whatever storage format you want (JSON anyone? Blah, why not just use malbolge).
Or if you're doing gists, why not go the whole nine gits? Depending on what your game runs on, you could just use git, to a shared repository, on GitHub.
That's the rub, I think. Any sensible person would scream, "SECURITY HOLE!" but for my use case, it's not an issue. Just some high scores for a game that like 100 people might play in its lifetime, or whatnot.
This doesn't cover collective access. Eg. high scores, though. I'm still thinking on that one. I think it's going to be impossible to find because of security implications. Services are either going to not want to make it work, or require accounts.