cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone using the Alfresco JCR RMI APIs?

theorbix
Confirmed Champ
Confirmed Champ
Hello,

Has anyone been using the JCR RMI API of Alfresco to develop a real-world web application (with real world I mean a working application, not just a proof of concept)?

I refer to this API:

http://wiki.alfresco.com/wiki/Is_JCR-RMI_Right_for_Me%3F#Alfresco_JCR_RMI_Extention

My company needs to implement a customized web application that will run on a separate JBoss context (so we won't be able to use the native Alfresco Repository API and the Alfresco JCR Interface: both are local interfaces that can't be remotized).

For certain reasons, we would not like to use the Web Services and WebScripts interfaces (Web Services, in particular have a strange bug/limitation that cause expiration of authentication tickets, as described here: http://forums.alfresco.com/viewtopic.php?f=27&t=8363), so were thinking to use the JCR RMI Extention.

Has anyone actually used this interface? Feedback? Does it have serious problems/limitations, or does it work properly?

In particular, we are worried by the following comments in the wiki:

- 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.
- RMI relies on object serialization .. some content types have node properties that may be tricky to handle. Watch out RMI can be a real headache.

If someone has used these interfaces…. are these really serious issues in the development of an application?
7 REPLIES 7

pmonks
Star Contributor
Star Contributor
Just out of interest, what is it that you don't like about Web Scripts?

Cheers,
Peter

theorbix
Confirmed Champ
Confirmed Champ
Good question…

The point is that our customer would like to stay as close as possible to standards.

One of the key requirements of our project is to have a remotized interface we plan to have a single, shared, Alfresco server and several indipendent web applications talking to the central Alfresco server. So the native in-process APIs of Alfresco are not an option.

The Web Service API is indeed a "remotized API", but we have already been hurted a bit using, since we lost some days of development work because of a bug in the way the Web Service API manages the authentication token. See http://issues.alfresco.com/browse/ALFCOM-1013 for details.

WebScritps are perceived as being a proprietary API for Alfresco, so we have been looking for something closer to the JSR-170 repository APIs, and the JCR RMI Extention APIs seem a reasonable approach… if they work.

theorbix
Confirmed Champ
Confirmed Champ
No responses?
Looks like nobody is using the RMI APIs… too bad, I was really looking for some feedback.

geraud
Champ in-the-making
Champ in-the-making
We are using JCR RMI on Lutece (http://dev.lutece.paris.fr/plugins/plugin-jsr170/). This is a plugin that provides a JCR browser, it is known to work on Jackrabbit and Alfresco.
A lot of work has been done to make it work with JCR RMI due to many problems : loss of session, exceptions with some methods (see http://forums.alfresco.com/en/viewtopic.php?f=28&t=5942&start=15),…
It seems to work correctly for the moment, but it has not been tested in a production environment yet.


Géraud

theorbix
Confirmed Champ
Confirmed Champ
Thanks a lot Geraud.

It's good to know that the JCR RMI APIs can be used for some "real world" apps, even if you faced implementation problems.

From what you say, I understand that the problems were some bugs in the Alfresco JCR APIs, right? Do you know if these bugs have been logged into JIRA, and scheduled for a future fix?

By the way, you were mentioning problem with unexpected session expirations… it's curious, since we found a similar problem while experimenting with the Web Services API. The issue was actually logged as a bug that will probably fixed in 3.0 (see http://issues.alfresco.com/browse/ALFCOM-1013).

Going back to the JCR RMI APIs… would you recommend using them? Did you face performance issues (for instance in performing queries and fetching result sets), or after the troubleshooting you're quite satisfied with these APIs?

Many other have suggested to use the Web Scripts API since this should be more and more the future "leading API" of Alfresco.

I've nothing against Web Scripts, and I've started playing with them a bit… they seem quite simple to implement but I've not yet understood how to implement a number of things.

What really concerns me is that Web Scripts are a sort of proprietary API, and I was hoping to be able to use a more standardized interface (even if probably less feature rich than the native Alfresco API).

From an open source company like Alfresco, I was expecting some more support for open standards like JSR-170… this slightly disappointing, in particular since the web site points to technical papers like "The Most Scalable JSR-170 Repository": that's OK, Alfresco has a good and scalable JSR-170 based repository, but accessing it through the JSR-170 API is difficult or cumbersome… I can accept it, but it sounds contradictory.

tim-erwin
Champ in-the-making
Champ in-the-making
Hi Orbix,

I'm using Web Services in a real world application and had problems with the ticket/session, too. However, they are solved: http://forums.alfresco.com/en/viewtopic.php?f=27&t=11259

The ticket works 100%. My problem rather is performance. The alfresco webclient is quite fast and provides good capabilities to get data in batches and stuff (paging in the browser). With web services our application is a little slow. I'm already trying to reduce the number of calls to a minimum by always providing arrays. For some things, however it's necessary to make several calls per item you want to have information on. That takes quite some time then.

You did not mention performance as an issue with web services. Would you consider it an issue? Maybe I'm doing something wrong. We are thinking (even planning) of switching to Web Scripts as they don't have the network/XML overhead. The downside is, they reside on the same server, alfreso does, so again performance…?

Alfresco in general seems to be quite performance hungry. A QuadCore with 4GB is really busy with only few users browsing (CIFS) on a standard installation.

Have you decided yet?

Regards,
Tim

theorbix
Confirmed Champ
Confirmed Champ
Hi Orbix,

I'm using Web Services in a real world application and had problems with the ticket/session, too. However, they are solved: http://forums.alfresco.com/en/viewtopic.php?f=27&t=11259

The ticket works 100%.

Yes, we are aware of the problem and we have asked Alfresco Engineering to escalate an official fix (it was initially slated for 3.0, now it should probably be included in a service pack for 2.x).

My problem rather is performance. The alfresco webclient is quite fast and provides good capabilities to get data in batches and stuff (paging in the browser). With web services our application is a little slow. I'm already trying to reduce the number of calls to a minimum by always providing arrays. For some things, however it's necessary to make several calls per item you want to have information on. That takes quite some time then.


Well, we have found Web Service performance issues in executing certain queries, but I believe that the problem was actually the query syntax. I should check with the development team to see what is/was wrong in the query.
The major concern now is that the Web Services seem to show some serious limitations: for instance it seems impossible to execute a query that returns a set of results sorted in an arbitrary way.
Did you have the need of sorting results? Did you find a solution/workaround?

You did not mention performance as an issue with web services. Would you consider it an issue? Maybe I'm doing something wrong. We are thinking (even planning) of switching to Web Scripts as they don't have the network/XML overhead. The downside is, they reside on the same server, alfreso does, so again performance…?

Have you decided yet?

We're thinking to switch to Web Scripts as well… hoping that it will not be another dead-end way.
Initially we were thinking about using the JCR-RMI APIs, but it turned out that they're not usable in real world applications (see the note in this page: http://wiki.alfresco.com/wiki/JCR-RMI_Extension).
So we started the implementation using the Web Services, and discovered the ticket expiration tickets and the fact that not all features are exposed through Web Services.
Next attempt would be Web Scripts (everybody at Alfresco says that this is they way to go…), but what if we'll discover other "surprises" - missing features, reliability problems - in the implementation?
So far it seems that the only complete and reliable API is the Alfresco Java Foundation API… that is in-process and not remotized.
In terms of remotized APIs… it's a bet.