Why does hexo use this database implementation?
- Dominant language
- TypeScript
- Stars
- 206
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Hello, this might sound rather naive, but why was a custom db made for hexo? (Maybe it's not made for hexo, as it didn't used to be a part of hexojs)
I don't understand why a flat file format was chosen, as opposed to say, an already existing database like mongo or other text storage databases that get more attention. I can see that installations are easier this way especially for users, data saving/retrieval are as simple as the `fs` api, and perhaps disk reads might be faster than talking to a mongo daemon (I don't know though, I haven't looked at any benchmark data). I can speculate, but I won't know for sure why this decision was made.
The part where we save all the post's content into the db.json seems redundant when file itself holds the data already, and we can just load the content from the file, rather than read a copy of the content from another text file (db.json). Wouldn't we be able to save a lot of space this way?
Thanks for reading and thanks for making hexo!
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.