I have seen that there is no progress in project `...
# server
g
I have seen that there is no progress in project
kotless
sind about two years. I would consider this project dead (https://github.com/JetBrains/kotless) Is there an alternative? I am developing a ktor websocket backend that I would like to deploy on AWS als serverless / lambda.
a
What about osiris(https://github.com/cjkent/osiris)? It seems like alternative to kotless framework.
🙏 1
j
You're trying to do websockets on AWS? That's a little bit trickier of a proposition than most of the server frameworks I've found so far are willing to handle. One can't just convert a Ktor web socket server to run on AWS because API Gateway's websockets are event-based, while Ktor's are coroutine based. If you're up for using something that's a bit more experimental, there is a project we made at Lightning Kite called Lightning Server. It lets you build your servers in Kotlin abstracted away from hosting and other dependencies, and it does support writing web sockets that run on Lambda or a dedicated machine. If you're interested, let me know - it's all open source and used in our production stuff, but the API isn't fully stable yet, so I'd like to collaborate directly if you need it.
g
Two years ago, I did websockets in AWS with a backend written in F#. I took this approach: I had a ASP.NET Backend, that called stateless functions, and Lambdas that called the same functions (bundled in seperate modules). I could / would take the same approach here, because apart vom the API Gateway/ktor backend I also have different data stores. But I would like to easily build the AWS lambdas in kotlin without tampering with terraform etc.
v
Sadly neither kotless or Osiris have had any meaningful updates in a long time. I suspect the lambda cold start problem puts people off investing in it too. I ended up rolling my own API gateway proxy lambda router, it's working for my small use case. No websockets.
s
http4k has adapters for Lambda (to run behind API Gateway or deployed as Function URLs). It supports defining routes agnostically from runtime environment, but we're not opinionated on how people build or deploy it. We also have an example of using GraalVM (no hack required because http4k has no annotation/reflectomagic) to reduce memory footprint and mitigate some of the cold start issues.