Posts

Showing posts with the label ktor

Kotlin / Ktor / Jdbi Json / Api / Free Marker / VueJs

Image
About this blog A brief reason for writing this blog. I am a server side http api / web developer predominantly using JVM based languages. Recently I started using Kotlin programming language (developed by JetBrains) with Spring Boot Framework on AWS cloud to build an enterprise solution (including both API and small web portal for internal Admins) to serve data for the mobile apps. I loved Kotlin as a programming language for Server Side development. So I was curious to explore Ktor Framework (developed and sponsored by JetBrains) for Server Side Web Development (API & Webpages). Hence I created a sample repository in Git Hub to play with Ktor Framework to experiment with various enterprise grade features offered by Ktor Framework. Please read this blog in conjuction with my Kotlin repository available at https://github.com/harishkannarao/kotlin High Level Components Diagram API The API development was very very simple with Jackson / Google GSON integration. The...

Remote JVM monitoring using VisualVM

Image
Most of the modern JVM application frameworks like Spring Boot, Dropwizard and Ktor uses executable jars to bootstrap application with servers embedded inside the jar. The following steps will allow you to monitor the remote JVM running in cloud (or in house data center) using SSH port forwarding and Java JMX. In order to monitor the remote JVM, the java process needs to be started with extra system properties to enable JMX features and you should be able to SSH into the machine where the JVM is running. Start the Java application (or Java Process) with JMX enabled as given below: java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10006 -Dcom.sun.management.jmxremote.rmi.port=10006 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Djava.rmi.server.hostname=localhost -jar spring-boot-application.jar Create a SSH tunnel with port forwarding for JMX port ssh -L 10006...