Ways to reduce the startup time of Java and Scala applications have already been discussed here and here . One proposed solution was to use a client-server approach with Nailgun or a simple written server that communicates over a TCP socket with netcat .
On the one hand, Nailgun is designed for this purpose. On the other hand, its last release 0.7.1 was in 2005, and I'm a little worried if development has stopped and how stable it is. netcat seems like a pretty standard tool and is available on many Linux / Unix systems. But both of these systems are new to me, so I would like to know if my observations are correct and what are the other advantages and disadvantages of using Nailgun vs netcat to provide a fast command line interface for a Java application?
PS You may wonder why improve startup time, since it is already quite reasonable (~ 100 ms on my machine) or why not use C / C ++ instead. The first is that the application will be executed many times (for example, from a loop in a bash script), and this usage scenario cannot be changed, unfortunately, the second is because this console program will be just an alternative interface (CLI) to the existing piece of software written in Java.
source share