I am building a web based chat application using Node.js. I am kinda building it gradually while the app is already running in a Node.js PaaS and being tested by my bunch of friends. The thing is, I can't spend much money on database services to store chat history.
So I am designing a sophisticated file-based database system just like SQLite. Although I am aware that SQLite does similar job, I wanted to store data in a JSON format. The reasons are many. One notable reason is, to reduce CPU usage, I will just send raw JSON data to clients where they will be rendered properly using AngualarJS.
My questions are:
- What are your opinions about this method?
- Is this method both vertically and horizontally scalable?
- What are the possible security issues?
- Is there any alternate method available?
Please note that this solution is only for trivial data storage like chat history. I am not gonna use this method for a large and serious web applications.
Update: I don't want to use MongoDB or others since I cannot afford them for this project. I want to store data in a flat-file and place it in a disk. Because, many PaaS providers give 1GB of disk space at just $1 whereas 1GB of MongoDB storage is very high... also they even bill us for the amount of data transferred, number of PUTs and GETs etc.