jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <ju...@zitting.name>
Subject JCR over RMI
Date Fri, 19 Nov 2004 23:18:33 GMT
Hi all,

In the spirit of "Do the simplest thing that could possibly work" and 
"Release early", I've made my simple and very incomplete "JCR over RMI" 
implementation available at:

   http://zitting.name/jukka/2004/11/jcr-rmi-0.1-src.zip

The main goal of jcr-rmi was to get to know the JCR API. Another goal 
was to implement the "Model 3: The Repository Server" deployment model 
as easily as possible (DTSTTCPW). I wanted to create a JCR server with 
no external dependencies (databases, j2ee, ...). As I found no signs of 
a similar project, I decided to write something myself.

The jcr-rmi project provides a simple RMI extension for the JCR API. 
Through RMI, one or more clients can access a content repository that is 
located on a remote server. With RMI-CORBA and RMI-SOAP mappings it 
would (theoretically) be possible to provide language-independed access 
to the content repository.

The project is currently packaged in fi.yukatan.* based on my company 
(just starting, thus evaluating new technologies), and uses standard 
"All rights reserved" notices. If there's interest, I'd be happy to 
contribute the code to Jackrabbit, although it actually only depends on 
the JCR API (version 0.15) and not on the Jackrabbit implementation.

The project consists of three packages:

fi.yukatan.jcr.remote
   An RMI mapping of a subset of the JCR API

fi.yukatan.jcr.client
   A JCR API implementation, that maps all method invocations to
   corresponding remote methods.

fi.yukatan.jcr.server
   A remote JCR server, that maps all method invocations to the
   corresponding methods of a local JCR implementation.

The implementation is very naive and incomplete. Almost all methods are 
directly mapped to remote equivalents with little caching or bundling of 
remote data. In addition, only a small subset of the JCR methods have 
actually been mapped over RMI. Most of the client methods just throw 
UnsupportedOperationExceptions. The implementation is barely able to run 
the "First Steps" examples over RMI.

Once you have a local Repository instance, you can publish it using the 
ServerRepository wrapper:

     Repository repository = ...;
     ServerRepository server = new ServerRepository(repository);
     server.bind("//hostname/servicename");

See the RMI documentation for the required options and other setup 
needed for starting the service.

The remote service can then be accessed by a client simply with:

     Repository remote = new ClientRepository("//hostname/servicename");

The client depends only on the jcr and jcr-rmi jars.

PS. Thank you all for the work on JCR and Jackrabbit! I'll be eagerly 
waiting for the final draft and release of the API, and the related 
Jackrabbit releases. :-)

PPS. Should I stall my work on jcr-rmi until the API stabilizes 
properly? As was already mentioned, it seems that there is growing 
activity around the main Jackrabbit implementation. I hope that this is 
not too distracting for the main project.

Best regards,

Jukka Zitting
jukka@zitting.name

Mime
View raw message