views:

78

answers:

3

Does a Java Content Repository (JCR, specified in JSR-283) implementation with the following features exist?

  • Single-threaded (does not create threads for background processing).
  • In-memory (does not rely on external storage such as a database system or a filesystem).
  • Possibly read-only (no need to support write operations — all content is provided programmatically upon startup).

It is understood that these constraints will create severe limitations for the system, so please don't go into that. To give some background, the purpose is to find a lightweight JCR implementation which can:

  • Be used for prototyping publishing systems built on top of JCR: simple blog engines, content management systems and so on. When a system grows, it can move to a more full-featured JCR implementation.
  • Run in restricted environments such as the Google App Engine, where for example thread creation is not allowed. If the content is relatively small and rarely updated, a read-only content repository can be acceptable.

Options considered so far, which do not seem to fill these requirements are:

  • Apache Jackrabbit: Apparently requires threads. Storage seems to be pluggable, so in-memory storage could be implemented.
  • Other alternatives?
+1  A: 

Have you looked at ModeShape? ModeShape is lightweight and can easily be configured to use an in-memory repository and has an extensible connector framework (if you want to connect it to an external content system). It's also possible to disable searching and indexing and a number of other services. It does create a few threads for background processing, though it's open source, and could be modified to allow creating a stripped-down JCR engine (though not all JCR features would work).

Randall
Thank you, ModeShape looks feature-rich. I'm however hesitant to start modifying the source with regards to threads, fearing the modifications will take too much time or might not succeed.
Seppo Sade
A: 

I don't see why you care about threads. The other constraints should be easy to satisfy.

EJP
Please read the question carefully again: one of the main purposes is to run the JCR in restricted environments such as the Google App Engine where thread creation is disallowed. Therefore being single-threaded is crucial.
Seppo Sade
+1  A: 

Priha (http://www.priha.org) does not require threads, and is JCR1.0 compliant (in the sense that it's not officially certified, but passes the TCK), though it does not implement all the optional bits.

Janne Jalkanen