Fork me on GitHub
#datomic
<
2023-08-16
>
Kein15:08:05

Are we able to materialize datomis's history prefix into a state and prune data? Kind of like event replay in an event sourcing system

jaret16:08:53

I am super happy to share that we have released Datomic local! See our blog post here: https://blog.datomic.com/2023/08/datomic-local-is-released.html

🎉 36
🚀 4
datomic 12
jaret16:08:09

Please let us know if the FAQ is missing anything or if I failed to update the old name "dev-local" anywhere in the docs.

kenny17:08:54

Nice! Is this actually a rename of the filesystem backed dev-local or is there a bigger change?

jaret17:08:24

@U083D6HK9 a rename of dev-local to facilitate apache 2.0 and redistribution. There are more plans in the works but we had to get this step done to get to the next thing 🙂

👍 4
mpenet18:08:33

Does this also means we’re allowed to peak into the jar and potentially redistribute its sources?

mpenet18:08:10

Curious about that “next thing” :)

mpenet18:08:53

Ah. The blog post specifies the binary is apache2 licensed, so maybe it’s a no. Not sure how to interpret apache 2 wrt to reverse engineering/decomp

Ivar Refsdal19:08:22

Any plans to make an embeddable Datomic pro with dev storage protocol?

hifumi12321:08:13

I think this would be worth sharing in #announcements too. This is really great news, especially for projects like #hyperfiddle which have defaulted to Datomic for its reliability at scale and community support. (The starter project uses Datomic, but starting with Datomic Local should make it even easier to get started).

👍 2
jaret22:08:06

@UGJE0MM0W local is backed by a filesystem, but it has https://docs.datomic.com/cloud/datomic-local.html#limits. That being said, no current plans to make Datomic pro more embeddable, but it is also under apache 2.0. Just designed as a distributed database with multiple processes.

jaret22:08:44

@U0479UCF48H I will cross post there with a nicer announcement.

gratitude 2
nwjsmith23:08:10

Thank you so much for doing this. I’m giving a presentation next week on some Datomic superpowers and the release to Central makes it much easier for people to noodle with demo code

👍 2
jaret23:08:23

@UGJE0MM0W one more thought. If you are wanting pro because of peer api. There may be future work to provide that api. But client api only for now.

Ivar Refsdal07:08:01

Yes the peer api is what I (and others I think) want

Joao Souza17:08:06

Hi guys, I'm trying to run a query to count entities, but when I try to make a second bind for example, my query fails due to a timeout. If I increase the timeout, the CPU sometimes hits 100% and the server returns with Service Unavailable after some time. I'm running it in a Datomic Cloud instance hosted on AWS in an i3.large instance. Is there any configuration I should do that could help me with this problems?

(time (d/q {:query '{:find  [(count ?a)]
                     :in    [$]
                     :where [[?a :note-attribute/value "949"]]}
            :args  [(get-db)]}))
"Elapsed time: 1786.356667 msecs"
=> [[390007]]
[7:07 PM] (time (d/q {:query '{:find  [(count ?a)]
                     :in    [$]
                     :where [[?a :note-attribute/value "949"]
                             [?a :note-attribute/name "tenant-id"]
                             ]}
            :args  [(get-db)]}))
Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).
processing clause: [?a :note-attribute/name "tenant-id"], message: java.util.concurrent.TimeoutException: Query canceled: timeout elapsed

frankitox18:08:58

Should Datomic throw if I try to transact a new entity that refers another entity that doesn't exist?

frankitox18:08:15

For example, I have in my schema :permission/user which has :db/valueType :db.type/ref. If I do

(d/transact [[:db/add "new-perm" :permission/user 123912911]])
Knowing that 123912911 doesn't exist, the transaction still works 😕

favila18:08:31

entities don’t “exist” or not

favila18:08:47

that’s a concept belonging to your domain, not to datomic

favila18:08:31

If you have a lookup ref which, if it is resolveable, means the entity “exists”, use that in your transaction and you’ll get an error if it fails to resolve

favila18:08:00

e.g.

(d/transact [[:db/add "new-perm" :permission/user [:user/id #uuid"1234..."]]])

favila18:08:13

An entity is just the ID that datoms have in common. Entities are pure identity, not existence. “existence” comes from assertions on the entity, and that’s up to your data model which assertions mean “existence” and which don’t.

👍 2
frankitox18:08:30

I see 😕, thank you!