Other Where to put java daemons ?

abishai

Aspiring Daemon

Reaction score: 195
Messages: 779

When you develop java daemons (say, microservices), where you put them ? (If not packaging with FreeBSD pkg system) ?
I have too many places and mind and can't make a decision :)

1. /home - looks bad, as I prefer nobody user
2. /usr/local/share/java/classes - looks too deep
3. /opt - looks like linux
4. /srv - looks like arbitrary directory

All of my daemons are single jar files (fat jars).
Config files are deployed with ansible, jars by jenkins. Daemons not write anything on file system.
 

20-100-2fe

Well-Known Member

Reaction score: 368
Messages: 303

Each company has its own standards for application layout, and they often don't use the standard layout of the target OS. In short: do what you deem good for yourself. :)

You may also want to deploy your microservices as jails (or Docker images, with Linux) so each one can have its own version of JRE. This allows to:

- take advantage of recent Java versions for new applications
- stick to an old Java version for an application using a framework or library that cannot be migrated
- migrate microservices independently
 
OP
A

abishai

Aspiring Daemon

Reaction score: 195
Messages: 779

Each company has its own standards for application layout, and they often don't use the standard layout of the target OS.
Well, I developing for myself :p
I use jails, one for database, one for grafana, one for graylog, one for nats-streaming, one for microservices. Maybe later I'll put them to different jails, now it's just a developer stack.

I found 1 or 2 libraries there when installed graylog for logging, I think this directory is used not often.
 
Top