Managed asset deployment

Managed assets are files that are uploaded by business users to be used for store marketing, or to supplement products. They are added to WebSphere Commerce through the Assets tool or the Marketing tool in Management Center. By default, managed assets are extracted and deployed through the WebSphere Commerce EAR. To maintain performance in a large-scale production environment, site administrators must switch to alternative extraction and deployment methods for managed assets.

Important: The default method of extraction and deployment of managed assets was designed and implemented for ease of use, and is intended for testing environments or small deployments with limited assets. Change the default method of extraction if you are planning on running a larger production site. Performance issues can occur if the default system is used beyond its original design capacity.

Default managed asset lifecycle

A default WebSphere Commerce installation

1 Managed assets, when uploaded through Management Center, are first stored in the CMFILE, CMSMALLFILE, and CMLARGEFILE tables of the WebSphere Commerce database.

2 From there, the scheduled job com.ibm.commerce.filepublish.commands.ScheduledContentManagedFileEARUpdateCmd evaluates its set of criteria in the WebSphere Commerce configuration file (wc-server.xml). The criteria and their default values are as follows:
minNumOfFilesForUpdate
The minimum number of files for an update to occur. This variable is set by default to 10.
minSecFromLastUpload
The minimum number of seconds since the last update. This variable is set by default to 3600.

If either of these criteria are met, the job extracts these assets from the database and moves them into a file system where they can be accessed or further propagated for use in both the staging and production environments.

3 By default, the files are extracted from the WebSphere Commerce database and placed into the EAR of the staging environment.

4 In this scenario, these assets are then pushed to the production environment with the fileprop utility when stagingprop is called.

Alternative methods of extraction and deployment

Two alternative methods to extract managed assets from the WebSphere Commerce database are available. Instead of moving files into the WebSphere Commerce EAR, FTP or file system copy can be configured to move the assets into a local or remote file system. For instructions on how to configure FTP or file system copy to extract managed assets, see Configuring FTP or file system copy for extracting managed assets.

A custom installation with FTP or file system copy configured, and a customized method to propagate files into the production environment

1 The initial upload and temporary storage of managed assets is identical to that of the default lifecycle.

2 The same scheduled job is used to extract assets from the WebSphere Commerce database. With extraction handled by FTP or file system copy, however, fewer WebSphere Commerce resources are used to extract and propagate managed assets. Thus, you can used lower thresholds for the scheduled job that extracts the managed assets. To change these values, see Changing managed file WebSphere Commerce EAR updater parameters.

3 With FTP or file system copy configured, assets are moved into a file system, locally or remote from the system that is running the WebSphere Commerce staging environment. If the files are accessible by both the staging and production environments, no further propagation is required.

4 It is more common, however, to further propagate the files into the production environment. Using the rsync utility is popular for this purpose.

Comparison of methods of extraction

The following table highlights the pros and cons of the three methods of extraction available. Consult it to ensure that you are using the method that is appropriate for your deployment of WebSphere Commerce.

Methods of managed asset extraction

Extraction method Pros Cons
EAR update (default)
  • No configuration is required
  • No maintenance is required
  • Requires the WebSphere Commerce environments to be federated
  • Performance of WebSphere Commerce is negatively impacted when large volumes of assets are propagated with the fileprop utility
  • The WebSphere Commerce EAR can grow to sizes outside of its original designed capacity
FTP
Note: SFTP is not supported.
  • Faster file extraction and propagation is possible
  • WebSphere Commerce performance is maintained
  • Federation of staging and production environments is not required
  • Configuration is required
  • Custom file propagation to production environments might be required
File system copy Same as FTP Same as FTP