Fork me on GitHub
#datomic
<
2015-12-14
>
bostonaholic02:12:51

it really depends on how you're going to query them

bostonaholic02:12:21

if you have a uuid and you know you want a bus, then maybe the latter is better

bostonaholic02:12:58

but if you have a uuid and you don't know if you want a bus or a route then the former is probably what you want

bostonaholic02:12:23

@misha: also consider using 'squuids` for better indexing of uuids -> http://docs.datomic.com/identity.html#sec-6

misha02:12:39

@bostonaholic: using squuids, yes. No idea about the queries, beyond pull api yet, working through this now.

misha02:12:05

In my case, those guids are secondary, as I need them only (for now) to maintain relationships between entities during export/import db data, and to have common id (ref) between ui (datascript) and be (datomic(s)). Most of the other things I thought of – will/can be covered with pull api or other attributes.

robert-stuttaford05:12:15

@misha: if you’re ever going to seek using this uuid, you should make schema for each entity type. otherwise your queries will have larger datasets to seek through

domkm07:12:29

@robert-stuttaford: What do you mean by "seek?" Does that include using a global id in a lookup ref?

robert-stuttaford09:12:47

yeah. it has to scan through the AVET index to find your value when you use lookup refs or any [?unbound-id :attr ?bound-value] datalog clause. using semantically assigned attrs lessens the size of that seek space.

ustunozgur13:12:55

this might be a dumb question, but why doesn't datomic have an edn or json type? or does it? sometimes I want to tuck away some random bag of data to an attribute of an entity, do I have to convert that to a string and save it that way?

robert-stuttaford15:12:16

just pr-str when transacting, and clojure.edn/read-string when reading

curtosis15:12:12

I would think that depends on the scope of "random bag of data". At some point you're working against datomic, no?

robert-stuttaford15:12:46

yes. large strings do create performance pressure on Datomic

robert-stuttaford15:12:21

we use it for very small edn blobs, under 1k, where only the client-side consumer cares about it

robert-stuttaford15:12:03

a trade-off decision against making unnecessary schema for stuff we’ll never query against or call on directly

curtosis15:12:45

good, my understanding is relatively accurate simple_smile

curtosis15:12:45

worth highlighting that that's clojure.edn/read-string, not clojure.core/read-string.

robert-stuttaford15:12:14

yes, that’s important; the former does not evaluate Clojure code

val_waeselynck17:12:15

is there a commonly accepted name for databases like Datomic in the academic world? It seems that 'Functional Database' is already taken for something else: https://en.wikipedia.org/wiki/Functional_Database_Model

val_waeselynck17:12:40

@bhagany: I'm actually more interested in the 'database as a value' quality, not the data schema

bhagany17:12:36

ah, I don't have a good comparison for that part of it

val_waeselynck17:12:51

I'll go ask on the mailing list, the guys in the Datomic team have probably done that research simple_smile

robert-stuttaford19:12:42

the marketing site seems to focus on 'immutable database'

bkamphaus19:12:48

While I’m not going to add anything definitive, I’ll note you have to be cautious when pulling terminology from the literature or generalizing from terminology we or others use like “deductive database”, “universal schema”, “triple store”, “append only”, “accumulate only”, etc. — because a lot of the assumptions/typically included components with those models historically largely do not match Datomic’s architecture as a whole.

bkamphaus19:12:03

The literature itself isn’t always crystal clear on what a lot of these are precisely, so it’s not just Datomic per se. I think the problem implied by the questions, i.e. something like “If I only knew what Datomic’s data model was called precisely I could find an article on how to design my schema to represent X”, isn’t necessarily solvable on those terms, if that makes sense.

robert-stuttaford19:12:30

so, Datomic is a chimera of many good ideas from many places simple_smile

ljosa21:12:20

I have started getting exceptions like these in my peer:

HornetQNotConnectedException: HQ119006: Channel disconnected
HornetQNotConnectedException: HQ119010: Connection is destroyed
ExceptionInfo: Error communicating with HOST 10.43.180.240 on PORT 4334
HornetQInternalErrorException: HQ119001: Failed to create session
IllegalStateException: Connection is null
HornetQInternalErrorException: HQ119001: Failed to create session
This is a peer that does a couple of large queries, then does some computation and saves the result to disk. It does not write anything to datomic. The queries work fine, and in fact the computation is able to finish after the exceptions appear in the log. Any idea what's going on?

misha22:12:57

@ljosa: garbage collection? did you try to increase peer's memory?

ljosa22:12:51

you're thinking that the connection object was GCed?

misha22:12:52

If computation and queries were large enough – it might have been. or maybe host is just unreachable as ExceptionInfo suggests.