Friday, October 24, 2008

New eXo Platform JCR v.1.10

Today we have released eXo Platform JCR v.1.10.

This is a improvement version of 1.x JCR family
which comming with set of new features.

JCR 1.10 contains such new features as
- JCR based Organization Service
- Amazon SimpleDB
support for Workspace storage
- Repositoy management with ONLINE, READ-ONLY and OFFLINE states
- Content Addressable External Values Storage
- New authentication policy mechanism
- FCKeditor uses REST based access to JCR resources

Main improvements are
- Cache optimization for Items access and modification
- Replication members connection recovery and priority mechanism
- Replication BLOBs processing mechanism
- SessionProvider multithreading usage
- Item Move and Remove operations optimization
- ACL and Permissions logic upgraded

In this release we work on
quality and performance of JCR core.
You will meet better speed of Items Move, Copy, Clone and Remove
operations.
Versioning and Locking operations are faster now too.
Be in touch with eXo JCR performance & QA process here.

We have modernized our Replication service.
The service new features such as Members priority and
Member 'heart-beat' mechanism will help implement more realistic
JCR Cluster.
Replication BLOBs operations were tested again and some issues fixed.
New articles about Replication/Cluster configuration published on eXo wiki.
We have reviewed set of validation aspects according the JSR-170
specification in our JCR core. JCR Path validation more strict now.
Security level and JCR Permissions upgraded using new eXo Core
Security service.

But lets talk about new features of the eXo JCR 1.10.

We start eXo
Organization Service API implementation on JCR storage.
The service actually transparent for other applications having use
Organization Service API, sure as eXoPlatform Portal or ECM.
Only simple component should be configured.
All existing listeners and initializers can be used with the service.

We step on to SaaS path these days :)
eXo JCR storage in Amazon SimpleDB and S3 are beta now.
Yes as the Amazon services.
Today you can setup eXo JCR (Portal, ECM) on SimpleDB (and S3),
put the application on EC2 and you got it.
It's beta now. Beta status mostly thanks to Amazon... the stuff thanks
to Amazon.
But we run it on demo EC2. Ask us if you are interested!

External Values Storage now can be CASasble.
We are supporting Content-Addressable-Storage.
The feature most useful for usecases where same content may be
stored (duplicated) in different locations.
With the Value storage the Value will stored once (one file)
and will be shared between multiple JCR Properties.

So... add Repository state management, new authentication policy,
WebDAV improvements and REST based access to a JCR content.
Would it be tasty for Web2.0, 3.0?

Find more details on JIRA.

Try it! Adopt it!

Ask me ;)

Saturday, July 26, 2008

Manage content with Java Content Repository

Very useful technology for Java developers, and not only

Technology specification

http://jcp.org/en/jsr/detail?id=170

Implementations
Usage

It's similar to a File System we use everyday. But has more features and advantages.

You have to obtain a Repository instance to start. It's implementation specific and simple for most JCRs.

Each Repository presents a list of workspaces. Let us imagine it's drives in file system.

To begin the work with a content you have to login into Repository with selected Workspace.

InitialContext ctx = ...
Repository repository = (Repository)ctx.lookup("myrepo");
// Get a Credentials object
Credentials credentials = new SimpleCredentials("MyName", "MyPassword".toCharArray());
// Get a Session
Session mySession = repository.login(credentials, "MyWorkspace");

After the login you have the Session. So, you have a tool which gives access to a content storage.

Add 'file'

Node myFile = mySession.getRootNode().addNode("my-first-file");

Node it's only object which handles 'file' entity... say handler. Node may contains Property(es). The Property it's a content. String, Integer, Float, Binary, Path etc.

You will use Property to read/write data.

Write
myFile.setProperty("creator_name", "John");
myFile.setProperty("create_date", Calendar.getInstance());
myFile.setProperty("file_content", source.getInputStream());
Read
myFile.getProperty("creator_name").getSTring();
myFile.getProperty("create_date").getDate();
myFile.getProperty("file_content").getStream();

So, not so complicated.

Node can include sub-nodes also. It's only managed by NodeType (like file type, but richer).
myFile.addNode("sub-file");

You may get Node or Property by path, relative from other Node or Property or via Session.

// relative
Node ssFile = myFile.getNode("sub-file/sub-sub-file");
// or by abs path
Node ssFile = (
Node) mySession.getItem("/my-first-file/sub-file/sub-sub-file");

Simple? I hope - yes.

It's a good alternative to a databases in content-oriented applications and makes development process close to a task. A developer should know at least the specification, but it's simple than JDBC anyway.