Best practices for developing client applications

There are several best practices and recommendations that you should keep in mind when accessing content through IBM® Content Management Interoperability Services for FileNet® Content Manager (IBM ECM CMIS).

Recommendations for using the deleteTree service

The deleteTree service deletes a folder and all of its subfolders and documents.

If you call the deleteTree service with the continueOnFailure parameter set to true, folders and documents are deleted individually. If a document or folder cannot be deleted, the service moves to the next document or folder in the list. When the service completes, it returns a list of the document IDs and folder IDs that were not deleted to the client application.

If you call the deleteTree service with the continueOnFailure parameter set to false, all of the folders and documents are deleted in a single batch, which improves performance. However, if a document or folder cannot be deleted, none of the contents of the folder are deleted and an error is returned to the client.

When continueOnFailure is set to false, the service can time out if the parent folder contains many documents and folders. If this occurs, you can call the deleteTree service on a subfolder of the parent folder to reduce the number of objects that are deleted at one time and to avoid a timeout.

Recommendations for getting unfiled documents

When you retrieve unfiled documents by using the Unfiled service collection URL, the service can consume system resources in a large system. If you implement the following suggestions, you can reduce the impact of using the Unfiled service collection URL:
  • In REST feeds, use next links to page through results rather than requesting the next page with a skip count.
  • If you want to retrieve a large number of unfiled documents, specify a larger value for the maxItems parameter to reduce the amount of paging that is required to display the documents.

    This is especially important if you use Web Services to retrieve documents because Web Services does not provide a next link.

  • If you want to retrieve a specific set of unfiled documents, use a custom query to return only the wanted documents.
  • If your repository (IBM Content Cortex object store) contains more than 1,000,000 documents, use the Unfiled service collection URL only when the least number of users are using the system.

Recommendations for working with large objects

If your repository contains large objects, you should implement the following recommendations to reduce memory consumption:
  • For REST Services, the most efficient method to access large objects is the setContentStream method. The setContentStream method is defined in section 2.2.4.16 setContentStream External link opens a new window or tab of the OASIS CMIS API specification.
  • For Web Services, the most efficient method to access large objects is the SOAP Message Transmission Optimization Mechanism (MTOM) method, which must be configured in client application.