Hey there! My name is Gunnar, I work for a small a...
# ktor
g
Hey there! My name is Gunnar, I work for a small analytics company located in Austria and we're using Ktor as backend technology for serving our dashboard applications.
d
Sounds like an proxy application that runs before the others
https://nats-io.github.io/docs/ You could use nats as your proxy
Or an nginx
g
Thanks for the reply! Actually, it's a bit more than that. There are shared pages like login/logout, profile page, etc. that live beside the applications. I was just wondering whether it would be possible to build such a composable application in Ktor.
g
What kind isolation is required? Because the easiest way would be just have 1 Ktor application and compose multiple independent routes
Because you also need a way to define default behavior, also what if you want to handle multiple exceptions with a single function?
g
Right now I have a module for each „application“, which sets up the corresponding routes. These modules should be Independent of each other, so they can be loaded from separate JAR files. Right now I have the problem that application features would get installed twice, leading to an error. I was thinking of implementing some sort of custom application engine, which manages an application mounted at a specific route, and delegating the appropriate calls to the nested application, with the URI adjusted accordingly. I‘m somehow lost in the pipeline API, however.
g
I see, probably it make sense to create an issue about it on ktor issue tracker