babashka

Johnny Hane 2026-02-24T13:08:01.655379Z

I was messing around with sending multiple queries to the babashka sql pod concurrently, and it seems like the pod's :invoke function https://github.com/babashka/babashka-sql-pods/blob/132f0e6e67b6e4e7463d0e25b25305f05b1f6b0d/src/pod/babashka/sql.clj#L314. So for instance, if you send two queries from different threads in your bb script, they'll still have to wait to process in order. Do pods have to process requests in order? Is that how the pod protocol works?

borkdude 2026-02-28T13:00:27.393669Z

sorry I forgot about this. yes, multiple parallel requests in pod seem good

borkdude 2026-02-24T13:14:29.814599Z

I guess it doesn't have to but that's like how it works currently. We could try to change it

borkdude 2026-02-24T13:16:13.952589Z

have you also looked at the pod client code in babashka.pods? I think it suppors parallism but not 100% sure

Johnny Hane 2026-02-24T13:19:30.481299Z

I have not! I'll take a look in a bit

Johnny Hane 2026-02-24T14:14:24.902409Z

Ok it actually seems like the pod client does support parallel requests! I don't understand the whole flow (am quite noobish in clojure world) but it looks like • each request gets a UUID • the write function https://github.com/babashka/pods/blob/ed5e1f3390b9dfca564f66b6e79c739c3cd82d78/src/babashka/pods/impl.clj#L20 • maybe each request https://github.com/babashka/pods/blob/ed5e1f3390b9dfca564f66b6e79c739c3cd82d78/src/babashka/pods/impl.clj#L112?

Johnny Hane 2026-02-24T14:18:02.767879Z

How would you feel about a PR to make the sql pod handle multiple requests in parallel?

Johnny Hane 2026-03-03T15:15:44.558699Z

No prob, just opened a PR. My first ever open source PR, in fact! I got it working with a write lock and virtual threads. Tried it out on a work script that scans a bunch of databases for a given ID, and it knocked it down from 25 seconds to 1.5 seconds!!

borkdude 2026-03-03T15:59:36.108179Z

PR looks great!

borkdude 2026-03-03T16:21:35.494029Z

• I'm fixing some CI issues and will ask you to merge with master later. • Perhaps you can also add concurrent transaction tests, since transactions are a bit involved in the pod. I expect them to work though. • Perhaps an uncaught exception handler on the virtual thread to log an error which would otherwise go unnoticed

Johnny Hane 2026-03-03T16:26:40.522119Z

alright sounds excellent!!

borkdude 2026-03-03T16:29:20.213179Z

alright, merge with master and push. CI should be working again

Johnny Hane 2026-03-03T16:33:19.710729Z

awesome, looks like CI is running. I'll add the transactions + concurrency tests and the exception on the virtual thread

borkdude 2026-03-03T16:33:54.996699Z

oops, I upgraded to GraalVM 25 which seems to break other stuff. I'll fix it meanwhile

borkdude 2026-03-03T16:33:59.143979Z

👍

borkdude 2026-03-03T17:33:52.045239Z

ok merge once more

Johnny Hane 2026-03-03T17:35:29.077519Z

alrighty looks like the tests are running again

borkdude 2026-03-03T17:39:36.756539Z

let me fix one more thing

borkdude 2026-03-03T17:41:06.514019Z

the uberjar was built using JDK 11 instead of 25

borkdude 2026-03-03T17:41:11.335329Z

but now it should work

borkdude 2026-03-03T17:41:13.541689Z

merge again

Johnny Hane 2026-03-03T17:43:27.295089Z

merged it

Johnny Hane 2026-03-03T18:20:36.917319Z

looks like tests are passing! I had a reflection problem cause I wasn't type hinting the exception handler. Had no idea what I was looking at but claude figured it out right away lol. If babashka didn't already exist I might have more interest in learning how to compile clojure with graal

borkdude 2026-03-03T19:15:34.900179Z

merged

borkdude 2026-03-03T19:19:24.124439Z

github is very flaky right now though, so I'll release later. https://www.githubstatus.com/

Johnny Hane 2026-03-03T19:28:22.156059Z

ah yeah I did see that. Amazing news though!! Please let me know when you release, I'm so excited hahaha

m3tti 2026-02-24T17:47:10.381089Z

is there a pod to encrypt stuff with gpg in babashka ?

borkdude 2026-02-24T18:15:15.273829Z

You can shell out to the gpg binary? Or you can use the buddy pod but this seems overkill probably

m3tti 2026-02-24T18:16:13.947629Z

i'm thinking about a simple vault (secret manager) sops and the other options are overkill imho 😄

m3tti 2026-02-24T18:16:28.390139Z

i would love to share env files securly with people in my team

borkdude 2026-02-24T18:17:38.020219Z

I saw a thing for this on HN today: https://github.com/GreatScott/enveil

borkdude 2026-02-24T18:18:09.699689Z

or maybe it's similar but not quite what you're looking for

m3tti 2026-02-24T18:21:21.782979Z

ok this looks interesting so basically it starts a shell for you with all the env variables in the shell session right?

m3tti 2026-02-24T18:21:40.216899Z

at least thats what i understand from that

borkdude 2026-02-24T18:23:16.366519Z

don't know exactly

m3tti 2026-02-24T18:23:42.271379Z

interesting so the idea is great but the point i'm missing is secret sharing

m3tti 2026-02-24T18:23:50.656369Z

this is hiding it afaik

borkdude 2026-02-24T18:24:46.547369Z

there's solutions for this, basically password managers with team access

m3tti 2026-02-24T18:26:45.482869Z

yes but this isn't like a vault 😄

m3tti 2026-02-24T18:27:05.400609Z

i like this enveil idea that is pretty great actually

2026-02-24T20:49:51.816809Z

i'm trying to write a spec for a macro, and i'm relying on :clojure.core.specs.alpha/param-list. however, when i run this in babashka, it fails because that doesn't exist. do the clojure core specs exist in babashka somewhere?

borkdude 2026-02-24T20:56:13.306709Z

if you include the deps, then yes, I think

2026-02-24T20:56:25.680339Z

okay, cool