This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-08
Channels
- # aleph (1)
- # architecture (4)
- # aws (5)
- # beginners (105)
- # boot (1)
- # boot-dev (72)
- # cider (5)
- # clara (15)
- # cljs-dev (51)
- # cljsrn (5)
- # clojure (155)
- # clojure-austin (3)
- # clojure-dusseldorf (2)
- # clojure-finland (1)
- # clojure-greece (37)
- # clojure-italy (17)
- # clojure-nl (1)
- # clojure-russia (6)
- # clojure-spec (23)
- # clojure-uk (6)
- # clojurescript (7)
- # community-development (1)
- # css (10)
- # cursive (15)
- # datomic (45)
- # defnpodcast (1)
- # duct (97)
- # emacs (5)
- # fulcro (46)
- # hoplon (8)
- # instaparse (25)
- # keechma (11)
- # leiningen (16)
- # off-topic (2)
- # onyx (9)
- # planck (2)
- # re-frame (5)
- # reagent (3)
- # reitit (2)
- # ring (6)
- # shadow-cljs (35)
- # spacemacs (9)
- # specter (9)
- # sql (18)
- # uncomplicate (4)
I found a typo on the web site (http://docs.datomic.com/transactions.html) "three ways to sepcify an entity id" -> specify
It is still there.
@U8L9BNAJE The wording seems correct to me. I did note that we had a semi colon where we needed a comma though. Here is the original text: >“Each list a transaction contains represents either the addition or retraction of a specific fact about an entity, attribute, and value; or the invocation of a data function, as shown below.”
@jaret on 3rd read, yes, you are correct. Maybe it's the language barrier but my mind was hung-up on reading it like "Each list [in] a transaction" but now I understand it refers to what is above
It’s definitely a mouthful. I’ll confirm with the team to see if a rewording, like the one you suggested would work.
I am a beginner with the Clojure eco-system, and after fast-reading Datomic's documentation I still have difficulties understanding its position compared to another db-bound framework/data-flow which I am familiar with : Meteor. Here are my questions: 1. Suppose that I want to dev a web-app with reactive data update from the db to the ui, similar to what can be done with Meteor, is Datomic a valid candidate for a replacement? Would something be missing in the reactivity chain between the client and the server-side peer? 2. How/where is handled what part of the data each client is/is-not supposed to see?
Now that I think about it, I did not see anywhere a mention about reactivity or pub/sub. Maybe that's not what Datomic was designed for. Sorry if I misunderstood.
Datomic has the capabilities to do this, but isn't particularly specialized for it. Having immutable data is a big enabler of that kind of thing though. If you were to write something like this, you'd probably use the transaction report queue. There's a project aiming to demonstrate this here (I haven't looked at it closely): https://github.com/waf/push-demo
You'd still need a web server in there to do the tx-report-queue to websockets transmission, and to do security filtering, etc. That part of the code isn't built in to datomic and you have a lot of options
There is a project called datsys which aims to do a lot of this type of thing, replicating a datomic database into the client and then hooking that up to react. It still seems like early days though. https://github.com/metasoarous/datsys
Thanks a lot.
While we're on the subject of txdata... What could be wrong here:
I have this tx: [:db/retract 17592186045418 :myns/myattr #inst "1999-06-23T22:00:00.000-00:00"]
but I get: :db.error/invalid-lookup-ref Invalid list form: [:db/retract 17592186045418 :myns/myattr #inst "1999-06-23T22:00:00.000-00:00"]
my full tx combines updates and retractions. That is not invalid, correct? (as long as i provide the correct list)
How are other people managing schema and data changes in their projects? Kinda like database migrations in a relational database.
We wrote a tool that scans the current schema from the database, compares that to our master schema definition (just a bunch of edn), creates a diff between the two, and applies the diff. Overall it wasn’t hard to write.
We generally use https://github.com/rkneufeld/conformity which is simple and just makes sure you don’t apply the same block of transactions twice in a give database
We’ve been looking into https://github.com/luchiniatwork/migrana too, which is somewhat ActiveRecord inspired, apparently
@U3XCG2GBZ You can also use our take inspiration from Datofu: https://github.com/vvvvalvalval/datofu#managing-data-schema-evolutions. I also wrote about it here: http://vvvvalvalval.github.io/posts/2016-07-24-datomic-web-app-a-practical-guide.html#data_migrations