Settings

Theme

Tell HN: The way I do simple data management for new prototypes

15 points by AndreyK1984 15 days ago · 8 comments · 1 min read


Hi folks! I have huge success on a prototype of this approach:

- Store all data as json

- App loads: load full json on a client

- Something changes by user - change json locally and every 10 seconds save whole json to backend as a single json file

- also every 10 seconds load the updated json from backend to client.

Yes, I know, parallel access problems, lack of schema, lack of db, using file to store. But how much it makes life easier and speed ups development at start! I am in this over 20 years, and I like dumb stupid solutions applied properly. Duct taping forever!

tacostakohashi 15 days ago

Nice!

Files are pretty handy. It's a bit surprising how many people seem to have forgotten they are a thing... but not that surprising, given how hard big tech have tried to uninvent them.

  • AndreyK1984OP 14 days ago

    Yep. If I have only one express js process - I can just save and load. if it is 1-5 users - lets story all in a single JSON (although sometimes I use excel for storage). People underestimate simplicity

awright96 15 days ago

That's certainly one of the development strategies of all time

mikert89 14 days ago

honeslty with ai, i bet this works really well and basically removes all backend complexity

crabl 15 days ago

you can also chuck a json blob into LocalStorage

  • AndreyK1984OP 14 days ago

    Thank you, yes and indexed db too, as in other comment.

    I like to have exactly two API calls.

    -- load data (returns json)

    -- save data (sends json, returns 200 ok)

    That is all! Let frontend bind everything to that json and save it every 1-2 seconds in setInterval.

owebmaster 15 days ago

Use indexeddb

apothegm 15 days ago

Y tho?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection