This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-28
Channels
- # aleph (3)
- # beginners (10)
- # boot (135)
- # clara (2)
- # cljsjs (2)
- # cljsrn (1)
- # clojure (68)
- # clojure-austin (4)
- # clojure-france (2)
- # clojure-japan (1)
- # clojure-spec (30)
- # clojure-uk (11)
- # clojurescript (48)
- # component (65)
- # cursive (5)
- # datomic (40)
- # dirac (5)
- # emacs (3)
- # events (16)
- # funcool (2)
- # klipse (46)
- # lein-figwheel (2)
- # luminus (8)
- # off-topic (4)
- # om (7)
- # other-languages (4)
- # parinfer (21)
- # re-frame (15)
- # reagent (30)
- # ring (1)
- # ring-swagger (9)
- # rum (3)
- # specter (7)
- # test-check (8)
- # testing (5)
- # vim (21)
- # yada (4)
datomic throws exception when i'm (speculatively) applying new attributes with a database as-of some point in time / txid, e.g.:
(d/with (d/as-of db #inst "2016-10-10")
[{:db/id #db/id[:db.part/db]
:db/ident :some/attribute
:db/valueType :db.type/instant
:db/cardinality :db.cardinality/one
:db.install/_attribute :db.part/db}])
is this unsupported by datomic or am i missing something here?works fine when applying to db returned from d/db, i.e (d/with (d/db conn) [...tx data...])
you can’t as-of
AND with
, @anders ; as-of
is a filter and will filter out all the with
-provided data too
.... at least, that’s what should happen. d/with
basically ignores d/as-of
and uses the latest db to build on, but then as-of filters it
it has weird interactions. basically, as-of + with don’t compose as you’d expect
may i ask what the idea behind speculative schema is?
curious what problem it’s solving 🙂
we're applying inferred facts to the db, so that much of our business logic can assume (non-durable / inferred) facts actually is part of the databaase
ah so you’re modelling temporary data
you could make in-memory dbs and datalog-query across it and durable db
it’s a bit extra work because now you have to add representations of durable entities to mem db
to solve the problem in question, we will just add the inferred attributes to the stored schema
thanks for the insight, @robert-stuttaford
obviously adding the inferred attributes to the stored schema won't help; as you say, d/with ignores d/as-of. what a shame 😞
@anders @robert-stuttaford Would it work to "reimplement" as-of
by doing a since
and transacting the reverse of all those datoms using with
?
going to have to digest that for a bit, @magnars 🙂
been a long week
I will comment that much of the goal of having a feature like 'with' is prospective. What if I did X. The X is then something you can do. If you apply 'with' to a past db state with as-of you won't be able to then transact datoms to persist that resulting database. You could, kind of as a cleaner suggestion in the same vein as @magnars , just retract all of the since datoms with one 'with' and then consider the resulting db value with the assertions in another 'with'.
That then corresponds to a database value that could be persisted/made the canonical db with those transactions.
Datomic 0.9.5407 is now available https://groups.google.com/d/topic/datomic/OU-EasU3i2A/discussion
is there a well supported method of deploying a REST peer for datomic?
AMI image?
@karol.adamiec there is no automatic option. However, the command is 1 line and could be worked into a CF script or your own AMI. http://docs.datomic.com/rest.html
@jaret so any generic amazon ami should work. I copy over the /bin folder to s3 and set the download then start command in user data?
@karol.adamiec there are a number of approaches you could take, but yes, you should be able to use an Amazon linux AMI, get the datomic distribution (either by wget from my-datomic or via an s3 of your own config), unzip it, and start the REST peer
ok, got it.
./rest -p 8001 dev "datomic:<ddb://eu-west-1/dev-datomic>"
so start command like aobve gives me acess to any db on dev-datomic table ?
you’ll want to control access to the REST endpoint via IAM or IP config or whatever your preferred method
i was thinking that rest endpoint is absolutely internal inside VPC, with access only from my backend bridge
that would be fine too as long as you’ve configured your instance to only allow access from with the VPC
for sure, will lock that down 👍