AnsweredAssumed Answered

CMIS REST API – Bad Performance

Question asked by sreiterer on Dec 12, 2016
Latest reply on Dec 16, 2016 by sreiterer

Hello,

 

we are currently developing an application which uses the Alfresco backend (Content Repository) to create new documents and change a document’s metadata. For communication with the Alfresco backend we use the CMIS REST API [0]. Our CMIS client is implemented with Apache Chemistry [1].

 

We recognized that the performance for checking-out and checking-in a document is poor. Checking-out a document should only “mark” the document as “checked out”. No content is transferred/downloaded. During check-in, we only set new metadata and do not provide new content.

 

Alfresco environment 1: Alfresco 5.1 CE Standard-Installation, Windows 10, 4 CPUs, 8 GB RAM.
Alfresco environment 2: Alfresco 5.1 One, RedHat, 4 CPUs, 19 GB RAM

Code for checking-out a document:

 StopWatch checkoutStopWatch = new StopWatch();
checkoutStopWatch.start();

ObjectId checkedOutObjectId = document.checkOut();
logPerformance(checkoutStopWatch, " ### PerfSer: CheckOut Document in {} ms");

 

Average Check-out performance: ~800ms on both environments

 

Code for checking-in a document:

 StopWatch checkinStopWatch = new StopWatch();
checkinStopWatch.start();
ObjectId newObjectId;

try {
     newObjectId = pwc.checkIn(false, properties, null, "update metadata");
}
catch (CmisConstraintException e) {
     throw new ArchiveValidationException(e);
}

logPerformance(checkinStopWatch, " ### PerfSer: CheckIn Document in {} ms");

 

Average Check in performance: ~700ms on both environments

 

So the roundtrip for changing a document's metadata will be ~1500ms.

 

Does someone know a more performant approach to check-out and check-in a document to update a document’s metadata?

Best regards,

Stefan Reiterer

 

[0] http://docs.alfresco.com/community/pra/1/topics/cmis-welcome.html
[1] https://chemistry.apache.org/java/opencmis.html

Outcomes