https://kotlinlang.org logo
#ktor
Title
# ktor
g

gschulze

06/30/2019, 10:36 AM
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

Dennis Schröder

06/30/2019, 11:05 AM
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

gschulze

06/30/2019, 11:22 AM
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

gildor

06/30/2019, 2:02 PM
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

gschulze

06/30/2019, 4:23 PM
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

gildor

07/01/2019, 6:14 AM
I see, probably it make sense to create an issue about it on ktor issue tracker
2 Views