Fork me on GitHub
#datomic
<
2023-07-07
>
robert-stuttaford10:07:57

we've been in production with Datomic continuously since Jan 2013. we're about to reach the 3 billion datom mark! 🎉 🥳

👏 40
wow 8
tatut11:07:30

so that's something like 800k datoms per day? it would be interesting to hear if there have been some growth issues during the years

☝️ 10
👍 2
Tomas Brejla18:07:04

What a coincidence. I just watched the "Lessons from 4 years with Datomic" video you presented in 2017 🙂 https://youtu.be/4BhZshZyf9E Any chance there will be an updated "after more than 10 years" video anytime soon? 🤞

👍 2
2
Tomas Brejla18:07:36

Btw I also noticed a tweet just a few days ago where its author mentions a few reasons why he believes Datomic sucks. Slow query performance, and unpredictable memory consumption to name the main ones. It would be great to hear your experience, 3 billion datoms is quite a few! 🙇 👍

tatut19:07:44

A case that a thing “sucks” can be made for any tech. As we know everything is about the trade offs and highly context dependent.

💯 2
Tomas Brejla19:07:02

Totally agree. That's why I'm not mentioning any names or link to that tweet. Its author might have his own reasons/bad experience/frustration.. and it's his right to feel that way. I'm more interested in hearing more "from the trenches of production use" kind of experience. And 10 years (and still counting) is really a lot 👍

robert-stuttaford09:07:33

could you link the tweet (or DM it to me) please @U01LFP3LA6P?

👍 2
indy11:07:30

Looking for querying help. This is an example of how my child comment entity looks like in datomic:

{:db/id 2
 :comment/id "2"
 :comment/parent 1
 :entity/status :entity.status/deleted
 :comment/text "Child comment"}
And this is a parent comment entity of the above comment in datomic
{:db/id 1
 :comment/id "1"
 :entity/status :entity.status/deleted
 :comment/text "Parent comment"}
I’m looking for ways to write a datomic query that will not include comments that have all its descendants deleted. Something that would enable the slack deletion UI. • If there are child comments, show the parent as “deleted” if it is deleted. • If all child comments are deleted and parent is also deleted then don’t show the whole thread at all.

indy11:07:53

I understand soft-deletion is an anti-pattern in datomic but I need it to enable this UI.

indy11:07:00

Tried recursive queries and not-joins but not able to arrive at something working.

jumraiya13:07:51

Something like this? You can use ?status to determine how to display it.

(d/q '[:find ?c ?status
       :where
       [?c :comment/id]
       (or-join [?c ?status]
                (and
                 [?c :entity/status :entity/status.deleted]
                 [?ch :comment/parent ?c]
                 (not [?ch :entity/status :entity/status.deleted])
                 [(ground :deleted) ?status])
                (and
                 (not [?c :entity/status :entity/status.deleted])
                 [(ground :not-deleted) ?status]))])