datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
hadils 2021-02-10T16:38:11.182600Z

I am setting up WebSockets for my app with lambda functions. Which is more appropriate: DynamoDB or datomic cloud (which I am using for my database) with noHistory turned on?

joshkh 2021-02-10T17:42:55.182700Z

i used Datomic Cloud with noHistory because it was easiest (for me) to store values in a database without having to coerce data types, for example UUIDs. DDB gives me a headache. it sounds like you're well on your way, but in case it helps i have an example project that handles multiple clients/sessions per database user via the AWS API Gateway. the docs are half baked though. https://github.com/joshkh/datomic-ions-websockets

joshkh 2021-02-10T17:48:52.185Z

i'm having some trouble working with cast locally. can anyone see what i'm doing wrong here? https://docs.datomic.com/cloud/ions/ions-monitoring.html#local-workflow

(require '[datomic.ion.cast])
=>
(cast/initialize-redirect :stdout)
=> :stdout
(cast/event {:msg "test"})
Execution error (IllegalArgumentException) at datomic.ion.cast.impl/fn$G (impl.clj:14).
No implementation of method: :-event of protocol: #'datomic.ion.cast.impl/Cast found for class: nil
com.datomic/ion and com.datomic/ion-dev are definitely in my tree clj -Stree

hadils 2021-02-10T17:52:12.185200Z

Thank you @joshkh !

joshkh 2021-02-10T17:56:34.185800Z

sure! starting from scratch, it took me a little bit of trial-and-error to understand how everything connects, so if you have any questions then feel free to ping me. i'm interested in ions/websockets as well 🙂

Joe Lane 2021-02-10T19:00:20.188700Z

Bounce your repl, then starting afresh, first initialize, then cast. Right now if you cast before initializing it throws that error and will keep returning it until a repl restart.