This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-22
Channels
- # aws (4)
- # bangalore-clj (2)
- # beginners (99)
- # boot (8)
- # clojars (22)
- # clojure (87)
- # clojure-dev (2)
- # clojure-greece (10)
- # clojure-russia (22)
- # clojurescript (80)
- # cursive (4)
- # data-science (2)
- # datomic (10)
- # emacs (1)
- # fulcro (1)
- # garden (2)
- # luminus (1)
- # lumo (29)
- # off-topic (20)
- # om (6)
- # onyx (18)
- # parinfer (7)
- # perun (1)
- # portkey (28)
- # re-frame (93)
- # reagent (59)
- # ring-swagger (2)
- # shadow-cljs (31)
- # slack-help (15)
- # spacemacs (5)
- # uncomplicate (3)
- # yada (6)
do i understand it correctly that datomics internal ids should typically not be used anywhere else in the application ? say that i have a bunch of objects which i want to uniquely identify, what's preventing me from using that id in other places in my application ?
what i'm planning on doing right now is to simply associate each user with a uuid (generated using squuid), and indexing that, but i'm not sure whether this is the best practice ?
@lmergen I would highly recommend generating squuids for any entity you need to reference externally (e.g. that users interact with, that you have APIs for, etc). The upside is 1. you now have a globally unique id for an entity, which is good conceptually and 2. it enables certain things like decanting and sharding. The downside is a small storage and indexing cost.
This article has a decent rundown on it: https://tomharrisonjr.com/uuid-or-guid-as-primary-keys-be-careful-7b2aa3dcb439