-
Notifications
You must be signed in to change notification settings - Fork 64
Kotlin support #283
Comments
Definitely interested - thanks @sdeleuze! |
Have you looked at using Kotlin Lambda's as functions (You could also do this with Java Lambdas)? You do not need scripting, you can serialize the Lambda to a form that can be shipped, added to a sidecar and executed (and securely as well against white-listed methods). See: And an example usage as binary scripts in Elasticsearch: There was also an experiment done where a generic AWS Lambda was created, that could run scripts based on their desired context, the context deciding what access they were allowed via a predefined API and security rules. Then the client code would just send a message that included the Kotlin lambda and it would be verified and executed by the AWS Lambda as the message passed by. This allowed queuing of data + functions to be executed at any scale. Then this was tried to basically have a Lambda that merged incoming data with predefined "binary scripts" (Kotlin serialized Lambdas) and pass along to the executor function, so that only the data was sent by clients, merged with the lambda, and executed at scale. I'm the maintainer of the projects and they are nearing release, along with more samples. So if there is interest, let's see how they could work here. |
Thanks @apatrida, I was not aware of these interesting capabilities. That's said, we are probably going to start with something simpler but I will contact you after that to explore your proposal for scripting support. After more thoughts, my proposal is to start simple by Kotlin/JVM support on After that, I would like to have a deeper look on the options to support Kotlin/Native, and explore the following points:
|
As discussed on projectriff/java-function-invoker#81, I am going to work on a
When that will work, I would like to explore Kotlin/Native support (as described in my previous comment) and scripting support. |
The current plan to support other languages is best described in #1093. Feel free to comment there for further discussion. |
Hey, I would be interested to contribute Kotlin support to Riff. This support would be based on the upcoming Kotlin Scripting support improvements which is designed to overcome current limitations (no imports, no caching between execution) and should allow to target various platforms (JVM and Native) in a consistent way.
Prototypes of this new support seems to be around the corner, if it takes too much time we may do some progress using kscript potentially.
Supporting Kotlin/JVM via the current Java Riff support is possible and maybe already works since it is equivalent to Java in term of packaging, so it could be low hanging fruit for the short term. I will check if that works or not. But I do think Kotlin Scripting enhanced support will be a much more suitable foundation for Riff support.
Any thoughts or interest about this topic?
The text was updated successfully, but these errors were encountered: