You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by ChadDavis <ch...@gmail.com> on 2009/10/28 23:05:36 UTC

workspaces, multiple repositories

Hey.

I'm in the design phase of a project.  I'm going to use the JCR as my
persistence for a content management system.  In our production
environment, we will have several instances of the CMS application
running.  Let's say that each of these instances is for a dedicated
client hosted environment.  We're planning to deploy Jackrabbit as a
independent server.  My question is whether it makes sense to use the
same Jackrabbit server for all of the separate instances of our
application.  If so, would it make sense to use workspaces for each
connecting app, similar to using separate User/Schemas for each app
connecting to an Oracle instance.

If I'm obviously lacking some fundamental info, feel free to advise.
I have read the online Jackrabbit docs, as well as the JCR spec, so I
kind of know what's going on.

Thanks,
Chad

Re: workspaces, multiple repositories

Posted by Alexander Klimetschek <ak...@day.com>.
On Thu, Oct 29, 2009 at 15:01, ChadDavis <ch...@gmail.com> wrote:
> Sure, I'm familiar with those.  But I thought Guo meant that
> workspaces should be used for branches, which to me sounds like I, as
> a developer, am supposed to use a workspace to create the effect of
> "branches".  This sounds strange to me because I know that the JCR
> handles Version Control for me, so why would I have to use workspaces
> to do branches?

First of all, you are not forced to use versioning (that has to be
enabled per node via the mix:versionable mixin). Just use a workspace
and use the content hierarchy to separate your apps, content, users,
etc. (unix filesystem is a good example).

When you start versioning, branching is often not required at all, as
it makes versioning more complex. For example, in the context of
content management systems, a linear set of versions of a page is
often all it needs (and what end-users can still easily understand).
That's why JCR 2.0 introduced a simple versioning as well.

Now if you do need to do branches, then you have to use a second
workspace, which contains a clone of your content data. As part of
that cloning, branches will be created for those nodes that are
versioned.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Re: workspaces, multiple repositories

Posted by ChadDavis <ch...@gmail.com>.
Thanks Fabian.  That helps quite a bit.  I still have a question about
the purpose of workspaces, as per the concept of branches.  See my
comment below.

2009/10/28 Fabián Mandelbaum <fm...@gmail.com>:
> Branches, revision/version history, etc. are concepts that come from
> version control systems (like cvs, svn, etc.) are you familiar with
> those?
>

Sure, I'm familiar with those.  But I thought Guo meant that
workspaces should be used for branches, which to me sounds like I, as
a developer, am supposed to use a workspace to create the effect of
"branches".  This sounds strange to me because I know that the JCR
handles Version Control for me, so why would I have to use workspaces
to do branches?

Re: workspaces, multiple repositories

Posted by Fabián Mandelbaum <fm...@gmail.com>.
Branches, revision/version history, etc. are concepts that come from
version control systems (like cvs, svn, etc.) are you familiar with
those?

Basically what Guo Du tried to tell you is that you shouldn't (mustn't
actually) use different workspaces to separate different users
(clients, applications, whatever_it's_called_in_your_case) because
there's certain information that's shared among the workspaces
(branches, version history, etc.) and also because the creators of JCR
advise against it stating that "that's not what workspaces were meant
for".

I suggest you read Mr. Nuescheler's "David's Model..." at

http://wiki.apache.org/jackrabbit/DavidsModel

As for the single repository with multiple apps, yes, separating each
app on its own branch of the repository tree is a possible solution.
So, you'll have something like this stored:

/
/AppA
/AppA/some/content/for/AppA
/AppB
/AppB/some/content/for/AppB
/AppC
/AppC/some/content/for/AppC
...
...
/AppZ

and so on. You'll have to provide mechanisms, either in JCR itself, or
on your application sitting on top of it, to make sure each
application can only access content under its own branch, for security
reasons.

Hope this clarifies things a bit more.

On Wed, Oct 28, 2009 at 8:42 PM, ChadDavis <ch...@gmail.com> wrote:
>> From previous discussion in the maillist, workspace was designed for
>> use case such as branches. Different workspaces share version history
>> in a repository.
>
> Branches?  Can you give me an example of what a branch is?
>
> Also, I don't understand what the significance of your comment about
> version history?  Can you elaborate on how that pertains to the use
> case I describe.
>
>>
>> For you case, single or multiple repository may meet your multi-client
>> requirement. But workspace is not for this case.
>
> So, if I used a single repository to serve several apps, then how
> would I separate the content space of the different apps -- since the
> apps could easily be using the same names, it seems that they would
> have to have separation.  Are you suggesting that each app would have
> it's own branch of the node tree?
>



-- 
Fabián Mandelbaum
IS Engineer

Re: workspaces, multiple repositories

Posted by ChadDavis <ch...@gmail.com>.
> From previous discussion in the maillist, workspace was designed for
> use case such as branches. Different workspaces share version history
> in a repository.

Branches?  Can you give me an example of what a branch is?

Also, I don't understand what the significance of your comment about
version history?  Can you elaborate on how that pertains to the use
case I describe.

>
> For you case, single or multiple repository may meet your multi-client
> requirement. But workspace is not for this case.

So, if I used a single repository to serve several apps, then how
would I separate the content space of the different apps -- since the
apps could easily be using the same names, it seems that they would
have to have separation.  Are you suggesting that each app would have
it's own branch of the node tree?

Re: workspaces, multiple repositories

Posted by Guo Du <mr...@gmail.com>.
On Wed, Oct 28, 2009 at 10:05 PM, ChadDavis <ch...@gmail.com> wrote:
> independent server.  My question is whether it makes sense to use the
> same Jackrabbit server for all of the separate instances of our
> application.  If so, would it make sense to use workspaces for each
> connecting app, similar to using separate User/Schemas for each app
>From previous discussion in the maillist, workspace was designed for
use case such as branches. Different workspaces share version history
in a repository.

For you case, single or multiple repository may meet your multi-client
requirement. But workspace is not for this case.

-Guo