3

I'm developing a solution that is to be self-hosted, and currently using MongoDB. But I also want all information to be stored in JSON files, making it easy to move it to another system, effectively having to keep data synchronised between the files and a database.

This means the absolute only reason I use MongoDB, is because it's faster and easier to query. Considering it's a free and self-hosted project, does it even make sense to add a database into the mix at this point then? It's probably mostly going to be used by people who don't work in tech, but just have it as a hobby.

It's obviously going to be a subjective answer, but I'd like to hear peoples thoughts.

Comments
  • 1
    couchDB is a json based database
    http://couchdb.apache.org

    and there is a realtime variant named pouchDB https://pouchdb.com/
  • 2
    Or just dump your mongodb. Oplog could be a solution too.
  • 1
    Why not traditional database?
  • 3
    I'd say abstract the code responsible for storing stuff and provide a default implementation that stores stuff to json files.

    Then if someone wants to use MSSQL, MYSQL, or Mongo DB or whatever, they can provide their own implementation of your storage API.
  • 0
    @Cultist haven't heard about oplog before. Care to elaborate?

    @arraysstartat1 I've used traditional DBs a lot in the past. While this is a system for the masses, I'm using it as an opportunity to learn. Plus it's going to be a very JSON-file oriented system, so a NoSQL makes sense.

    @MrCSharp That's a very good idea. I'll think about that.
  • 0
    @KasperNS Not sure what you are trying to do here...
    You want to keep json data, and you want to decide between:
    1. mongo
    2. files
    3. traditional db.
    4. some random storage?

    You are looking at this all wrong. How many users? how many concurrent? will the data change? how often? need to scale? what IS the scale?
    When you have an answer for this, then you can decide on "json storage" solution.
Add Comment