Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Well you can store metadata in SQLite. You can update metadata and files in a transaction. It already has a caching layer built in (I think 8mb by default, that might need some tuning for this use case). It is thread safe (I mean it is a giant rw mutex but whatever) Does not sound that bad to just use it instead of building a caching layer that might be marginally faster than sqlite. And if you restart your caching frontend thing, it will need to rebuild the cache using tons of syscalls. SQLite cache will fill up easier as it has less context switches.

One major downside I see would be backing up the database. You can do granular backups on a filesytem. Even rsync would work fine. You’d need to basically snapshot the entire thing here.



sqlite-rsync is on the road.


I have no idea why this comment was dead and I vouched for it.

Just recently the `sqlite3-rsync` tool was added to SQLite and it does point-in-time backup, effectively.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: