Fork me on GitHub
#datomic
<
2019-01-01
>
augustl16:01:45

for storing strings larger than 4k in datomic cloud, there's a number of ways to get that wrong, I suppose..? 🙂

augustl16:01:12

would this work? Generate a squuid, store the string in external storage along with that squuid, wait for external storage to report A-OK, store that squuid in datomic?

lilactown16:01:26

I was thinking of using the hash of the string as the filename

cjsauer16:01:05

Watch out for filename collision when two strings happen to be equal

augustl16:01:15

sounds better to create an unique ID every time you want to create a fact for that string, if you override the old one, and the transaction fails, then external storage and datomic is out of sync

augustl16:01:20

and that 🙂

lilactown16:01:00

I mean, if two strings are equal - then no need to store it again? 😄

lilactown16:01:07

there’s the chance of hash collisions but it should be fairly low

cjsauer16:01:47

Yeah that’s true...external storage would need immutable/accrete-only semantics then yeah? Every modification creates a new, for example, S3 object.

5
lilactown16:01:00

otherwise you couldn’t use historical queries to read past strings

cjsauer16:01:56

Right. I need an app that shocks me every time I revert back to mutable place oriented thinking.

😆 5
lilactown16:01:58

well, I’m working on a blog-esque type app right now so these problems are at the forefront of my mind

Dustin Getz18:01:10

Ping me if you make progress here, hyperfiddle is going to integrate a foreign string store soon too

lilactown18:01:14

will do. it’s one of my stretch goals, once I get the rest of the app up and running

Dustin Getz21:01:14

i would appreciate that thank you!

cjsauer16:01:43

@augustl I think this would prevent the out of sync issue you mentioned

augustl16:01:04

yeah, seems like it would

augustl16:01:24

only downside I can think of is to have to create hashes for potentially large strings 🙂

augustl16:01:36

but for something like a blog that probably shouldn't be a problem

lilactown18:01:36

anyone setup an Ion as a custom authorizer for API Gateway?