https://kotlinlang.org logo
#http4k
Title
# http4k
t

taer

04/22/2021, 10:13 PM
Are there any dropwizard admin like plugins for http4k? I'm trying to make a dropwizard app go away, but the main reason for DW is the http admin server that allows for heap-dumps, thread-dumps etc. Is there anything like that already existing?
d

dave

04/23/2021, 1:09 PM
I agree with @James Richardson - but to answer you directly - no there isnt, although I have done something similar in the past with the openapi module and ui as a simple interface
t

taer

04/23/2021, 3:45 PM
Convincing others on the team is the real thing. It's rarely used if ever. its just something they can do it they think they wanted to. I'd personally just hop into the container and jcmd it. To be fair, I'm new at this company, and have very little experience w/ their prod systems still. It's a feature I'd have to clone at least initially to make the conversion easier for them to swallow.
I just peeked at how DW does it. They have a complete standalone jar that has a servlet in it.
so.. I could theoretically import that into a http4k server instance and make it look the same
d

dave

04/26/2021, 6:22 PM
you can easily design it as a standalone module and just "mix" it in to the rest of the app. We do a similar thing with Kubernetes health routes
t

taer

04/26/2021, 6:27 PM
Is there a simple bridge for Servlet -> httpHnadler?
I see there's an opposite
The silly thing is a servlet, complete with Context init parameters. 🙂
d

dave

04/26/2021, 6:40 PM
Erm - we've never had that before! Although it should be trivial to write.
t

taer

04/26/2021, 6:41 PM
wow.. HttpServletRequest has a TON of things to implement
d

dave

04/26/2021, 6:42 PM
Are you sure it wouldn't be easier to just rip the functionality out one layer down?
Assuming there is a layer...
t

taer

04/26/2021, 6:42 PM
yah.. it would be.. Just basically clone it
yeah. these are mostly really thin servlets.
2 Views