This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-10
Channels
- # aleph (4)
- # aws (2)
- # bangalore-clj (2)
- # beginners (84)
- # boot (25)
- # cider (3)
- # cljsrn (3)
- # clojure (57)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-russia (7)
- # clojure-spec (18)
- # clojure-uk (29)
- # clojurescript (90)
- # cursive (11)
- # data-science (68)
- # datascript (2)
- # datomic (25)
- # duct (3)
- # fulcro (13)
- # graphql (7)
- # immutant (1)
- # jobs (1)
- # leiningen (12)
- # lumo (1)
- # off-topic (51)
- # om (43)
- # onyx (15)
- # parinfer (10)
- # pedestal (4)
- # re-frame (7)
- # reagent (42)
- # ring-swagger (42)
- # rum (1)
- # shadow-cljs (172)
- # spacemacs (10)
- # specter (4)
- # sql (4)
- # test-check (19)
- # unrepl (54)
- # yada (3)
so, we’re seeing an issue on startup of our services that use the peer library, connecting to dynamodb; we get constant {:event :kv-cluster/retry, :StorageGetBackoffMsec 0, :attempts 0, :max-retries 9, :cause "java.net.SocketTimeoutException", :pid 3955, :tid 55}
, and the service never seems to connect properly
Im trying to add data in datomic 'in the past' for testing purposes but whenever i try to set the :db/txInstant
attribute i get this error:
IllegalArgumentExceptionInfo :db.error/past-tx-instant Time conflict: Tue Oct 03 00:00:00 CEST 2017 is older than database basis
Is there any way to force this or change the database creation date.
@timovanderkamp afaik Datomic forces txInstant to be increasing
@hmaurer So that means my schemas must be timestamped in the past aswell?
@timovanderkamp how so? sorry, I don’t understand the question
If the schema's are installed at this time, i wont be able to add transactions in the past right
in which scenario would you want to transact things “in the past” with an altered txInstant?
I want to create reports for some entities, with information about certain moments in time
Ah. I think you should read this: https://vvvvalvalval.github.io/posts/2017-07-08-Datomic-this-is-not-the-history-youre-looking-for.html (written by @val_waeselynck on this channel)
Alright thanks!
But as a quick TL;DR;, you shouldn’t be using :txInstant as the time at which your events occurred; only as the time at which they were recorded
otherwise you run into issues, as you mentioned, where you might want to add events that occurred “in the past”, and Datomic will stop you from doing it
From my (limited) understanding of the topic, it’s an issue you would stumble upon when building pretty much any event-sourced system. I think it’s sometimes referred to as “bitemporal data”
greetings! Is there anything worthy to read about storing localized names in datomic? Schema approaches, etc.
I'm doing it by storing json-encoded maps in a string field.
Basically every time you pull an entity, you pull all the translations no matter what, right? But, with a convenience of not complicating any queries with a locale/language info?
Yeah, that worked for me because any content had on a few locales defined, and only the UI dealt with localization. If that were not the case, I guess I would have used an entity with one attribute per locale; not very generic, but seems like a reasonable tradeoff for performance.
@U05120CBV was asking about this ^^^ sort of thing
Just rewrote my db function to assert exactly the refs (or values) of a cardinality many: https://gist.github.com/rauhs/0704f6492674ea79e935a9e01ac3a483