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 Chetan Mehrotra <ch...@gmail.com> on 2015/08/05 17:53:20 UTC

Copy jackrabbit-webapp module to Oak as oak-webapp

Hi Team,

Currently we do not have good example around how to run Oak properly
in standalone environment. One of the good example is
jackrabbit-webapp [1] module which serve as a blueprint for any user
on how to embed Oak. Currently this module only enables running Oak
with Segment store and that to with most basic setup.

I would like to modify this module to use oak-pojorsr [2] to configure
complete Oak stack as we do it in Sling. For that I would like to copy
this module to oak under oak-webapp and then refactor it to run
complete Oak stack.

Thoughts?

Chetan Mehrotra
[1] https://github.com/apache/jackrabbit/tree/trunk/jackrabbit-webapp
[2] https://github.com/apache/jackrabbit-oak/tree/trunk/oak-pojosr

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Michael Dürig <md...@apache.org>.

On 6.8.15 12:22 , Chetan Mehrotra wrote:
>> Is this an official part of Oak or rather an example?
>
> For now its an example untill its stable and we have a consensus on
> wether proposed approach should be the recommended approach for
> configuring Oak in standalone cases.
>
>> if it's an example we can put it to oak-example.
>
> That should be fine. So should the final location be <oak>/oak-example/webapp ?
>
> I can then move the current copy to that place.  I have some local
> commit now in my git-svn. Once I am done I would commit then to
> current place and then move them to final place.
>
> Would that be OK?

+1. And lets place a respective comment in the README (along the lines 
of this being a pimped copy of the real thing in JR).

Michael

>
>
>
> Chetan Mehrotra
>

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Chetan Mehrotra <ch...@gmail.com>.
> Is this an official part of Oak or rather an example?

For now its an example untill its stable and we have a consensus on
wether proposed approach should be the recommended approach for
configuring Oak in standalone cases.

> if it's an example we can put it to oak-example.

That should be fine. So should the final location be <oak>/oak-example/webapp ?

I can then move the current copy to that place.  I have some local
commit now in my git-svn. Once I am done I would commit then to
current place and then move them to final place.

Would that be OK?



Chetan Mehrotra

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Angela Schreiber <an...@adobe.com>.
hi

On 06/08/15 12:11, "Michael Dürig" <md...@apache.org> wrote:
>On 6.8.15 11:59 , Chetan Mehrotra wrote:
>> I understand the concern here Michael. But then I am not sure on the
>> best way forward. It has mostly jsp and couple of classes. The class
>> would need to be adapted to work with Oak and we would also need to
>> remove dependency on jackrabbit-core as it would not be possible to
>> support both (due to conflicting lucene version). if you have any
>> suggestion on how to structure it that would be helpful. If its not ok
>> to put the sample here I can remove it but I do not see a simple way
>> to structure it without copying
>
>I agree this being difficult. Do we at least have an idea of the
>benefit/future cost ratio of this? How do we maintain it (i.e. make sure
>both copies get all future fixes)? Is this an official part of Oak or
>rather an example? In the latter case, can we make this more explicit?

if it's an example we can put it to oak-example.
angela

>
>Michael


Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Michael Dürig <md...@apache.org>.

On 6.8.15 11:59 , Chetan Mehrotra wrote:
> I understand the concern here Michael. But then I am not sure on the
> best way forward. It has mostly jsp and couple of classes. The class
> would need to be adapted to work with Oak and we would also need to
> remove dependency on jackrabbit-core as it would not be possible to
> support both (due to conflicting lucene version). if you have any
> suggestion on how to structure it that would be helpful. If its not ok
> to put the sample here I can remove it but I do not see a simple way
> to structure it without copying

I agree this being difficult. Do we at least have an idea of the 
benefit/future cost ratio of this? How do we maintain it (i.e. make sure 
both copies get all future fixes)? Is this an official part of Oak or 
rather an example? In the latter case, can we make this more explicit?

Michael

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Chetan Mehrotra <ch...@gmail.com>.
> While I agree that this is a good show case I don't like the copy paste approach. While this is simple and cheap now, we keep underestimating the hidden costs of code duplications.

I understand the concern here Michael. But then I am not sure on the
best way forward. It has mostly jsp and couple of classes. The class
would need to be adapted to work with Oak and we would also need to
remove dependency on jackrabbit-core as it would not be possible to
support both (due to conflicting lucene version). if you have any
suggestion on how to structure it that would be helpful. If its not ok
to put the sample here I can remove it but I do not see a simple way
to structure it without copying

