Fork me on GitHub
#datomic
<
2017-11-06
>
mitchelkuijpers14:11:32

I have a general question how de other people approach multitenancy with datomicdb. We currently have around 300 customers and we just put everything into one big datomic db en dan add references for all entities to the correct tenant. Have people tried a datomic db per tenant approach? Not sure if that is even feasible

hmaurer17:11:40

@U09R86PA4 is doing a db per tenant iirc

favila17:11:00

Why not feasible? if anything it made our job easier

favila17:11:56

It made it much easier to isolate data between our customers. a coarse-grained permission system: you can't see other people's data if its not in your database

favila17:11:20

everything they legitimately share is in separate shared dbs

hmaurer17:11:39

@U09R86PA4 out of curiosity, do you ever end up doing cross-database queries? (since datomic allows it)

favila17:11:44

we do denormalize a lot, but that matches our domain's way of doing things

favila17:11:09

(health records and communications)

favila17:11:25

every provider has their own view of the world. normalization makes that hard to maintain

favila17:11:40

yes we do cross-db queries sometimes

mitchelkuijpers21:11:50

But how does that work with transactors can one handle multiple dbs?

mitchelkuijpers21:11:43

I would feel so much better if we separate every tenant..

favila21:11:06

yes transactors handle multiple dbs

favila21:11:24

didn't you notice you have to specify a db name in your connection string?

favila21:11:56

That's a downside too depending on your storage. There is one (active) transactor per storage.

favila21:11:24

If you want to keep them on separate storages too, you will need more transactors

favila21:11:37

also cross-db atomic commits is impossible

favila21:11:46

so make sure you don't need those

mitchelkuijpers21:11:20

Ah that is not a problem. But you can add extra transactors if you need it for write troughput for tenants then right?

favila21:11:57

You need a backup+restore (thus downtime), but yes you can move a tenant to a different transactor

mitchelkuijpers21:11:04

Thank you so much, this helps a lot

souenzzo17:11:32

I'm using incremental S3 datomic backup. Let suppose day 1 backup, day 2 backup, day 3 backup. On day 2, due a hardware failure, there is a corruption on store that don't block day 3 backup. How do I restore my database, from s3 day1?

marshall19:11:01

Come join us on the new Datomic Developers Forum at http://forum.datomic.com !

marshall19:11:57

^ setting a topic so folks can see the announcement once it scrolls up a ways