4 ms·
This is awesome to see! I have been working on something like this for a while too. But it uses GraalVM and it's "Polyglot" runtime to provide support for JS/R
by gavinray 5y ago
This is awesome to see!
I have been working on something like this for a while too. But it uses GraalVM and it's "Polyglot" runtime to provide support for JS/Ruby/Python/WASM/LLVM languages.
It's packaged as a single binary using graal-native + Quarkus, or if you don't care about that (faster startup time/lower memory use/no JVM needed) but need maximum performance, you can run it as a regular JVM service as well.
It was born out of a need for a polyglot Functions-as-a-Service platform but without the weight of container orchestration -- I needed something I could deploy as a single binary.
Essentially OpenFaaS/OpenWhisk, minus containers.
It doesn't use CGI as a request/response specification though, it uses Vert.x "RoutingContext" interface which has methods like ".getBodyAsJson()", ".params('something')", ".header('foo')", etc.
https://vertx.io/docs/apidocs/io/vertx/ext/web/RoutingContext.html
An open standard like CGI probably would have been better, but Graal has marshalling facilities for sharing object types between languages, so the most user-friendly/ergonomic thing to do was to share the underlying web request object itself across language boundaries, including all the methods you can call on it.
---
This has given me motivation to finally finish it so I can publish + open-source it!