Is JCR-RMI Right for Me?

cancel
Showing results for 
Search instead for 
Did you mean: 

Is JCR-RMI Right for Me?

resplin
Intermediate
0 0 1,078

{{Obsolete}}

This functionality was removed from Alfresco in 5.0.b.

The question here is: Is RMI the best approach for accessing the Alfresco repository.  The short answer is, it depends, but probably not.  Only consider using RMI when alfresco is integrated into a larger Java application suite that already uses RMI as a network protocol.

The following is a short description of the options.  Consider what it is you are trying to accomplish and then choose the solution which best suits your specific needs.

There are many ways to programatically leverage the Alfresco repository:


The Local Alfresco Java Repository API


The Alfresco repository API is a local Java based API for communicating with the repository.  This interface is the most native interface for Alfresco connectivity.  Use this interface when your application sits directly on top of Alfresco and is intimate with Alfresco implementation technology (Spring) and interfaces.

Pros


  • Native interface for the repository - will provide the best performance

Cons


  • Its not a distributed interface
  • Its Alfresco specific




The Local Java Script API


The Alfresco JavaScript API is a local API for communicating with the repository.  This interface is the most native interface for Alfresco connectivity.  Use this interface when your application sits directly on top of Alfresco and is intimate with Alfresco implementation technology (Spring) and interfaces.

Pros


  • Native interface for the repository - will provide the best performance

Cons


  • Its not a distributed interface
  • Its Alfresco specific

Alfresco Web Services API


Alfresco provides remoting capability through a web services API.  The web services API is a strong option for distribution and scaling.  The web services API is specifically designed to cut down on the amount of communication with the server making it an efficient way to remote. The strongest drawback to the use of the Alfresco web services API is the knowlege / coupling with Alfresco specific API.

Pros


  • Implemented on top of alfresco repository API for best performance.
  • Optimized interfaces for distributed transactions
  • Most portable remoting interface

Cons


  • Interface is alfresco specific

CMIS Interface


CMIS


PHP Interfaces


I dont know anything about this interface. 


Alfresco JCR Interface


The Alfresco JCR interface exposes the Alfresco repository behind a JCR compliant adapter.
The JCR interface can be aquired through spring interaction.  The JCR interface is great because it allows an application to communicate with alfresco based on an industry standard.  Realize that the JCR is not a standard for schema, its a standard the gives form around interfaces intended for interacting with a repository.  JCR repositories are composed of the same basic building blocks but the contents/schema or structure depend on the intent of the repository.

The Alfresco JCR interface is a local interface.  It can be aquired through Spring and I expect at some point the spring configuration will be extended to optionally bind the the JCR interface with JNDI.

Pros


  • JCR is a industry created, and supported specification

Cons


  • JCR is being superceded by CMIS.
  • The JCR interface is Java Specific, in particular it has never enjoyed support from the Microsoft platforms.
  • The JCR adapter may not perform at the same level as the native Alfresco interface.
  • The Alfresco JCR interface is not a distributed interface

Alfresco JCR RMI Extention


The JCR RMI extention wraps the the Alfresco JCR implementation in a remoting layer (by leveraging Apache Jackrabbit), providing remote access to the Alfresco JCR api.

Pros


  • RMI provides any easy to use native Java programming interface
  • Quick and dirty remoting implementation
  • JCR is standards based interface

Cons


  • RMI is java specific although there are third party converters.
  • JCR interfaces have not been optimized for a remoting/distributed environment. This means the make a lot of fine grained calls over the wire which may constitute a performance issue.

Something to watch for


If you are drawn to the JCR RMI extention because you are looking for a standards based interface to program your application against; That is you don't want to couple your application with Alfresco interfaces, then keep your eyes on the up and coming iECM standards.

In the mean time choose Alfresco as your repository [why not everyone is doing it] Smiley Happy and then choose the remoting technology the best meets your needs.  You can always practice your object orientation and put an interface between your code and alfresco's web services or any one of the repository interfaces.