[jpos-users] What's "the best" way to organize XMLs into domain-specific groups of files in the deploy folder?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jpos-users] What's "the best" way to organize XMLs into domain-specific groups of files in the deploy folder?

Borna Novak
In the deployment folder you might have

10_application_configuration.xml
12_hsm.xml
10_config_A.xml
...
10_config_N.xml
20_incoming_channel_A.xml
...
20_incoming_channel_N.xml
30_mux_A.xml
...
30_mux_N.xml
40_network_administration_A.xml
...
40_network_administration_N.xml
...

The list quickly grows with the number of links/domains and I'm wondering, is there a good way to organize these to make them more manageable?

You could prefix the files with the name of the domain:

A_10_config.xml
A_20_incoming_channel.xml
A_30_mux.xml
A_40_network_administration.xml
...
N_10_config.xml
N_20_incoming_channel.xml
N_30_mux.xml
N_40_network_administration.xml

but this has an unwanted side-effect of changing the load order which in some cases might be important - I have a feeling this design would come and bite me down the road, am I right? Also, I've seen a couple jPOS implementations, and none of them did things this way, which is another warning sign.

Am I fretting about this too much and this is the way to go or are my concerns real?

Plan B (one that I would like better) would be to somehow organize it into subfolders, ie

A/10_config.xml
A/20_incoming_channel.xml
A/30_mux.xml
A/40_network_administration.xml
...
N/10_config.xml
N/20_incoming_channel.xml
N/30_mux.xml
N/40_network_administration.xml

but this simply doesn't work, as far as I can tell the classes don't get loaded.


What's the best way to tackle this?


Kind regards,

Borna

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/eb9f4870-b4f5-4571-a9a9-3970dfe8cdea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] What's "the best" way to organize XMLs into domain-specific groups of files in the deploy folder?

jPOS - Users mailing list
On 30/06/17 10:32, Borna Novak wrote:
> The list quickly grows with the number of links/domains and I'm
> wondering, is there a good way to organize these to make them more
> manageable?
More manageable than a list of files?

I tend to have the number define the order of load, then the next part
of the name to group the functional components and the then rest of the
name to describe the content/function.

But of course each to his (or her) own.

I have thought that folders would be a natural extension, but have never
had a terrible need for it.

--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.  Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/0d0d7e2a-0a28-21d4-895a-43bea4bd4fda%40talktalk.net.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] What's "the best" way to organize XMLs into domain-specific groups of files in the deploy folder?

Andrés Alcarraz
In reply to this post by Borna Novak

never tried but according to the doc Q2 supports recursive  deploy:

https://github.com/jpos/jPOS/blob/master/doc/src/asciidoc/ch07/running.adoc

Q2 accepts several command line switches; for a complete list, use --help, e.g.:

bin/q2 --help

usage: Q2
 -C,--config <arg>                 Configuration bundle
 -c,--command <arg>                Command to execute
 -d,--deploydir <arg>              Deployment directory
 -e,--encrypt <arg>                Encrypt configuration bundle
 -h,--help                         Usage information
 -i,--cli                          Command Line Interface
 -n,--name <arg>                   Optional name (defaults to 'Q2')
 -O,--osgi                         Start experimental OSGi framework
                                   server
 -p,--pid-file <arg>               Store project's pid
 -r,--recursive                    Deploy subdirectories recursively
 -s,--ssh                          Enable SSH server
 -sa,--ssh-authorized-keys <arg>   Path to authorized key file (defaults
                                   to 'cfg/authorized_keys')
 -sh,--ssh-host-key-file <arg>     ssh host key file, defaults to
                                   'cfg/hostkeys.ser'
 -sp,--ssh-port <arg>              ssh port (defaults to 2222)
 -su,--ssh-user <arg>              ssh user (defaults to 'admin')
 -v,--version                      Q2's version
Best regards

Andrés

El 30/06/17 a las 06:32, Borna Novak escribió:
In the deployment folder you might have

10_application_configuration.xml
12_hsm.xml
10_config_A.xml
...
10_config_N.xml
20_incoming_channel_A.xml
...
20_incoming_channel_N.xml
30_mux_A.xml
...
30_mux_N.xml
40_network_administration_A.xml
...
40_network_administration_N.xml
...

The list quickly grows with the number of links/domains and I'm wondering, is there a good way to organize these to make them more manageable?

You could prefix the files with the name of the domain:

A_10_config.xml
A_20_incoming_channel.xml
A_30_mux.xml
A_40_network_administration.xml
...
N_10_config.xml
N_20_incoming_channel.xml
N_30_mux.xml
N_40_network_administration.xml

but this has an unwanted side-effect of changing the load order which in some cases might be important - I have a feeling this design would come and bite me down the road, am I right? Also, I've seen a couple jPOS implementations, and none of them did things this way, which is another warning sign.

Am I fretting about this too much and this is the way to go or are my concerns real?

Plan B (one that I would like better) would be to somehow organize it into subfolders, ie

