...
This pattern applies to any module that manages multiple related-but-asymmetric services, such as a client and server. several asymmetric services that must manage the same resources.
The general pattern is to:
- create a namespace (directory) for each service
- apply the basic structure to each namespace
- continue to use the basic (top-level) module structure to manage module-wide configurations and resource orderings
Separate Client and Server Components (When NOT to apply this pattern)
In the case that you have a server and client that are two separately isolated services, such as the SSH server and client, then two separate modules should be created. This provides for a clean usage pattern over time.
Combined Client and Server Components (When TO apply this pattern)
There are going to be times where the server and client components cannot be split. A classic example is ntp, where the client and server require the same package and config file.
In these cases, isolate the functionality within the module to the bests of your ability and repeat the pattern below each subdirectory segment.
...