This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-07
Channels
- # bangalore-clj (2)
- # beginners (53)
- # boot (30)
- # cider (27)
- # clara (1)
- # cljs-dev (18)
- # cljsrn (16)
- # clojure (153)
- # clojure-brasil (1)
- # clojure-dusseldorf (5)
- # clojure-italy (20)
- # clojure-losangeles (3)
- # clojure-spec (4)
- # clojure-uk (177)
- # clojurescript (115)
- # component (4)
- # core-logic (1)
- # datomic (29)
- # emacs (9)
- # figwheel (2)
- # gorilla (1)
- # graphql (36)
- # hoplon (4)
- # jobs (1)
- # jobs-discuss (3)
- # juxt (2)
- # keechma (22)
- # lumo (4)
- # off-topic (1)
- # onyx (17)
- # parinfer (96)
- # protorepl (10)
- # re-frame (31)
- # reagent (14)
- # ring-swagger (17)
- # spacemacs (32)
Does d/squuid
start from some seed value? and if yes, what? It seems to always generate the same uuid in my tests
The most significant bits in a sequential UUID are a rounded timestamp so the UUID should change at least once per second regardless of any other randomness.
> Constructs a semi-sequential UUID. Useful for creating UUIDs that don't fragment indexes. Returns a UUID whose most significant 32 bits are currentTimeMillis rounded to seconds. http://docs.datomic.com/clojure/#datomic.api/squuid
I'm not sure exactly what Datomic does inside squuid
but based on that alone I'd expect the UUID to change every second or so.
Can you share some code, @hmaurer? So I can try to reproduce at my end. I've never seen a duplicate sequential UUID, but that's not to say it can't happen.
@hmaurer in some cases you can use this https://clojuredocs.org/clojure.core/with-redefs (Overwrite squuid with a function that always returns the same uuid)
Does anybody have suggested code or patterns for dealing with multi-tenancy, particularly on the transaction side, for instance, ensuring that the logged in customer only transacts to eid's in their partition. We have some code that does this, just curious how it compares with best practices etc.
@dave.dixon do you need to run transactions across tenants? if not, you could use a database per tenant
@hmaurer Cognitect recommends keeping the number of databases per transactor small, as there is overhead associated with each DB, thus the approach to put one customer per partition.
yeah, like in the context of what I assume is your application, it would be transferring a medical record from one system to another atomically
Is generating an or
expr the right way to test whether an attribute matches one of multiple values ?
@favila Can you give some idea of the number of DBs you're running on a single transactor?