This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-22
Channels
- # admin-announcements (4)
- # bangalore-clj (1)
- # beginners (28)
- # boot (16)
- # clara (4)
- # cljs-dev (28)
- # cljsrn (63)
- # clojure (136)
- # clojure-berlin (7)
- # clojure-gamedev (1)
- # clojure-nl (4)
- # clojure-russia (47)
- # clojure-sg (8)
- # clojure-spec (39)
- # clojure-uk (132)
- # clojurescript (66)
- # clojurex (5)
- # clojutre (2)
- # code-reviews (14)
- # core-logic (1)
- # cursive (13)
- # datavis (1)
- # datomic (35)
- # dirac (1)
- # editors (1)
- # hoplon (46)
- # jobs (1)
- # lambdaisland (5)
- # lein-figwheel (1)
- # mount (10)
- # off-topic (3)
- # om (67)
- # onyx (54)
- # planck (7)
- # proton (15)
- # protorepl (1)
- # re-frame (174)
- # ring (4)
- # ring-swagger (3)
- # specter (14)
- # untangled (15)
@bkamphaus: thanks, it hadn't occurred to me that component was treated as a technical term before the above two posts. Forgive my mediocrity.
@bkamphaus Does d/with work on as-of db values ?
Can I add a nil attribute value with the map form and expect it not to be asserted at all while the rest of the attributes are?
{:db/id (d/tempid :db.part/user)
:order/status (get-status)}
;; get-status might return nil
no. you need to exclude it from your transaction
(let [s (get-status)] (cond-> {:db/id (d/tempid :db.part/user)} s (assoc :order/status s)))
you probably aren't doing this, but you can't assert {:db/id ...} without at least one attr along with it
so I'm not the sole inventor of the (cond-> m x (assoc :x x))
pattern. bummer
you bet! rich did that years ago š https://github.com/Datomic/codeq/blame/master/src/datomic/codeq/core.clj#L406
-grin- use the hell out of that pattern
@greywolve: I did an experiment over the weekend using d/with on as-of dbs, and I haven't seen any issues, fwiw
Iāll have to defer to @marshall or @jaret re: anything changing with that behavior, but last I was aware with
prospective transactions donāt change what an as-of
database will find/retrieve with query, datoms, etc. - the with
transaction is filtered out of the as-of
db.
@greywolve: @bhagany https://groups.google.com/d/msg/datomic/-gDB2EX7r58/CP2n4GELAgAJ with
and as-of
should not be used together.
@jaret I saw that, and I was under the impression that that thread applies to doing the reverse
speculative branching (i.e. with
) is only allowed on the ācurrentā DB
as-of
is a filter, so I wouldnāt recommend doing either
Hi, I think I am understanding something wrong in the CORS option of REST APi. Isnāt it the way to specifying all origins allowed, eg, bin/rest -p 8001 -o /'*'/ ddb datomic:<ddb://us-east-1/nameofdynamodatabase>
When you retract an entity related to an isComponent attribute, is the history for that entity lost? I canāt find some of them even with (d/as-of db tx)
.
Oh. Hm. If a given TX has retracted an attribute, you have to use an earlier āvalue of the databaseā to find out what it was.
If that history datom indicates the attribute was ādeletedā, then decrement the TX and run the query with the as-of db to find out what it pointed to. Seems to work.
operational question: if you have a transactor running in EC2 and you want to schedule backups of the db, is the best practice to have a separate EC2 instance (or a Lambda function or what have you) with a separate Datomic install and a crontab? My initial thought was to add an /etc/cron.d
entry in the CF template but my stumbling block is the fact that the actual install location of ā¦/bin/datomic
is not easily found
which makes me suspect that Iām not supposed to use it for anything. š
IMO better to use a separate instance. We use our jenkins for that
@chris_johnson we use a separate t2.medium which runs hourly. i haven't yet figured out how to make it run backups in a loop (start again as soon as you're done). it's NOT recommended to run backups on your transactor machine because of the CPU hit
backups run from storage directly, no need for transactor involvement!
right, I was thinking since we donāt (yet) have anything running but transactors, and since Iām about to push a version update, maybe we could throw the cron job on the machine we have
but I actually reached the same conclusion as you as soon as I read āplease give backup as much memory as your transactor usually gets"
our data is small and backups that have been done by hand are pretty snappy, I think Iām going to try doing it in a Lambda function
yeah, not a good idea. too much of a disturbance to transactor process. of course, we did exactly this for the first 18 months, when we ran a snowflake server with transactor, postgres, memcached, backups, and rabbitmq all on one instance š
I will let you know how it goes