Hacker News new | ask | show | jobs
by darkxanthos 4816 days ago
When you first start a project and have only one server a single file can be fine. Once you start getting too many people though you'll start dealing with file locks. One way of solving that is to map a file to each individual user (sharding). If you make each entry into the file immutable this will work beautifully for a while.

If you introduce the idea of groups of users you'll probably want to create a group text file for each user rather than store it as an entry in their pre-existing text file (kinda like an index though different)...

Main point being- I advocate starting with a text file until the complexity of managing that file begins to outstrip the complexity of managing a third party data store.

To many people go straight to a 3rd party data store by default when text files are extremely capable.