datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
xceno 2020-11-09T16:14:03.356200Z

I have an application running as datomic ion. I'll need to upload a bunch of binary files between 1MB-100MB. There's a stack overflow answer (https://stackoverflow.com/a/10569048/932315) that brings up some points I'd like to clarify: • Is it a good idea to store blobs in datomic if I disable the history for them? • Does it make sense to store files as a datomic byte array? • Or should I rather upload the files to S3 and save the URL in an attribute?

souenzzo 2020-11-10T13:24:26.364200Z

there is docs about how to do permissions on datomic-ions? Last time I tryied there is no docs, my solution break the cloudformation and I get 1 day of downtime

xceno 2020-11-10T13:29:48.364400Z

It took me almost two weeks to get my initial setup up and running. I initially went with solo but upgraded to production later on. Anyhow, I have my own permission / auth system right now as ring-middleware. It provides the very basics, but if I find time I want/need to switch over to using AWS Cognito. From what I've seen in the forums there are some people using Ions + Cognito in production, but there aren't any docs or examples in the wild. At least I haven't found any, if you do, please let me know

joshkh 2020-11-17T16:19:48.436300Z

only just saw this thread, but in case you haven't found an answer yet @souenzzo, can you clarify by what you mean as permissions? user permissions to your api? permissions for your ion to access other AWS services?

souenzzo 2020-11-17T18:10:04.436900Z

How to customize the IAM of the machines created by DatomicCloudCloudFormation template It isn't just "find the the group and add the permission" If you do that (like i did) you will not be able to remove/upgrade the CloudFormation because it will fail

joshkh 2020-11-19T13:08:35.454200Z

i'm sure you've already seen this, and/or maybe it doesn't do what you need, but you can add a custom IAM policy to the EC2 nodes via the ions CF template https://docs.datomic.com/cloud/operation/access-control.html#add-policy-to-nodes

👍 1
Nassin 2020-11-09T16:31:59.357500Z

Last one, cloud doesn't have the byte array type

Nassin 2020-11-09T16:33:00.357800Z

In on-premise it's only used for very small binary data anyway

joshkh 2020-11-09T16:35:02.358100Z

seconded - put those files in S3 where they belong

xceno 2020-11-09T16:36:01.358300Z

Alright, thanks guys!

camdez 2020-11-09T18:49:54.361100Z

If I transact against a connection, then get a db value from that connection via datomic.api/db , and then query that db, are the newly transacted values guaranteed to be included in the db queried?

camdez 2020-11-09T18:52:14.361200Z

(Note that I’m not talking about explicitly using the :db-after value here.)

favila 2020-11-09T18:59:30.361400Z

That db is guaranteed to be at or after. Because other transactions may have happened in the meantime, you’re not guaranteed that any particular value is in there

favila 2020-11-09T19:01:40.361600Z

put it differently: the peer receives transaction updates in-order via a single queue. Your d/transact future finalizes when it sees the result of its request on that queue. So it’s not possible for a d/db call to not see that tx yet if it ran after the future finished

favila 2020-11-09T19:02:23.361800Z

you can access this queue yourself via d/tx-report-queue

camdez 2020-11-09T19:09:38.362Z

Thanks, @favila! That’s what I meant to ask, I just worded it poorly. I’ve been operating under this assumption for a while and had a bug today that had me questioning my sanity. 😛 Just got it figured out though. Much appreciated.