Datalevin seems very exciting and thanks for putting in the time to make it and continue to make it. I have some questions for anyone with experience
1. For those running it in production, would you mind sharing where and how and how you deal with backups etc.
2. If I want to do a database per user, is it as simple as (d/get-conn "/tmp/datalevin/user-1" schema) and then just keeping the connections for users in memory and grabbing the one you need based on the user making requests?
3. If the db is in some durable storage, I understand that I can have many different instances reading from the db without issue, but am I correct in saying that only one instance should be able to write?
Thanks for your time
I can’t speak on 1 and 3 but we have 1 db for user and it works pretty well. We keep them all in memory, the connections themselves don’t seem to take up a lot of resources
For 1, backup can be done with dtlv command line tool to copy the DB. Or you can copy in your application process, see https://clojurians.slack.com/archives/C01RD3AF336/p1728244468549339
3. You can have multiple processes read/write the same DB. There's a mutex to ensure there's only one process writing to the DB at a time.
Thank you all. Ok so to expand on point 3. Say I have the db on aws EBS or EFS, I would be able to write to it from multiple EC2 instances? Or would it be preferable to only have 1 EC2 instance being able to write?
I found this previous post and will accept that as my answer 😉 https://clojurians.slack.com/archives/C01RD3AF336/p1647904313567979