This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-28
Channels
- # aleph (3)
- # babashka (66)
- # beginners (96)
- # calva (45)
- # clj-kondo (28)
- # clojure (30)
- # clojure-dev (2)
- # clojure-europe (20)
- # clojure-germany (22)
- # clojure-norway (4)
- # clojurescript (176)
- # clojutre (1)
- # cursive (23)
- # datalog (6)
- # datomic (7)
- # docker (3)
- # emacs (3)
- # exercism (4)
- # figwheel-main (5)
- # fulcro (8)
- # gratitude (9)
- # hyperfiddle (8)
- # introduce-yourself (2)
- # jobs (2)
- # malli (4)
- # membrane (3)
- # off-topic (17)
- # polylith (3)
- # portal (2)
- # re-frame (27)
- # reitit (3)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (152)
- # spacemacs (8)
- # tools-deps (15)
- # vscode (1)
- # xtdb (24)
what is the defaut way to implement 'reactiveness'? Do I have a loop that checks the current t
of the database, then if it goes up it calls some handlers, possibly with the history since the last t
?
in on-prem - either use the transaction log queue, or be clever when creating the initial data
I think we need more context / details for giving a good answer. If what you are looking for is a persistent queue, you might want to try https://github.com/ivarref/yoltq, which it seems you already have starred 😃. yoltq uses https://docs.datomic.com/on-prem/clojure/index.html#datomic.api/tx-report-queue to achieve "reactiveness". You may want to check that out as well. This is on-prem only.
I currently work on a system that does not use datomic. What we do is querying aws redshift to make slack messages when something of interest happened in the system. I was just wondering how I would do it if it was datomic. 😅 I was thinking along the lines of there is a query group that reacts to new data in the db and then for example makes slack messages. -> now that I wrote it down I'm thinking that cloudwatch metrics and alarms might cover a lot of the use case
I did some error/recovery reporting in yoltq: If there is 3 consecutive error polls, i.e. errors in the database, then an error-callback will be invoked, triggering e.g. a slack message (or logging to ERROR as is the default). If the error persists, it will wait 1 hour before invoking the error-callback, so slack/logs won't be flooded. This isn't specific to Datomic though. Here is that code: https://github.com/ivarref/yoltq/blob/main/src/com/github/ivarref/yoltq/error_poller.clj Maybe too fancy/complex, I don't know.. 🤷
fyi the in I4i instances seem useful for Datomic Cloud: https://aws.amazon.com/blogs/aws/new-storage-optimized-amazon-ec2-instances-i4i-powered-by-intel-xeon-scalable-ice-lake-processors/