Farr, Aaron wrote:
Merlin currently provides the following default context value (amongst a few others):
urn:avalon:home = ${user.dir}/home/${partition.name}/${component.name}
What I would like to propose this be changed to something like:
urn:avalon:home = $(merlin.home}/apps/${partition.name}/${component.name}
This is much more similar to the way it is handled in Phoenix. It provides a bit more predictability as to where your urn:avalon:home will be and will make migration of Phoenix apps simpler (IMHO).
Spit, grumble, spit ...!
:-)
There are few issues I have with the above proposal.
Issue (1), ${merlin.home} refers to the parent directory of the runtime repository. This allows the possibility to switch the runtime environment - e.g. the services I have running use the merlin installation as ${merlin.home} whereas I use the Maven directory as ${merlin.home} when running merlin against the latest builds. Alternatively you switch to any other repository just using -system command line option. This is valuable when testing against a new set of jars (i.e. keep you old working repository, create a new version repository, test, validate, migrate, or revert).
Issue (2) - assuming we seperate ${merlin.home} from the repository, e.g. ${merlin.repository}, and we default to using ${merlin.home}/apps, there is nasty downside (as I found out back with an early incarnation of Merlin 2) - its drop dead easy to destroy info by simply launching a container and have it write over data in a system wide shared repository. The much better solution is to plan deployment scenarios. For example, with James running as an NT service, I declare an explicit home directory that I know is explicity under James control and will not be impacted by any other concurrent deployment of James.
Issue (3) - the Phoneix "apps" directory is actually a combination of two seperate and distinct notions in Merlin. The "apps" directory serves as an active deployment directory (drop you sar file here), and the working home directory. In Merlin there is a deployment path (possibly containing multiple directories and executable jar files), and a seperate home directory. These two aspects should be kept seperate in all respects.
However ....
I do think that there is room for improvement. Currently the working directory is based on the merlin deployment home (specified by -home and defaulting to ${user.dir}) plus the "/home" suffix. If I do something like the following:
$ merlin -home apps my-deployment-dir
I end up with a deployment home of
${user.dir}/apps/home
I think the general user experience would be better (and closer to the phoenix model) if the resulting deployment home was
${user.dir}/apps
Consequently the path to urn:avalon:home would be:
$(user.dir}/apps/${partition.name}/${component.name}
The difference here is that "${user.dir}/home" would be the default deployment home and that any -home command line parameter would override that value. I.e. - no appending of "/home".
How does that sound?
Steve.
--
Stephen J. McConnell mailto:[EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
