jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Edelson <jus...@justinedelson.com>
Subject Re: New to JCR (again) and mildly baffled by workspaces
Date Sun, 08 May 2011 22:55:21 GMT
On Sun, May 8, 2011 at 12:32 PM, Tom Anderson <twic@urchin.earth.li> wrote:
> Hello!
> I'm new to JCR (still - i looked into JCR, and was on this list briefly, a
> year ago, but never managed to make time to really understand things), and
> trying to get my head around some of the concepts - in particular,
> workspaces and versioning. I have some general, non-Jackrabbit-specific,
> questions about JCR - is this a suitable place to ask them?
> In a post on this list several years ago:
> http://jackrabbit.510166.n4.nabble.com/JCR-workspace-usage-td510218.html
> Marcel Reutegger wrote:
>  you can look at workspaces as local checkouts of a revision control
>  system.
> That's a really useful metaphor, because i understand revision control
> systems. However, i don't understand how the parts map on to JCR. The
> workspace corresponds to a local working copy, right? So what's the
> equivalent of the central repository? What are the equivalents of updating
> and committing? How about branching and merging?

I think you're taking the metaphor a bit too literally. It might be
easier to think of workspaces as branches. You'd designate a single
workspace (probably "default") as the "trunk" workspace. In this
context, Node.update() could handle both "commit" and "update"
operations; Workspace.createWorkspace(name, srcWorkspace) is the
"branch" operation and VersionManager.merge() is the "merge"

> I see from the javadoc that there are methods checkin, checkout, and merge -
> but that these are (as of JCR 2.0) on the VersionManager. That suggests to
> me that if i'm going to use them, i'm also going to be getting involved with
> versions. Is that the case? Are workspaces and versioning inextricably
> linked? Can i use workspaces without versioning? Can i use versioning
> without workspaces?
checkin/checkout have nothing to do with workspaces. If you're going
to be using workspaces as branches, then yes, you'll need to use
versioning at some level (especially for merge operations). You can
use workspaces without versioning. You can use versioning without

> The job i'd like to use JCR for is something fairly simple. It would be
> management of an e-commerce product catalog - categories, products, SKUs,
> supporting media and so on. There would be a small merchandising team
> editing this data. The model i have is that the repository holds the master
> version of this information; when the team wants to do some work (adding a
> new category of products, say), they would create a new working copy of it,
> do their editing, over the course of days or weeks, and when it was ready,
> fold it back into the master copy. There could be several such bits of work
> in progress at once. Should i be thinking in terms of having a workspace for
> the master copy, and a workspace for each bit of work? A workspace for each
> bit of work with no master workspace? A single workspace, active in multiple
> sessions, using versioning to separate bits of work? Some combination of the
> above?

I'd tend to think of this as a single workspaces on multiple
repository instances and using an external "publish" process to move
content updates from the content development instance to the content
display instance, but you could likely do this on a single instance
with multiple workspaces.


> Has anything entry-level been written about how to use workspaces and/or
> versioning? The spec is pretty opaque, and the javadocs, being javadocs,
> don't really have a single coherent narrative.
> Thanks in advance for any insights!
> tom
> --
> Many CS algorithms become less useful when questions start getting
> answered with "maybe". -- Eric Sink

View raw message