Fork me on GitHub

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


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


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


@misha: also consider using 'squuids` for better indexing of uuids ->


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


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.


@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


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


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.


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?


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


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


yes. large strings do create performance pressure on Datomic


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


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


good, my understanding is relatively accurate simple_smile


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


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


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:


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


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


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


the marketing site seems to focus on 'immutable database'


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.


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.


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


I have started getting exceptions like these in my peer:

HornetQNotConnectedException: HQ119006: Channel disconnected
HornetQNotConnectedException: HQ119010: Connection is destroyed
ExceptionInfo: Error communicating with HOST 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?


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


you're thinking that the connection object was GCed?


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