> See e.g. the recent mess caused by the fact we copy pasted util.Text a couple of years ago [1].

Yup saw that. However that should have caused the osgi-it to fail. Not
sure why it did not failed.
Chetan Mehrotra


On Thu, Aug 6, 2015 at 3:15 PM, Michael Dürig <md...@apache.org> wrote:
>
> Hi Chetan,
>
> While I agree that this is a good show case I don't like the copy paste
> approach. While this is simple and cheap now, we keep underestimating the
> hidden costs of code duplications.
>
> See e.g. the recent mess caused by the fact we copy pasted util.Text a
> couple of years ago [1]. This was the simplest thing to do then and probably
> only took a couple of minutes. Now, years later it costed us a couple of man
> days as at least Julian, Angela, Alex and myself got involved/blocked with
> this. If the release wouldn't have had other issues it would have resulted
> in a broken release on top of that... Another couple of man weeks given the
> calamities this would have caused for upstream projects.
>
> Michael
>
> [1] http://markmail.org/message/cmr5zl6f74hgjoqs
>
>
> On 5.8.15 5:53 , Chetan Mehrotra wrote:
>>
>> Hi Team,
>>
>> Currently we do not have good example around how to run Oak properly
>> in standalone environment. One of the good example is
>> jackrabbit-webapp [1] module which serve as a blueprint for any user
>> on how to embed Oak. Currently this module only enables running Oak
>> with Segment store and that to with most basic setup.
>>
>> I would like to modify this module to use oak-pojorsr [2] to configure
>> complete Oak stack as we do it in Sling. For that I would like to copy
>> this module to oak under oak-webapp and then refactor it to run
>> complete Oak stack.
>>
>> Thoughts?
>>
>> Chetan Mehrotra
>> [1] https://github.com/apache/jackrabbit/tree/trunk/jackrabbit-webapp
>> [2] https://github.com/apache/jackrabbit-oak/tree/trunk/oak-pojosr
>>
>

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Michael Dürig <md...@apache.org>.
Hi Chetan,

While I agree that this is a good show case I don't like the copy paste 
approach. While this is simple and cheap now, we keep underestimating 
the hidden costs of code duplications.

See e.g. the recent mess caused by the fact we copy pasted util.Text a 
couple of years ago [1]. This was the simplest thing to do then and 
probably only took a couple of minutes. Now, years later it costed us a 
couple of man days as at least Julian, Angela, Alex and myself got 
involved/blocked with this. If the release wouldn't have had other 
issues it would have resulted in a broken release on top of that... 
Another couple of man weeks given the calamities this would have caused 
for upstream projects.

Michael

[1] http://markmail.org/message/cmr5zl6f74hgjoqs

On 5.8.15 5:53 , Chetan Mehrotra wrote:
> Hi Team,
>
> Currently we do not have good example around how to run Oak properly
> in standalone environment. One of the good example is
> jackrabbit-webapp [1] module which serve as a blueprint for any user
> on how to embed Oak. Currently this module only enables running Oak
> with Segment store and that to with most basic setup.
>
> I would like to modify this module to use oak-pojorsr [2] to configure
> complete Oak stack as we do it in Sling. For that I would like to copy
> this module to oak under oak-webapp and then refactor it to run
> complete Oak stack.
>
> Thoughts?
>
> Chetan Mehrotra
> [1] https://github.com/apache/jackrabbit/tree/trunk/jackrabbit-webapp
> [2] https://github.com/apache/jackrabbit-oak/tree/trunk/oak-pojosr
>

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Chetan Mehrotra <ch...@gmail.com>.
On Thu, Aug 6, 2015 at 12:16 AM, Davide Giannella <da...@apache.org> wrote:
> Will then mean it will work as http API for
> Oak? I'm not familiar with jackrabbit-webapp

jackrabbit-webapp demonstrates a way to configure Jackrabbit
repository in standalone env and have it running in a WebApp. It also
configures the webdav servlet and JCR Remoting which work with any
repository implementation and thus should work with Oak.

Chetan Mehrotra

Re: Copy jackrabbit-webapp module to Oak as oak-webapp

Posted by Davide Giannella <da...@apache.org>.
On 05/08/2015 17:53, Chetan Mehrotra wrote:
> ...
> I would like to modify this module to use oak-pojorsr [2] to configure
> complete Oak stack as we do it in Sling. For that I would like to copy
> this module to oak under oak-webapp and then refactor it to run
> complete Oak stack.
>
> Thoughts?
>

Overall I'm fine with it. Will then mean it will work as http API for
Oak? I'm not familiar with jackrabbit-webapp.

Davide