Fork me on GitHub
#datomic
<
2018-04-26
>
dominicm06:04:53

Does the transactor ever create symlinks? We've had a FIM exception where the Link Count changed of our datomic-pro folder, I can config around it, but I want to know why I'm doing it first.

dominicm17:04:56

The link count went up, I believe, because a sub-directory was created: "data". I suspect this one because our FIM configuration ignores this directory. This apparently did not get created within 20 minutes of the system starting, I'm not sure if that's weird or normal?

marshall12:04:36

The data directory is created by Datomic when it needs some local swap space, usually during an indexing job

dominicm12:04:26

I see, that makes sense.

dominicm06:04:16

This happened in our only configuration which utilizes fulltext.

stijn08:04:01

ok, disregard my previous question, have setup VPC Peering instead. that works

folcon12:04:46

For search scenarios, is there a good way to get related values? Eg:

(fn [text]
  (q '[:find ?id :in $ ?txt % :where [search ?txt ?id]]
    (db conn)
    text
    '[ [[search ?txt ?id] [(fulltext $ :artist/name ?txt) [[?id]]]]
       [[search ?txt ?id] [(fulltext $ :track/name ?txt) [[?id]]]]
       [[search ?txt ?id] [(fulltext $ :release/name ?txt) [[?id]]]] ]))
Now for any result I want to grab details such as the artist name and a collection of tracks associated. Do I need to encode that into the rules itself? I was also thinking of using get-else, or get-some, but it feels clunky. Am I on the right track or is there a better approach?

favila13:04:02

Use a pull expression

favila13:04:37

You can grab data with more binding clauses in the where, but this doesn’t allow “null” values and is more verbose

folcon13:04:43

You can do joins in a pull?

folcon13:04:31

I thought that wasn’t possible? I’ve been using (pull ?id [*]) pull expressions and only get the local id values.

favila13:04:22

What is a “local id value”?

folcon14:04:03

sorry, based on the context it’s either :artist/name, :track/name or :release/name which matches the fulltext of ?txt. I’ve used (pull ?id) a lot to get all the attributes+values, but I didn’t realise that you could pull values optionally through entity relations. I’ve been hand constructing queries that manually walk the relations with lots of get-else to catch missing values.

folcon14:04:28

the (pull ?id [*]) was to my knowledge the most flexible version of this, as in grab all the values related to this entity id.

folcon14:04:52

And suddenly a whole new world has opened up! Thanks @U09R86PA4, I think I’ve worked out how to do it!

marshall15:04:17

It should work fine to run EB instances in the Datomic VPC

stijn16:04:45

yes, I guess i mixed something up on the naming of the resource groups. anyway, I think the vpc peering setup is cleaner in our case

stijn16:04:13

I have 2 questions on the permissions: $(S3DatomicArn)/$(SystemName)/datomic/access/dbs/db/$(DbName) 1/ can I specify wildcard db-names? 2/ does this mean that also creation of the db is allowed, or only read/write access to the db itself?

marshall17:04:57

@stijn you should be able to use wildcards - it will follow AWS IAM rules for getObject permissions on S3 objects

marshall17:04:14

I believe create and delete db are admin-only permissions

dominicm17:04:56

The link count went up, I believe, because a sub-directory was created: "data". I suspect this one because our FIM configuration ignores this directory. This apparently did not get created within 20 minutes of the system starting, I'm not sure if that's weird or normal?