This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-06-16
Channels
- # aws-lambda (1)
- # bangalore-clj (2)
- # beginners (121)
- # boot (23)
- # cljs-dev (165)
- # cljsrn (8)
- # clojars (2)
- # clojure (164)
- # clojure-berlin (6)
- # clojure-chicago (3)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-russia (4)
- # clojure-serbia (32)
- # clojure-sg (1)
- # clojure-spec (8)
- # clojure-uk (55)
- # clojurescript (94)
- # cursive (21)
- # datomic (30)
- # events (1)
- # hoplon (6)
- # jobs (1)
- # keechma (1)
- # liberator (2)
- # luminus (8)
- # off-topic (48)
- # om (12)
- # onyx (24)
- # parinfer (15)
- # pedestal (8)
- # re-frame (4)
- # sql (18)
- # test-check (31)
- # unrepl (70)
- # untangled (21)
Hi, Does datomic help with problems like multiregion. Ex: having a server in australia & one in europe. When a user from australia creates an "article" (transactor would be in europe), is it different vs mysql single master with multi-region read-replicas ?
@claudiu You can have peers from multiple regions performing reads but there is no cross-region support for writes with the transactor.
Those peers can also all write to the same transactor, but you cannot have multiple transactors in different regions working against the same DB
Someone posted a script here for exporting a datomic db to txs that could be committed against an empty db. I don't remember who. Anyone remember this?
has anyone figured out a clean/sound way to specify ordering on a set of many cardinality refs? or are people just using :pos
-like solutions as already discussed in google groups threads? (e.g. https://groups.google.com/forum/#!topic/datomic/uq9vBspB3zk)
happy friday everyone 🙂
anyone know if there's an efficient way to do a "diff" between history versions of a db?
sorry, dumb question: isn’t that just the atoms in the log between their t values?
@bbqbaron I couldn't tell if it's a dumb question or not 😅 the use case is I have a client side datascript DB that I want to sync with the server side datomic db... the very course-grained idea is that if the client-db historical # is behind the server-db historical # to do a diff and update the client-db with the missing data
so, i haven’t used datascript, but assuming it’s a non-permanent datomic equivalent for the browser, then i’d probably just grab all the datoms in the server’s log greater than the client-side db’s basis-t
(i think that’s the name) and transact them on the datascript db
right
yeah that sounds like a fantastic approach, I'll look into that
(i guess you can’t prove that the list of datoms is the actual diff, now that i think about it. it could contain cul-de-sacs of transactions that undo themselves)
I'll work on that now and let you know how it goes 🙂
Datomic has some trigger to do something like:
(let [coonection (d/connect db-uri)
connection-with-middlewire (d/on-transact connection (fn [db tx-data] ,,,,))]
(reset! conn connection-with-middlewire))
Then, every time that anyone transact on this conn, the tx-data will be processed by this fn..ah, yeah, transactor functions... haven't gotten into those yet 🙂 @bbqbaron this seems to be getting pretty close to what you were talking about, dug this up from the day of datomic materials (`https://github.com/Datomic/day-of-datomic/blob/master/tutorial/basis_t_and_log.clj`):
(def conn (d/connect uri))
(def db (d/db conn))
(def basis-t (d/basis-t db))
(def basis-tx (d/t->tx basis-t))
(def log (d/log conn))
(-> (d/tx-range log basis-tx (inc basis-tx))
seq first :data count)
that does seem to get the log from a given tx range for a given db. i haven’t done this particular operation myself, but it definitely looks related
I'm debating whether or not this is worth the effort compared to traditional APIs
the idea of having a client side db and saying goodbye to APIs seems great but... really it's just a lot of APIs going on behind the scenes
I'm actually kind of surprised datomic corp hasn't jumped in on this yet
that is, on the idea of having some kind of self-maintaining shared client/browser state that uses sockets or whatnot?
mhm. Or just the client side db at all
I really do think that once this tech matures it could change the game for front end
what is currently most attractive to me about the clojure is the ecosystem ... database, server, AND client all handled with the same language
if pallet works out it would be my devops solution too
I mean cognitect created clojurescript... why not bring their flagship product to cljs too?
I'm curious if the reason why they haven't has more to do with dev resource limitations or if there are strategic reasons why they choose not to