You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Stefan Guggisberg <st...@gmail.com> on 2005/01/26 12:21:30 UTC

how to handle contributions [was: JCR over RMI, part 2]

folks,
jukka kindly provided a transparent RMI layer for the jcr 
api as a contribution. after looking at his code i must say 
that he did an exellent job. i also think that a transparent
RMI layer provides great value to both jcr clients and jcr
implementations as it allows to access any jcr repository 
across jvm/machine boundaries.
 
jukka sent a patch, i.e. his code is located in the same source 
tree as the jackrabbit code and is build through the same pom. 

as there are no dependencies to jackrabbit, i'd like to put
the rmi code in a separate location, including its own pom etc.
in order to minimze sideeffects.

something like contrib/jcr-rmi perhaps?

is there a common practice in apache projects for
handling/managing contributions?

what are the required administrational tasks (CLA, etc.)?

thoughts? suggestions?

cheers
stefan

On Sat, 22 Jan 2005 03:14:09 +0200, Jukka Zitting <ju...@zitting.name> wrote:
> Hi again,
> 
> Two months ago I contacted this list with a very early release of a
> simple transparent RMI layer for JCR. Based on the discussions that
> followed, I have since worked slowly (started my own company along the
> way ;-) to make the layer more feature-complete.
> 
> I have now reached the status where a reasonably large subset of the JCR
> functionality is implemented and documented. The code has got some rough
> edges and still misses some functionality (queries, locking, etc.), but
> I think that it's already becoming usable and I'd like to get some more
> external feedback and testing before venturing further.
> 
> Summary of included features:
>     - basic functions (Repository/Session/Workspace/Item/Node/Property)
>     - read-write access (all Value types, including multiple values)
>     - XML import and export (with possible size limitations)
>     - node type manager
>     - namespace registry
> 
> Summary of missing features:
>     - version control
>     - locking
>     - query manager
>     - observation manager
>     - transactions & other advanced stuff
> 
> The RMI layer is as thin as possible - virtually all JCR methods all
> mapped to corresponding remote methods. The implementation concists of
> two adapter layers, one server and one client side, that adapt the JCR
> interfaces to and from a set of JCR-RMI remote interfaces. The factory
> pattern used on both the server and client side makes it easy to extend
> or modify the RMI layer. For more details, please check the Javadocs.
> 
> Implementing version control, locking, queries, and events should be a
> simple task based on the existing infrastructure. I'd however like to
> wait for Jakcrabbit to switch to the next JCR API version (currently
> using 0.15) before implementing more functionality.
> 
> There is currently only one major design issue I haven't solved. The
> issue is related to item equality as defined by the Item.isSame(Item)
> method. For various reasons it is very hard to dereference an RMI
> reference and thus it would require considerable bookkeeping to be able
> to reliably implement the equality check. Unless better solutions are
> invented, my plan is to implement the equality check using UUIDs or just
> item paths.
> 
> The full source code of the JCR-RMI layer is available as a unified diff
> against the current Jackrabbit source tree. The diff is available at
> http://zitting.name/jukka/2004/jcr-rmi/jcr-rmi.20050122.patch, and
> contains changes to project.xml and maven.xml, and includes the three
> new packages org.apache.jackrabbit.rmi.{client,remote,server} and a
> simple (undocumented) test package org.apache.jackrabbit.test.rmi.
> 
> The project.xml changes are new dependencies to Commons IO and EasyMock.
> Neither is absolutely necessary. I use Commons IO for some simple IO
> operations that could easily be handled manually to avoid the
> dependency. EasyMock is used for simple unit testing of the RMI layer.
> In addition to the small Commons IO dependency, the code only depends on
> J2SE and JCR, not even the Jackrabbit classes are needed for the RMI layer.
> 
> The maven.xml change is the addition of an rmic post-goal to the
> java:compile goal. In future it might also be useful to package the
> client and server implementations of the RMI layer into separate jar files.
> 
> The actual code in org.apache.jackrabbit.rmi.* is pretty straightforward
> and mostly documented. I'm using the latest copyright statements found
> in Jackrabbit.
> 
> If you want, you are free to include the code to Jackrabbit (I can send
> a CLA if needed). However, as discussed earlier on this list, would it
> be a better solution to place this code in some separate contrib area to
> avoid messing with the main development tree?
> 
> Comments and feedback is warmly welcome!
> 
> Best regards,
> 
> Jukka Zitting
> jukka@zitting.name
>

