Suppose I have two or more different server applications developed in Clojure using the ZeroMQ and BSON protocols. How can I deploy them with a single JVM instance and also use common dependencies?
It seems like a waste of memory to use a JVM instance for each individual application. I plan to develop several Clojure applications in the future, and VPS memory is not cheap.
Although not explicitly said, applications running on the application server (Jetty, Glassfish) seem to use the same JVM to isolate their state. However, they require a container, and neither servlets nor Enterprise JavaBeans have an implementation that I could easily adapt to my user protocol.
I was thinking about using Servlets and implementing the dummy service () method, although I don't like the idea of ββhaving meaningless HTTP server overhead. As for the EJB container, I can't even understand its implementation.
It would be nice to have a container that requires only the init () and destroy () methods, but I cannot find the application server that provides it.
Maybe there is a way, or I donβt even need an application server. Can someone point me in the right direction?
source share