Fork me on GitHub
#datomic
<
2018-08-24
>
tmulvaney09:08:34

i've just started using ions to build a web app to explore our data. It's been great! I have a question though: Is there a way of getting the stage name of the API Gateway eg. "dev"?

tmulvaney09:08:23

It would be handy for constructing hyperlinks.

tmulvaney10:08:01

ok so the raw request json under the key: datomic.ion.edn/api-gateway-request has the stage name.

ghadi14:08:45

did you ever workaround this okocim?

okocim18:08:55

No, I ended up just creating the user pool in the same region as the datomic cluster.

ghadi14:08:52

we are probably going to destroy our US-East-2 cluster and recreate in East-1 under a separate AWS acct, and deal with the cross-account permissioning

8
eoliphant17:08:06

This kind of stuff really annoys me. We had to do something similar because of some other services. They're trying to get more people out of east-1, but the lag on services is just too much

mpenet17:08:22

let's say you want to store an edn "blob" into an attribute, how would you do that?

favila17:08:26

pr-str and mind the 4k limit

favila17:08:53

more sophistication would involve serializing to fressian or netty or binary serialization of your choice and storing as bytes; or storing in an external store if the blobs are large

favila17:08:14

Note that I think datomic cloud does not support the binary type

henrik18:08:10

I'm storing a number of blobs for an entity, and I ended up sticking them on S3. As they're part of a details view of the entities in question, I figure the response time is sufficient. Seeing as S3 supports versioning as well, I reckon I can support time travel even though they're not sitting inside Datomic.

favila19:08:24

It might be simpler to just write a new key to the bucket?

favila19:08:42

I'm not sure how to correlate a datomic T with a specific bucket blob version

favila19:08:00

in a foolproof manner

mpenet20:08:47

Yeah I am heading that way for now (serialized as byte[])

mpenet20:08:26

I am just playing for now, so not on cloud

mpenet17:08:45

I need an edn "bag of anything" type

mpenet17:08:55

seems like I might have to serialize it and store as "bytes". I am trying to convert a schema we have on postgres as an exercise, we use jsonb in these rare cases.

ghadi17:08:00

can't index an opaque bag, but yeah you could do that, or store the bag out-of-band in a K-V store and remember the K in datomic

mpenet20:08:21

I dont need to have its content indexed. For now I ll just serialize it, but in a real world scenario I would likely do something like what you suggest