holy-lambda

viesti 2021-04-26T08:30:17.115600Z

ah

viesti 2021-04-26T08:30:47.116100Z

yeah, was thinking on background that bb + tasks etc. bring deps.edn closer

Karol Wójcik 2021-04-26T08:47:15.116900Z

I'm taking few days off from work, so maybe this week I will roll out a new release.

🏖️ 2
Eugene Koontz 2021-04-26T20:11:06.118300Z

enjoy it!

viesti 2021-04-26T05:55:13.104700Z

It occurred to me that could never JVM runtimes be supported, by bundling the JVM (maybe in a layer) and having the custom runtime event polling loop run with regular JVM. Probably could still keep the current JVM runtime support, no need to remove it I think. Would add another deploy target though 🙂

viesti 2021-04-26T05:59:06.107300Z

Also, just for the record, Ghadi was experimenting with jlink based Lambda a while ago (https://github.com/ghadishayban/lambdaclj-jdk11) and I remember doing some experiments with jaotc (https://docs.oracle.com/en/java/javase/13/docs/specs/man/jaotc.html), but I guess neither of those offer as fast startup as native-image and still introduce some overhead, although maybe smaller than native-image compilation, but native-image probably yields better results overall

Karol Wójcik 2021-04-26T08:48:14.117Z

@viesti Let me know whether it makes sense.

viesti 2021-04-26T08:51:46.117200Z

ah was thinking not using the AWS provided JVM8 runtime at all, but to bundle own JVM version, either directly or via a layer

viesti 2021-04-26T08:52:28.117400Z

don't know if AWS at some point upgrades it JVM runtime to other versions, but was thinking that people might want to try using never JVMs at some point too 🙂

viesti 2021-04-26T08:53:25.117600Z

things probably break if you compile the bytecode to a newer version which JVM8 doesn't support, so shipping the whole jvm as a custom runtime would then cut it

viesti 2021-04-26T08:53:55.117800Z

might be in holy-lambda scope, but don't have to do it immediately, was just a thought 🙂

Karol Wójcik 2021-04-26T06:51:58.112900Z

Hmm... Java runtime stays, but I can provide a layer which includes Clojure + holy-lambda runtime as jars, then I can simply merge classpaths. It will however not impact performance in any matter. What Ghadi did is basically the same thing we're doing in holy-lambda. You can either gen RequestStreamHandler and create a syntatic define which proxies input to wrap-lambda (3 arity wrap-lambda). Or we can use 2 arity wrap-lambda via (native/entrypoint). @viesti You can experiment with jaotc and if you decide the results are promising we can talk about this through. My current roadmap is: • babashka tasks • polish babashka-layer • introduce nodejs runtime

Karol Wójcik 2021-04-26T06:52:47.113200Z

@viesti Of course using java11 is kinda scarry w aws sam since they do some nasty things with loading jars.

Karol Wójcik 2021-04-26T06:53:35.113400Z

https://github.com/aws/aws-sam-cli/issues/2787

viesti 2021-04-26T06:05:21.111900Z

I guess Leiningen offers: • way of getting dependencies • way of doing AOT and a uberjar (for native-image compilation) deps.edn then offers: • way of getting dependencies (also git dependencies, which is neat) • Probably be easier to use with babashka (I guess babashka understands a bit about deps.edn and spawning the clojure cli for listing dependencies is faster than with Leiningen) • doesn't have built-in AOT since it's not a build tool, but there are ways around that (provide a task which does something like this: https://github.com/juxt/pack.alpha#aot-for-better-startup-speed, or use a packaging library like https://github.com/seancorfield/depstar#aot-compilation)

viesti 2021-04-26T06:14:53.112800Z

I like deps.edn, although it brings a bit of extra for for the AOT compilation 🙂

Karol Wójcik 2021-04-26T06:55:37.114800Z

Actually we will provide both. I now that deps.edn is now preferred, but I don't want to stick to just one build tool.

Karol Wójcik 2021-04-26T06:56:51.115300Z

@viesti I need a deps.edn support to provide a tasks for it: https://github.com/FieryCod/holy-lambda/issues/36#issuecomment-826367331