Sounds like how MongoDB was born. I believe that has made a lot of people very angry and been widely regarded as a bad move.
Json-Base – Database built as JSON files
21–30 of 189 posts
Re: Json-Base – Database built as JSON files
#22I work on a system with a JSONB column with 11k unique paths with no schema. I created some tools to generate jsdoc which is a start, but please no.
Re: Json-Base – Database built as JSON files
#23I don't mean this negatively, but I'm having trouble thinking of a real-world use case for this. Can anyone add some?
Specifically for storing the results/state of a set of manually-executed management scripts. The scripts needed to query the data from previous executions, do some stuff, and store the output. Think poor mans version of terraform.
Everything was dumped in a git repo that was shared across a few people. It was a quick and dirty solution to manage some alpha customers before the "real" system came online.
Re: Json-Base – Database built as JSON files
#24Also, the writing in the README feels sloppy, which doesn’t inspire confidence. For example, you might want to decide if it’s called jsonbase, JSON-base, JSONBASe, Json-Base, JSON-Base, json-base or jsonDB.
Re: Json-Base – Database built as JSON files
#25Re: Json-Base – Database built as JSON files
#26Someone at my old company basically did this and put it into production. The first problem he encountered was that multiple connections couldn't both be using the database at a time without clobbering each other. "No problem," he thought, this is a good use case for micro services. A service sitting on top would ensure that there was only one operation being performed at a time. Next, his problem was that the databas…
Just use SQLite, people. Even JSON-in-SQLite is still likely to be an improvement.
Re: Json-Base – Database built as JSON files
#27I work on a system with a JSONB column with 11k unique paths with no schema. I created some tools to generate jsdoc which is a start, but please no.
Are there tools which will scan a body of JSON and and generate all the unique paths? Is it common to do this?
Re: Json-Base – Database built as JSON files
#28I don't mean this negatively, but I'm having trouble thinking of a real-world use case for this. Can anyone add some?
Re: Json-Base – Database built as JSON files
#29It's all fun and games until this ends up in somebody's production environment.
Re: Json-Base – Database built as JSON files
#30JSON file as backend, So can I directly edit the JSON file?
You have to run a “freeze” command before editing the database directly (so it can flush the current version of the database, and redirect writes to memory + log), and then “thaw” so it can read your changes and apply the log of updates to it.