Hello guys! looking for tips and tricks for using ...
# server
r
Hello guys! looking for tips and tricks for using kotlin native/JVM on AArch64 for backend systems/microservices
e
Any particular topic you're wondering about?
r
I'm wandering about writing microservices, api's etc for backend systems, but nothing in particular. Maybe ktor, mTLS that sort of thing, if that makes sense
and native (and shared libraries) to facilitate migrations to aarch64 without refactor
the name of my father was also Emil! 🙂
e
Haha, I hope he taught you better than I can.. I'm not too familiar with native backends, not really sure why you need it and aarch64 in particular 🙂 I think Ktor is basically your only bet for that, unless you're OK with Graal native images in which case you have a few more options. I think you need to rely on Ktor, KotlinX serialization to build a fully native backend. You could also look into using Kotest which is multiplatform compatible for testing it 😉
r
basically to host backend on arm servers, like graviton
💡 1
thanks for the tips! Will look into that for sure
j
Check out #http4k for fully worked examples of microservices using graal.
a
Are you actually after native? Otherwise the JVM has done all the heavy lifting for you and you can run pretty much anything. e.g. I develop using on an M1 Mac (aarch64) using a variety of frameworks without issue (e.g. Spring, http4k, Dropwizard & Armeria). We don't deploy to graviton yet but there's no reason we couldn't
1
There's a few libraries that bundle native libs internally that may fall back to less performant defaults, but they'd be pretty rare
1
j
@Ricardo Fernandes I got a Ktor Native server sample project on my GitHub. It will compile to Aarch64 and x64 on Linux and Mac OS. I cannot recommend it yet for productive work as compiling takes quite long and breakpoints are not working yet in IntelliJ. Also there is currently no library to connect to server side databases (MySQL, Postgesql, MongoDB, …). https://github.com/jonas-tm/ktor-native-server-example
❤️ 1
😮 1