Re: how to handle contributions [was: JCR over RMI, part 2]

Posted by Jukka Zitting <ju...@zitting.name>.
Hi all,

Stefan, thanks for the praise!

Stefan Guggisberg wrote:
> as there are no dependencies to jackrabbit, i'd like to put
> the rmi code in a separate location, including its own pom etc.
> in order to minimze sideeffects.

Sounds reasonable. I don't know the Apache conventions for such issues 
so I cannot comment on the details. I can easily provide the JCR-RMI 
layer in whatever format or configuration is selected.

> something like contrib/jcr-rmi perhaps?

As an example of this choise, I created a simple standalone jcr-rmi 
package at http://jcr.yukatan.fi/2005/01/. The package is available
both as a separate jcr-rmi tar archive and as a contrib/jcr-rmi patch
against the jackrabbit source tree.

The POM is currently very simple and contains the following description:

     JCR-RMI is an independent subproject of the Jackrabbit project. It
     provides a transparent Remote Method Invocation (RMI) layer for the
     Content Repository for Java Technology API (JCR). The JCR-RMI layer
     makes it possible to access JCR content repositories across virtual
     machine boundaries. Although implemented as a contribution to the
     Jackrabbit project, the JCR-RMI layer is independent of the
     underlying JCR repository implementation.

I also removed the Commons IO dependency and documented the Xerces 
dependency I missed earlier (Xerces is used for XML serialization).

BR,

Jukka Zitting

Re: how to handle contributions [was: JCR over RMI, part 2]

Posted by Stefano Mazzocchi <st...@apache.org>.
Stefan Guggisberg wrote:
> folks,
> jukka kindly provided a transparent RMI layer for the jcr 
> api as a contribution. after looking at his code i must say 
> that he did an exellent job. i also think that a transparent
> RMI layer provides great value to both jcr clients and jcr
> implementations as it allows to access any jcr repository 
> across jvm/machine boundaries.

Awesome!! Seeing the community starting to bloom around JackRabbit gives 
me (and I'm sure others too!) a warm feeling :-)

> jukka sent a patch, i.e. his code is located in the same source 
> tree as the jackrabbit code and is build through the same pom. 
> 
> as there are no dependencies to jackrabbit, i'd like to put
> the rmi code in a separate location, including its own pom etc.
> in order to minimze sideeffects.

Nice. Separation thru solid contracts is always a good thing... also 
means that other JCR vendors might use this even if they don't use 
JackRabbit as their JSR170 implementation, which is good for the JCR 
ecosystem in general.

> something like contrib/jcr-rmi perhaps?

makes sense.

> is there a common practice in apache projects for
> handling/managing contributions?

well, not really, it strongly depends on the architecture.

In same projects there are things like "whiteboards/scratchpads" where 
people put the stuff they are currently working on and they don't want 
to impact the main tree, similar to how you did jcrri back in the slide 
days.

In other projects (say cocoon), there are units of applications calls 
blocks and people donate their blocks and they end up in the block 
folder, alongside all others.

In other projects, new modules are created (but now SVN makes this 
pretty much obsolete).

I think contrib is a great way to start.. keep in mind that thanks to 
SVN we can move it around with no big deal.

> what are the required administrational tasks (CLA, etc.)?

If the donation is sustantial (and this appears to be), having a CLA on 
file from Jukka is the way to go.

Great job, Jukka and thanks much!

-- 
Stefano.