Fork me on GitHub
#graalvm
<
2020-10-04
>
zilti14:10:39

Wouldn't it make sense to use FastCGI as interface instead of HTTP for server-side, web content-serving programs that you want to compile with GraalVM? Since it is a so much simpler, more straightforward protocol that doesn't rely on massive and/or complicated Java libraries like Jetty or Apache HTTP

jeroenvandijk12:10:01

I would be curious to hear what the benefits of FastCGI are over httpkit. I have used it too little to know

zilti20:10:24

FastCGI is a much more lightweight protocol that has been made for applications running behind an HTTP server. That's basically it. The idea being that it is silly that each application spins up its own HTTP server when they'll all going to be behind an actual, web-facing one.

jeroenvandijk11:10:33

Ah yeah I see, thanks

borkdude14:10:11

@zilti Sure, but note that the httpkit webserver is already compatible with GraalVM and quite small in binary size and in terms of memory usage during compilation. It's part of babashka today

borkdude14:10:04

And so it the web client.

borkdude15:10:53

@zilti If you want to go down that road: you'll need httpkit with this commit: https://github.com/http-kit/http-kit/commit/6a03df3ecc61be4dcc01d12712346e051620f8b4 or do something like this: https://github.com/borkdude/babashka/blob/master/feature-httpkit-server/babashka/impl/httpkit_server.clj to prevent the runtime require reference, which tends to bloat binaries / spike compile time