datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
2020-08-05T08:42:35.090700Z

Hi, I'm trying to pull an entity and pull 1 attribute of it's recursive parents. '[:node/name, :node/bunch-of-attrs, :node/other-attr, {:node/parent ...}] works, but pulls all attrs every parent. i want to limit that to just name . Any way to achieve that?

favila 2020-08-05T12:05:04.093Z

Don’t know for sure but try this [,,, {:node/parent [:node/name {:node/parent ...}]}]

1🎉
2020-08-05T12:14:54.093300Z

That worked! Thanks.

2020-08-05T13:59:26.097100Z

Does anyone know of a good comparison between the various on-prem datomic stores? We're thinking about a new project based on datomic and I was wondering if there exists a discussion of the pros and cons? I think our options would be (1) Postgres (2) Cassandra (3) Some other SQL (4) datomic cloud with the caveat that we're running in google cloud so would require data to cross clouds which may be an issue for dataomic (I can't find an opinion on this either).

2020-08-06T10:54:19.106800Z

Yeah that's the big question with that approach. Although we could potentially host our read clients inside AWS meaning that only the writes would originate in GCP which seems likely to work for our usecase. Not ideal to have to run a service away from our others but we need to weigh that up against running a database. Usually running services is easier than databases!

robert-stuttaford 2020-08-05T14:07:33.097800Z

just to forewarn that datomic cloud is a totally different system to on-prem, you'll architect differently and use completely different libraries

favila 2020-08-05T14:12:50.097900Z

on-prem vs cloud is the big difference. Within on-prem, I think you should just use whatever storage you are most familiar with

favila 2020-08-05T14:14:39.098100Z

datomic on-prem uses storage as a key-value store for smallish (<60kb) binary blobs. I doubt any of the options have a clear advantage

favila 2020-08-05T14:15:26.098300Z

and you’ll run anything serious with memcached or valcache

zilti 2020-08-05T15:02:05.098500Z

If you are on Google Cloud you can use their managed PostgreSQL as a backend for Datomic

favila 2020-08-05T15:23:51.098700Z

I can confirm the managed mysql also works fine (with some schema tweaks: https://gist.github.com/favila/ecdcd6c4269ff2bd1bb3)

2020-08-05T15:25:25.099300Z

Thanks all - we do make use of managed postgres at the moment which would make it an obvious choice. Although google does require occasional downtime for updates which is a shame. Sounds like the choice of data store isn't critical then. That's good to know.

2020-08-05T15:26:40.099900Z

That's interesting - I'd not really appreciated that. I've found a good link on on-prem vs cloud. Thanks!

ghadi 2020-08-05T16:07:04.100Z

I wouldn't do cross cloud AWS <> GCP without evaluating ingress/egress costs, or latency

kschltz 2020-08-05T17:27:45.102Z

Hi there, does datomic cloud have any restrictions regarding AWS regions?

marshall 2020-08-05T17:35:34.102500Z

Yes, Datomic Cloud is only available in certain regions the current list is:

2✔️
onetom 2020-08-06T17:31:54.107500Z

the hong kong region would be a welcome addition to that list. i have the gut feeling that it supports all the required aws features already.

kschltz 2020-08-05T17:46:55.102900Z

Thanks

marciol 2020-08-05T18:40:12.105Z

Anyone here is doing serious business with Datomic Cloud without the 24x7 support? The contracted support can be pretty expensive and I notice this is a matter of risk management. We run an application from 9 months and we had problems only when we needed a hands-on help to carry a major migration. It’d be nice to heard about other experiences.

dregre 2020-08-05T18:58:27.106100Z

Hi folks — Any tips on how to best approach writing tests for Datomic rules? My app makes extensive use of rules and I would like to button up the testing. Much obliged.

3➕
onetom 2020-08-06T17:30:00.107300Z

im also just about to explore this topic in our current project. what's your current approach?

dregre 2020-08-06T19:35:30.127Z

My approach has been to use an in-memory database loaded with the right schema and mock data (fixtures) and then run queries against them — but I wonder if there’s a better approach.

dregre 2020-08-06T19:37:17.127200Z

I’m also interested in finding a query profiler or explainer, if anyone’s come across any.

arohner 2020-08-05T20:45:33.106300Z

How do you architect differently?