You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Ian Boston <ie...@tfd.co.uk> on 2013/12/06 03:43:05 UTC

Question about MVCC with MongoMK.

Hi,

Is it possible to branch an Oak repository and maintain a detached
root node for a period of time that one or more Oak instances attached
to a MongoDB instance can follow for a short period of time before
merging the "branch" back into the main tree ?

Although there may be conflicting changes, I would like the main tree
to take precedence on merge.

I am thinking of a cluster containing a number of instances where
changes are made to a subset of the cluster prior to allow those
changes to tested before the whole cluster is exposed to those
changes. ie managed repository content upgrade.

Best Regards
Ian

Re: Question about MVCC with MongoMK.

Posted by Ian Boston <ie...@tfd.co.uk>.
On 6 December 2013 16:44, Bertrand Delacretaz <bd...@apache.org> wrote:
> Hi,
>
> On Fri, Dec 6, 2013 at 11:36 AM, Jukka Zitting <ju...@gmail.com> wrote:
>> ...The main question here is whether we want to go down that path, as the
>> feature is only available with the SegmentMK (at least for now) and
>> we've generally wanted to avoid exposing such implementation-specific
>> features to higher level code...
>
> Agreed, OTOH the scenario that we're discussing here looks extremely
> useful in clustered environments, where managing upgrades and
> minimizing downtime is hard. I suspect Ian will agree that having this
> in Oak would be very valuable, even if that requires using a specific
> microkernel.

Yes,
very valuable indeed, and well worth doing (imho, be happy to help if
I am capable) I think, subject to some experimentation it will bring
upgrades on Oak to a new level, especially in large clusters.

Best Regards
Ian


>
> -Bertrand

Re: Question about MVCC with MongoMK.

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Fri, Dec 6, 2013 at 11:36 AM, Jukka Zitting <ju...@gmail.com> wrote:
> ...The main question here is whether we want to go down that path, as the
> feature is only available with the SegmentMK (at least for now) and
> we've generally wanted to avoid exposing such implementation-specific
> features to higher level code...

Agreed, OTOH the scenario that we're discussing here looks extremely
useful in clustered environments, where managing upgrades and
minimizing downtime is hard. I suspect Ian will agree that having this
in Oak would be very valuable, even if that requires using a specific
microkernel.

-Bertrand

Re: Question about MVCC with MongoMK.

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Fri, Dec 6, 2013 at 5:26 AM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Is that possible today, or reasonably simple to implement? If yes that
> would enable such a scenario with minimal application changes, which
> sounds extremely useful.

It's not available yet, but shouldn't be too difficult to implement.

The main question here is whether we want to go down that path, as the
feature is only available with the SegmentMK (at least for now) and
we've generally wanted to avoid exposing such implementation-specific
features to higher level code.

BR,

Jukka Zitting

Re: Question about MVCC with MongoMK.

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Fri, Dec 6, 2013 at 11:12 AM, Jukka Zitting <ju...@gmail.com> wrote:
> ...The SegmentMK (with the MongoDB backend) can do this using the
> "hierarchical journal" feature.... The SegmentMK maintains one or more
> "journals" that each track the evolution of a particular branch of the
> repository. These branches would normally be automatically merged back
> to the "root" journal, but a particular deployment could easily
> disable automatic merging for a particular branch and use it for a
> purpose like the one you described....

Is there a way to tell the repository to start operating on such a
branch "forever" for a given client?

IIUC Ian's scenario, an application instance would tell Oak "create a
BEFORE_UPGRADE branch and start working on that from now on" so that
the content can be upgraded in the background and tested on other
application instances, before eventually merging the BEFORE_UPGRADE
branch back.

Is that possible today, or reasonably simple to implement? If yes that
would enable such a scenario with minimal application changes, which
sounds extremely useful.

-Bertrand

Re: Question about MVCC with MongoMK.

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Dec 5, 2013 at 9:43 PM, Ian Boston <ie...@tfd.co.uk> wrote:
> Is it possible to branch an Oak repository and maintain a detached
> root node for a period of time that one or more Oak instances attached
> to a MongoDB instance can follow for a short period of time before
> merging the "branch" back into the main tree ?

The SegmentMK (with the MongoDB backend) can do this using the
"hierarchical journal" feature. The SegmentMK maintains one or more
"journals" that each track the evolution of a particular branch of the
repository. These branches would normally be automatically merged back
to the "root" journal, but a particular deployment could easily
disable automatic merging for a particular branch and use it for a
purpose like the one you described.

BR,

Jukka Zitting