This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-10
Channels
- # announcements (2)
- # beginners (37)
- # boot (1)
- # cider (76)
- # clara (14)
- # cljs-dev (132)
- # cljsjs (1)
- # cljsrn (2)
- # clojure (18)
- # clojure-colombia (5)
- # clojure-finland (1)
- # clojure-hamburg (1)
- # clojure-italy (2)
- # clojure-nl (8)
- # clojure-russia (1)
- # clojure-spec (28)
- # clojure-uk (85)
- # clojurescript (84)
- # code-reviews (25)
- # cursive (10)
- # data-science (3)
- # datomic (30)
- # editors (1)
- # emacs (3)
- # fulcro (106)
- # graphql (4)
- # hyperfiddle (26)
- # jobs (2)
- # jobs-discuss (124)
- # keechma (3)
- # leiningen (1)
- # lumo (6)
- # off-topic (5)
- # other-lisps (5)
- # reagent (5)
- # ring-swagger (4)
- # shadow-cljs (140)
- # spacemacs (22)
- # specter (2)
- # sql (48)
- # tools-deps (78)
- # vim (7)
So @ghadi, another approach would be just wrapping your ‘real’ ion code with a higher order function ‘authorizer’. That might give you what you need.. But just out of curiosity, how are you identifying the ‘principal’ to whom the temp token is issued? we have a pretty complex AWS setup, and avoid IAM users, etc. We issue tokens for say AWS API access, via integration with Keycloak and LDAP. You mentioned bless which is similar, in that you need to have a ‘session’ in order to get the cert issued.
i wanted to copy some entities between dbs, and came up with the hack of pulling them with [*] and applying this:
(defn tempify-entity [entity partition]
(walk/prewalk (fn [node]
(if (and (instance? MapEntry node)
(= :db/id (key node)))
(MapEntry. :db/id (d/tempid partition (- 0 (val node))))
node))
entity))
this worked and resolved all references, but the tempid
docs say only to use n
s from -1 to -1000000. can i cause some type of tempid collision in datomic land by doing this?Datomic supports strings as tempids now, so you could just do (str (:db/id thing))
instead
@eoliphant I thought about this a bunch last night, I think the "right thing" to do is generate an STS session token before the invoke of a lambda, and pass the temp credentials+token through to the Ion, then AssumeRole inside the code
yeah, they are more geared to stuff like handing a user one for API access or something
Sorry if this is a silly question, but how should I pack my own Java static method with the Transactor, so that cassandra-cluster-callback
works?
the Datomic Cloud documentation on functions & java methods suggests you can return variables created in queries from the :find
clause, but it's not working for me: I have ?d
, a :db/txInstant which I'm trying to return from :find [?i]
using [(.toInstant ^java.util.Date ?d) ?i]
but the query hangs & eventually returns a Datomic client exception
Hi, I've been running into transaction timeouts (the transactions do end up succeeding). I've been using transact and am reading i need to switch to transact-async. What would the benefit be of calling transact-async and then deref'ing it right away? Is it that I could boost the timeout time for these instances? If my transactor had a timeout of 5 seconds, and I deref'd the async tx with a 5 second limit, would the result be the same ?
I believe, however, i need to rethink my implementation, batch the transactions, return some kind of temp id and then query for them. That's the right way to deal with this ?
You can boost the timeout, or use smaller batches. Have you checked out the core.async/ pipelining approach in the best practices section? That might also fit your usecase
Yes, it's just unclear to me when making a record, how to return the record to the user when they make a new post.
When you’re building new schema in development mode, is there a way to retract schemas? Simple example is that I accidentally used bigint instead of long, but it seems like the only way to undo my mistake is to create a whole new database.
In the documentation it says, “breakage is at best a dev convenience” — i need that convenience. 😉
A Datomic Schema is just a series of attributes, which themselves, can be retracted. If its a dev mode schema just retract the attribute. Take a look a the day of datomic cloud source repo on github (dont have the link handy rn)
Hmm. It seems like you can’t retract schema:
@(d/transact (d/connect uri)
[[:db.fn/retractEntity :vendor/mistake]])
:db.error/invalid-alter-attribute Error: {:db/error
:db.error/unsupported-alter-schema, :attribute :db/cardinality,
:from :db.cardinality/one, :to :disabled
this is squarely in the realm of dev-time; i wouldn’t recommend doing that in any kind of prod environment