Fork me on GitHub

Any thoughts on using datomic for an online multiplayer game? The whole data model seems to be a perfect fit, as you could just send (in a real time game) a few times a second the last transactions to the client so you already have a data model which describes only the changes made to the world and can send them cheaply.

Ben Damman01:02:41

Does the Datomic plugin for Trino ("Datomic Analytics") support INSERTs and UPDATEs in any way? My guess would be "NO" but had to ask. 😈



👍 2
gratitude-thank-you 2

When using limit with d/q and a history database, any guarantees as to what I will get back? Hoping it scans transactions newest to oldest.


in other words, hoping this gives me the 10 latest adds on some-eid

(d/q {:query '[:find ?a ?v ?tx
               :in $ ?e
               [?e ?a ?v ?tx true]]
      :args [(d/history (d/db conn) some-eid)]
      :limit 10})


The return value is a set, so you have no guarantees


datalog results are unordered


consider using the log api or tx-range


Hmm, so how would you do a '10 latest posts' type query?


query, include the sort key in the result, sort yourself


or make an index that is exactly your sort and use something like index-pull


Not being able to sort “over there” with the client api is a real bummer, but on on-prem this is fine and no different than what a builtin sort would have to do anyway.


Using on-prem. Still trying to forget 15+ years of sql, I suppose 😄

Daniel Jomphe19:02:03

If you're looking to use WebSockets with Datomic Cloud Ions, this thread might be a good starting point. I'm wondering if some users have more up-to-date info than;cid=CL85MBPEF. We might soon want to move in this direction.