Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Dependency management at load-time versus at run-time

Concepts to understand:

  1. Top-level service vs dependency (or required service): A top-level service is the functionality that you intend to deploy.  A dependency or required service is one that is only used because your intended top-level service needs it.
  2. Singleton vs Multiple (sharable property in Service Definition file): "The value of this field determines how many instances of the service’s containers will be running on a node when the service is deployed more than once to the same node."  You might use the `singleton` value if your environment is resource-constrained and you cannot run more than one instance of a service.  Another reason would be if a service is stateful (persists information between one invocation and the next).  If the service is stateless and your have the available resources to run more than one copy, you should choose `multiple` instead of `singleton`.
  3. Service Definition and Deployment Policies vs Node (Deployment) Pattern: Use the former when you have one or more top-level services that have independent lifecycles.  This is the recommended approach.  Use the latter only when you have a single application composed of multiple top-level services that have interdependent lifecycles.