The mode of deployment determines whether you update the site directly or indirectly. Two deployment mode options are available:
Online deployment deploys updated assets directly to the live site. Online deployment is appropriate only for development and testing.
Switch deployment deploys updated assets to off-line areas, then swaps these with assets on the live site as a single transaction. Production sites should always use switch deployment.
For demonstration and evaluation purposes, both the Publishing agent and the Publishing Web agent are configured by default to manage online deployments.
Online deployment
In an online deployment, a site’s repository assets are updated in one or more transactions and activated (made live on the site) as each transaction is committed. File assets are updated on the site and activated as each file is written to the local file system.
Switch deployment
A switch deployment requires two databases—one that is inactive with respect to a deployment target and another that is active and whose data is used on the same site. In a switch deployment, a site’s repository and file assets are updated as follows:
Repository assets are updated on the site’s inactive database while the site’s live database continues to run undisturbed. When updates to the inactive database are complete, the site’s SwitchingDataSource switches its underlying data source to the updated database. The newly inactive database is updated to reflect the same deployment.
File assets are updated on the site’s inactive directory while the site’s live directory runs. When updates to the inactive directory are complete, the site switches to it: the inactive directory becomes the live directory, and vice-versa. The inactive directory is then updated to reflect the same deployment.
Note: Switch deployment of JSPs to a Web application is not supported: the inactive directory where JSPs are first deployed can only contain the JSPs that are managed in and deployed from the ATG Content Administration environment. This excludes most Web applications, which include other resources such as servlets.
Online versus switch deployments
Switch deployment is generally favored for production environments, where it is important that all updates take place immediately and without error. Online deployment is liable to put a live Web site temporarily in an inconsistent state containing both new and stale data; and it can also disrupt performance. Moreover, failure of an online deployment can put the site in an unknown state and render it unavailable for an extended period of time while the problem is diagnosed. The solution—often a full deployment—can itself be time-consuming.
Switch deployment avoids the problems associated with online deployment:
All new data is available to the live site at the same time, no matter how much data is moved.
Switch deployment failures only affect the offline server, so deployment failures have no effect on the live production site.
Online deployment is generally advisable for development and testing purposes, where easier setup and faster deployment is desirable, and the potential risks are not a major concern.