Welcome to TechNet Blogs Sign in | Join | Help

Content Deployment – The complete Guide – Part 4 – Communication

Part 1 - The Basics
Part 2 - The Basics continued
Part 3 - Configuration
Part 4 - Communication
Part 5 - Quick Deployment
Part 6 - Logging
Part 7 - coming soon...
Part 8 - coming soon...
Part 9 - coming soon...

Content Deployment uses the http (or https) protocol for communication between source and target farm. Most of the communication is performed through Web service calls except for the file transfer of the exported files to the target farms which is done using a regular http POST request against an ASPX page to perform the upload operation.

Communication inside the same farm (between worker process and timer service) is implemented by writing to and reading from the configuration database (starting and stopping of timer jobs) and central administration content database (job status information) of the farm.

Communication through a Web Service

This Web service is hosted within the central administration Web application at the following URL:

http://target-central-admin-url/_vti_adm/ContentDeploymentRemoteImport.asmx

It provides the following operations:

GetVirtualServersInformation

This operation is used during the configuration of a content deployment path. It allows enumerating all SharePoint Web applications on the target farm which will then be presented in the UI to allow a user to select it as target for the content deployment path.

GetSiteCollectionNames

This operation is also used during configuration of a content deployment path. It allows enumerating all site collections on the target farm for a given virtual server which will then be presented in the UI to allow a user to select it as a target for the content deployment path.

GetRemoteAdminServerUrl

When configuring content deployment in a farm you have to define one server that has to act as the importing server for content deployment operations. The GetRemoteAdminServerUrl operation returns the information about this server to the caller.

This operation is called as well during execution of a content deployment job to identify which server in the target farm will perform the import.

CreateJob

This operation is called by an executing content deployment job on the source farm. It allows the creation of the shadow job on the target farm that will perform the import operation.

RunJob

This operation is called by an executing content deployment job on the source farm to start an earlier created shadow content deployment job on the target farm. This job will perform the import operation.

GetJobStatus

This operation is called by an executing content deployment job on the source farm in a configurable interval (default: 10 seconds) to get the status of the import operation from the target farm.

It should be noted that refreshing the content deployment status page does not necessarily result in a request for status to the target farm.

It should be noted that if the returned status does not change for a configurable timeframe (default: 10 minutes) the content deployment job on the source farm will report a timeout – independent whether or not the import operation later finishes successfully.

This affects mainly full deployment jobs which deploy a large amount of data. In this situation the decompressing phase on the target server can take longer than 10 minutes which will result in such a timeout.

CancelJob

This operation is called by an executing content deployment job on the source farm to cancel its shadow content deployment job on the target farm when a user requested the cancellation of the content deployment through the UI. Be aware that such a cancel operation can only be performed if the decompressing operation has not yet started.

DeleteJob

This operation is called by an executing content deployment job on the source farm to delete its shadow content deployment job on the target farm after the deployment has been completed.

File transfer through http POST

File transfer of the export packages to the target farm is performed through an http POST request to the following page which is hosted within the central administration Web application:

http://target-central-admin-url/_admin/Content%20Deployment/DeploymentUpload.aspx

The uploaded file is sent as payload of the POST request. The information about the name of the file and the shadow content deployment job the uploaded file belongs to is provided through query string parameters. The actual URL sent with the http request would look similar to this:

http://target-central-admin-url/_admin/Content Deployment/DeploymentUpload.aspx?filename="ExportedFiles.cab"&remoteJobId="49bebd7d-62d0-4d68-a1f0-9118b3ac4416"

Content Deployment Communication Flow

To describe process used during content deployment we will use following diagram. Be aware that communication in the same farm (red arrows) is implemented by writing to/reading from the sharepoint configuration and central administration content database. Communication between farms happens through the web services (dark blue arrows) and the http post request to do the file uploaded (light blue arrow):

When a content deployment job is started through the central admin UI a new one time timer job is created and executed (1). Alternatively the preconfigured timer job for a scheduled deployment job can be started by the timer service manually.

The timer job exports the configured content into a temp directory and compresses it into one or multiple cab files.

When the export is finished the timerjob calls the GetRemoteAdminServerUrl operation of the ContentDeploymentRemoteImport Web service to get the information about the import server to use (2).

The next step is that the timer job calls the CreateJob operation of the ContentDeploymentRemoteImport Web service to create the shadow content deployment job and the associated one time import timer job on the target farm. This job will remain in a stopped state (3/4).

Afterwards the timer job on the source farm uploads the exported cab files to the temp directory on the import server in the target farm using http upload to the DeploymentUpload.aspx (5).

After the upload is completed the timer job on the source farm calls the RunJob operation of the ContentDeploymentRemoteImport Web service to start the import timer job on the target farm (3/4).

While the import is running the import timer job will update the status of the deployment in the associated content deployment job list item.

Every 10 seconds (configurable though object model by setting the RemotePollingInterval setting – see part 2) the timer job on the source farm will call the GetJobStatus operation of the ContentDeploymentRemoteImport Web service to retrieve the status of the import operation (3/6). The timer job on the source farm will update the status in the content deployment job list item with the status received from the target farm. If the update hasn't changed for 600 seconds (configurable though object model by setting the RemoteTimeout setting – see part 2) the timer job on the source farm assumes that something went wrong and will report a timeout.

When the timer job on the source server receives the information that the import operation has completed (either succeeded or failed) it will delete the shadow deployment job and the associated timer job through a call to the DeleteJob operations of the ContentDeploymentRemoteImport Web service (3/4)

The central administration retrieves the status of the timer job by looking at the content deployment job and job report list item which are updated by the timer service on the source farm (7). Every refresh of the page only reads the status in the local content deployment job list item. No call to the target farm to get a status update is done when refreshing this page.

Published Tuesday, November 03, 2009 3:25 PM by Stefan_Gossner

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Tuesday, November 17, 2009 3:45 AM by Jose

# re: Content Deployment – The complete Guide – Part 4 – Communication

I have problem in content deployment when source server is https and destination is http, the job stuck at 'preparing' status, what is the solution?

Thanks

Tuesday, November 17, 2009 3:37 PM by Stefan_Gossner

# re: Content Deployment – The complete Guide – Part 4 – Communication

Hi Jose,

"Preparing" is before exporting starts. At this stage the protocol being used does not matter. If the job is stuck in "Preparing" then the timerjob does not start.

Usually that means that the server configured as export server does not host the Central Admin website.

Please double check.

Cheers,

Stefan

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker