Looking for Kotliners who are interested in contri...
# opensource
n
Looking for Kotliners who are interested in contributing to the OpenFaaS Kotlin Templates project ( https://github.com/napperley/openfaas-kotlin-templates ). The project provides Kotlin templates for the open source OpenFaas ( https://www.openfaas.com/ ) Serverless platform, which is supported by the community. Need some people who can work on a new OpenFaaS Kotlin JVM template, which will use Graal as the preferred JVM implementation.
g
Are you talking about Graal for AOT or just as alternative VM?
k
What contributions do you need?
n
Graal is used as alternative VM.
After contributions to a new Kotlin JVM template (that will work in a manner similar to the Kotlin Native template), using a lightweight library/framework/toolkit which is suitable for Serverless.
g
What is a point to use Graal as VM in your case?
n
Shorter startup time, smaller code size, and lower memory usage.
g
Do you have any good benchmarks about this?
n
There is this Graal benchmark (covers Netty) which is relevant for Serverless: https://medium.com/graalvm/instant-netty-startup-using-graalvm-native-image-generation-ed6f14ff7692 . Main catch with the benchmarks is that they only cover the native image side instead of the VM side.
g
Exactly
There are obvious advantages (and restrictions and disadvantages) of compilation to native binary But if we talk about alternative VM, I’m not sure that it’s so obvious, yeah, looks like Graal JVM probably can give some improvements for some specific use cases, but this is not so visible and also can be slower than newest JVMs (graal vm implementation is for Java 8 ) and of course has much less adoption, so not sure that this is really worth to do and adopt Graal VM for some generic project, at least now
n
In that case it might be worth looking into OpenJ9 (https://www.eclipse.org/openj9/).
g
I don’t think that openj9 is somehow significant better for generic use case. Looks more like marketing about “cost-effectively in the cloud”
sure, maybe for some highload use cases it make sense (but I’m not really believe, probably you can get more just from tuning JVM for your use case), but for functions I think it’s nothing comparing on startup penalty
k
Ditto, I don't think Graal as a VM is worth it. Startup time is similar to other VMs. Graal AOT on the other hand is worth it for serverless...
👍 1
g
@kenkyee +100
Actually for FaaS graal aot looks like an obvious choice. You just need some webserver that works with aot without too much configuration
n
Very likely to be a huge issue since many Java/Kotlin libraries/frameworks/toolkits use Netty as a basic web server. Vert.x wouldn't be a possible option when you look at the sheer amount of changes that need to be made for Graal AOT: https://vertx.io/blog/eclipse-vert-x-goes-native/