A/10_config.xml
A/20_incoming_channel.xml
A/30_mux.xml
A/40_network_administration.xml
...
N/10_config.xml
N/20_incoming_channel.xml
N/30_mux.xml
N/40_network_administration.xml

but this simply doesn't work, as far as I can tell the classes don't get loaded.


What's the best way to tackle this?


Kind regards,

Borna

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/eb9f4870-b4f5-4571-a9a9-3970dfe8cdea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/fc9ad2c6-acfa-28b4-a099-4e24b3f1511a%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] What's "the best" way to organize XMLs into domain-specific groups of files in the deploy folder?

Alejandro Revilla

jPOS does support --recursive but there is a problem, the directory name will play in the deploy order.

I think we can make some small changes to the --recursive switch so that we honor the switch and scan all directories but we still sort based on file basename, but, that would also have to be configurable, I can imagine situations where people want to keep the order inside the sub directories. We may add dependency support in the future so that we can get rid of the deploy order (that’s tricky when you redeploy stuff on a running system).

In some systems with many servers I ended up writing a little configurator that reads a YAML file and create the XMLs, so you still have the XMLs in the deploy directory, but they get auto-generated from a single file, i.e:

-
  server: server1
  port: 2000
  channel: NACChannel
  header: 6000010000
  packager: GenericPackager
  packager_config: jar:packager/iso87binary.xml
  destination: dest1
  filters: 
    - MyFilter 
    - MyOtherFilter 

-
  server: server2
  port: 2001
  channel: NACChannel
  header: 6000010000
  packager: GenericPackager
  packager_config: jar:packager/iso87binary.xml
  destination: dest1
  filters:
    - MyFilter
    - MyOtherFilter

The configurator is implemented as a little jPOS CLI command, so everything gets quite integrated.




On Fri, Jun 30, 2017 at 6:06 PM, Andrés Alcarraz <[hidden email]> wrote:

never tried but according to the doc Q2 supports recursive  deploy:

https://github.com/jpos/jPOS/blob/master/doc/src/asciidoc/ch07/running.adoc

Q2 accepts several command line switches; for a complete list, use --help, e.g.:

bin/q2 --help

usage: Q2
 -C,--config <arg>                 Configuration bundle
 -c,--command <arg>                Command to execute
 -d,--deploydir <arg>              Deployment directory
 -e,--encrypt <arg>                Encrypt configuration bundle
 -h,--help                         Usage information
 -i,--cli                          Command Line Interface
 -n,--name <arg>                   Optional name (defaults to 'Q2')
 -O,--osgi                         Start experimental OSGi framework
                                   server
 -p,--pid-file <arg>               Store project's pid
 -r,--recursive                    Deploy subdirectories recursively
 -s,--ssh                          Enable SSH server
 -sa,--ssh-authorized-keys <arg>   Path to authorized key file (defaults
                                   to 'cfg/authorized_keys')
 -sh,--ssh-host-key-file <arg>     ssh host key file, defaults to
                                   'cfg/hostkeys.ser'
 -sp,--ssh-port <arg>              ssh port (defaults to 2222)
 -su,--ssh-user <arg>              ssh user (defaults to 'admin')
 -v,--version                      Q2's version
Best regards

Andrés

El 30/06/17 a las 06:32, Borna Novak escribió:
In the deployment folder you might have

10_application_configuration.xml
12_hsm.xml
10_config_A.xml
...
10_config_N.xml
20_incoming_channel_A.xml
...
20_incoming_channel_N.xml
30_mux_A.xml
...
30_mux_N.xml
40_network_administration_A.xml
...
40_network_administration_N.xml
...

The list quickly grows with the number of links/domains and I'm wondering, is there a good way to organize these to make them more manageable?

You could prefix the files with the name of the domain:

A_10_config.xml
A_20_incoming_channel.xml
A_30_mux.xml
A_40_network_administration.xml
...
N_10_config.xml
N_20_incoming_channel.xml
N_30_mux.xml
N_40_network_administration.xml

but this has an unwanted side-effect of changing the load order which in some cases might be important - I have a feeling this design would come and bite me down the road, am I right? Also, I've seen a couple jPOS implementations, and none of them did things this way, which is another warning sign.

Am I fretting about this too much and this is the way to go or are my concerns real?

Plan B (one that I would like better) would be to somehow organize it into subfolders, ie

A/10_config.xml
A/20_incoming_channel.xml
A/30_mux.xml
A/40_network_administration.xml
...
N/10_config.xml
N/20_incoming_channel.xml
N/30_mux.xml
N/40_network_administration.xml

but this simply doesn't work, as far as I can tell the classes don't get loaded.


What's the best way to tackle this?


Kind regards,

Borna

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/eb9f4870-b4f5-4571-a9a9-3970dfe8cdea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/fc9ad2c6-acfa-28b4-a099-4e24b3f1511a%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CAAgSK%3DnQU7BoEkAcfnzTGgwO%2B8H-OoHzf4py-EaraAS-t%3DUhbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.