This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (9)
- # bangalore-clj (1)
- # beginners (6)
- # cider (17)
- # cljs-dev (9)
- # cljsrn (31)
- # clojure (70)
- # clojure-spec (19)
- # clojurescript (122)
- # cursive (1)
- # datomic (20)
- # dirac (8)
- # fulcro (19)
- # hoplon (25)
- # instaparse (2)
- # lambdaisland (3)
- # luminus (8)
- # lumo (10)
- # om (22)
- # parinfer (25)
- # protorepl (2)
- # re-frame (35)
- # reagent (1)
- # test-check (5)
- # unrepl (6)
i curious how many folks have applications that have something like a global
:entity/class keyword attribute - and how many people don’t - i’m curious what compelled ppl to include that attribute. or how people get by without it. war stories welcome 🙂
Hi everybody, been playing around with Datomic for about 3 months. I have a transactor question I was hoping someone here could shed some light on. Is it possible to have 2 transactors on the same data store? So not an HA scenario, but rather 2 distinct apps with their own databases, but sharing eg. a Cassandra cluster database store.
Yes you’re right you could do that. Though wouldn’t the transactor become a bottleneck before some thing like a cassandra database cluster would (with regards to write throughput)?
@U6QTF2C5A it sure allows for less write throughput (although I seem to recall someone saying that transactions from both dbs will be processed in parallel)
I've never set up cassandra storage for Datomic, but I guess what you could do is set up one cassandra table for each db on the same cluster. I see nothing in the configuration template nor the connection string that prevents you from doing that.
Thanks @U06GS6P1N I guess the only limiting factor that I can think of would be licensing costs 😛 but I will try get a test setup going to test this out.
OK so I see the cassandra config cql statements make a default keyspace of
datomic and a table
Transactor template has default option of
cassandra-table=datomic.datomic set. So if you change the keyspace and table values accordingly you should be able to get more than one transactor on a cassandra cluster.
@bbloom i dabbled with a type attr but didn’t enjoy what it did to queries - needing two clauses for a lookup e.g.
:entity/identifier or when walking relationships. found that i prefer one attr that both denotes type (through its ns) and identifier (through its name), and suffer a little
(some-fn :one/id :two/id) when the need for polymorphic code arises
indirection in schema adds a LOT of cognitive overhead, i’ve found. data you can immediately understand with a uri and
datomic.api is a big win
i built https://github.com/Cognician/datomic-doc#namespace-list to make browsing and overall discovery easier for myself
@robert-stuttaford could you elaborate on your difficulties with a
type attribute? I am doing something similar in my current app (first datomic application ever)
Yes I use an entity type attr, but I don't use it to alter meaning of the attrs on the entity (so I never need to double lookup) I use it to establish what attrs are expected or required
thx for the responses folks - @robert-stuttaford could you elaborate a bit? was it necessary for the identifier to be paired with the type? seems like having a type attribute doesn’t mean you can’t have globally unique ids
Yes, similar, although predates and is not spec. Our entities are still open (some attrs are not entity-type specific), but we know required and optional attrs per attr. We also have cases where we need to refine (constrain further, Xsd style) particular attrs, an additional entity "subtype" (called profile) governs this. We don't have a comfortable way to handle this wth spec, and we didn't invent this type system so we can't just design the concept out