This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-13
Channels
- # adventofcode (37)
- # announcements (11)
- # babashka (46)
- # beginners (35)
- # biff (1)
- # clojure (44)
- # clojure-austin (1)
- # clojure-europe (23)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-uk (5)
- # conjure (3)
- # cursive (22)
- # data-science (13)
- # docker (11)
- # events (8)
- # hyperfiddle (7)
- # joyride (1)
- # juxt (9)
- # malli (7)
- # matrix (4)
- # pedestal (3)
- # podcasts-discuss (1)
- # portal (1)
- # re-frame (62)
- # reitit (2)
- # releases (1)
- # schema (3)
- # sql (14)
- # squint (3)
- # xtdb (6)
- # yamlscript (4)
Thoughts on this postgres client? https://vertx.io/docs/vertx-pg-client/java/
Looks like it supports LISTEN
well, unlike JDBC where you have to poll (AFAIK)
Haven’t looked into it, nor have I looked properly into https://github.com/igrishaev/pg, but that also sounds interesting 🙂
@U08JKUHA9 I looked into this recently (I wrote my own PG-based background job processor with extra features) and I looked into VerteX, but decided not to go for it: my main usecase was to be able to re-use the connection pool I'm already using (HikariCP) to share within a single process that handles background jobs, HTTP requests etc, and that was a deal breaker. If you go with the VertX route you have to either accept that part of your system works one way, since it's all fully async.
@U0JEFEZH6 hmm yea good points. Async might be the wrong thing to bet on now with loom released.
ah yes, that's a good point - my library can technically use them now, I need to test it
Yes indeed, it's 3rd of 4th version of it at this point and I'm using it in production - it does background jobs (immediate and scheduled), has CRON support and comes with a couple of other tools that you might need (PG-based locks). It's not quite ready for open sourcing, but individual parts of it are battle tested, I just want to make sure that even if it's "alpha" quality it's usable
Oh very cool, that is actually what I've been working on also (CRON, scheduling jobs, etc)
there's a couple of libraries that do this already but I think I have an edge ;-) my CRON scheduler doesn't drift, which is an issue if you're using j.u.c.ScheduledThreadPoolExecutor so it's stable enough to handle scheduled operation that need to be as close to "wall clock" time as possible (if I'm using this term correctly). Something I learned the hard way after seeing some of the scheduled jobs firing with +/- 5m delays
ScheduledThreadPoolExecutor drifts???
Yes, if you leave it running long enough it will start diverging. At first I thought that I messed up NTP setup or something, only to discover that it's not meant to be used that way in the first place. Here's a good blog post that dives into it: https://leventov.medium.com/cronscheduler-a-reliable-java-scheduler-for-external-interactions-cb7ce4a4f2cd and I wrote a wrapper around CronScheduler in the library I mentioned earlier, or you can use it directly, the API is basically the same as ScheduledThreadPoolExecutor: https://github.com/TimeAndSpaceIO/CronScheduler
I really need to tidy it up and release it :-), it does more than just wrapping that library but also comes with a CRON parser and other bits.
very interesting, thanks for sharing!