Fork me on GitHub
#datomic
<
2018-05-22
>
Dustin Getz13:05:07

My client wants to use Datomic from Nodejs. Are they supposed to use the deprecated rest api?

val_waeselynck13:05:44

or via GraalVM 😛

👍 8
😮 4
souenzzo13:05:01

Hey, just a [OFF] idea. but you can use #graalvm to get access datomic.api from nodejs. https://www.graalvm.org/ From What does GraalVM do? example, you may be allowed to access datomic.api and use from nodejs with something like

result = datomic.api.q(edn`[:find ?e  :in $ ?id :where [?e :user/id ?id]]`, db, user_id)
Where edn is a "tagged string function" that transforms string into edn. I will do a blog about that some day

😮 4
Dustin Getz14:05:06

That's amazing, has this been tested ?

souenzzo14:05:26

Nope. But you can test and feedback us 🙂

val_waeselynck15:05:23

Frankly, if it were me, I would probably not do something so experimental at my client's - or at least make it easy get out of this strategy

Dustin Getz15:05:40

Yes, I fear the answer is to tell them not to use Datomic

Dustin Getz15:05:12

However I am probably willing to maintain a cljs/js client, but not without coordinating with cognitect

hmaurer19:05:53

@U09K620SG Cognitect is supposed to be open-sourcing th documentation of the client protocol

hmaurer19:05:01

I am not sure when that will be though…

souenzzo02:05:30

Hey I just made some snippet's about how to access datomic from javascript (using graalvm) Important notes: - :heavy_exclamation_mark: Experimental :heavy_exclamation_mark: - You dont need to JS "inside" clj/java. You can run a JS file with graal directily (but you will need to setup classpath) - in the middle of development I realized that it would be easier to use the JAVA API than the clojure API https://gist.github.com/souenzzo/c4719d45e804767c97f6f5be1bcdd1c5

hmaurer13:05:46

@U2J4FRT2T ah, using graal. nice one!

eraad21:05:50

Some entities have the Stripe-related property, others don’t.

souenzzo02:05:30

Hey I just made some snippet's about how to access datomic from javascript (using graalvm) Important notes: - :heavy_exclamation_mark: Experimental :heavy_exclamation_mark: - You dont need to JS "inside" clj/java. You can run a JS file with graal directily (but you will need to setup classpath) - in the middle of development I realized that it would be easier to use the JAVA API than the clojure API https://gist.github.com/souenzzo/c4719d45e804767c97f6f5be1bcdd1c5