Fork me on GitHub
#datomic
<
2017-08-19
>
bbloom01:08:36

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 🙂

foomip05:08:56

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.

val_waeselynck14:08:37

You can even have 2 apps share a transactor

foomip17:08:49

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)?

val_waeselynck08:08:59

@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)

val_waeselynck09:08:19

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.

foomip09:08:48

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.

foomip10:08:41

OK so I see the cassandra config cql statements make a default keyspace of datomic and a table datomic.datomic.

foomip10:08:38

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.

robert-stuttaford16:08:05

@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/type + :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

robert-stuttaford16:08:47

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

robert-stuttaford16:08:47

i built https://github.com/Cognician/datomic-doc#namespace-list to make browsing and overall discovery easier for myself

hmaurer16:08:01

@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)

hmaurer16:08:48

why would you need two clauses for lookup if your identifiers are globally unique?

favila17:08:03

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

bbloom18:08:49

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

bbloom18:08:29

@favila - multi-spec style?

favila03:08:54

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

bbloom19:08:52

interesting - thx

bbloom19:08:02

further constraining specs is something i’ve wondered about too